Friday, September 12, 2014

How to include crystal report in to form in

Title: Include crystal reports in to form in

Description :The crystal report can not be executed separately, Hence we can use a windows form to execute the report provides a control i:e CrystalReportViewer which can be used display the crystal report on the form

Steps have to do invoke the crystal report

1.Drag ―CrystalReportViewer control from tool box to specified form

Properties for Report control:

1.Report Source: EmployeeDetailsReport.
2.Run the solution .Then it will ask a authentication ,there you need to enter a code(PWD) to finish the process
While running the application the report viewer provides the format option to display records(PDF,MS word etc)

Sunday, September 7, 2014

How to get and format the date in using JQuery

As per previous articles we have seen how to get the data from the web controls using JQuery. Here  we will know how format and add the days to desired date in JQuery.

The below piece of code will get the current date and add days(Here 7days) using Jquery.There is one more functionality also included to get the date in a specific format using Date picker function

<asp:Label id="Label1"  Text="Date" runat="server"/>
<asp:TextBox ID="txtDate" runat="server"/>
<asp:Button id="CalDuration" >Calculate</asp:Button></br />

$("#txtDate").datepicker({ dateFormat: 'mm/dd/yy' }); $('#CalDuration').on('click', function(){ var $date = $('#txtDate').datepicker("getDate"); var resDate = new Date(); resDate.setDate($date.getDate() + 7); alert(resDate.toString());