Friday, January 9, 2009

Crystal Report in Asp.net by code

1. right click on project in solution explorer and add new dataset in project.2. create table on this dataset with field which you want to show in report.3. from solution explorer add new crystal report and in wizard of crystal report select that dataset and table which you just created for report4. add new form or take an existing form in project and add crystal report viewer on that form in which we will show our report.5....
Read More

Friday, January 2, 2009

DateTime Functions

DateTime Function -- to get resutl like Oct2007-May2009 from two dates -- use below function like this select dbo.frommonthyeartomonthyear('10/09/2007','05/03/2009') create function FromMonthYearToMonthYear(@FromDate datetime,@ToDate datetime) returns nvarchar(15) begin return left(DATENAME(month, @FromDate),3)+''+ convert(nvarchar(4), year(@FromDate)) +'-'+left(DATENAME(month, @ToDate),3)+''+ convert(nvarchar(4), year(@ToDate)) end create...
Read More
Powered By Blogger · Designed By Seo Blogger Templates