hi,
i know to generate crystalreports in windows applications. but in webapplications i am not know how to generate crystal reports.
please tell how to generate reports in ASP.net.
Thanks.
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Marimuthu ArigovindasamyRank #5,893 · 283 reputationPosted Jun 14, 2010, 5:31 PM EDT
Marimuthu ArigovindasamyRank #5,893 · 283 reputationPosted Jun 8, 2010, 4:07 PM EDT
Crystal report design is same (Database field, formatting and etc.)
Binding:
Height="339px" ReportSourceID="CrystalReportSource1" Width="401px" />
Marimuthu ArigovindasamyRank #5,893 · 283 reputationPosted Jun 8, 2010, 4:26 PM EDT
Namespace:
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
Code:
ReportDocument cryRpt = new ReportDocument();
ExportOptions rptExportOption;
DiskFileDestinationOptions rptFileDestOption = new DiskFileDestinationOptions();
PdfRtfWordFormatOptions rptFormatOption = new PdfRtfWordFormatOptions();
cryRpt.Load(@"D:\Muthu\Tech\Blogs\ListView\CrystalReport2.rpt");
string reportFileName = string.Empty;
reportFileName = @"D:\Muthu\Projects\WebApplication1\WebApplication1\Report.pdf";
rptFileDestOption.DiskFileName = reportFileName;
rptExportOption = cryRpt.ExportOptions;
{
rptExportOption.ExportDestinationType = ExportDestinationType.DiskFile;
//ExportFormatType.PortableDocFormat (U can change the file type here.)
rptExportOption.ExportFormatType = ExportFormatType.PortableDocFormat;
rptExportOption.ExportDestinationOptions = rptFileDestOption;
rptExportOption.ExportFormatOptions = rptFormatOption;
}
cryRpt.Export();
ajay rajuRank #4,639 · 333 reputationPosted Jun 14, 2010, 9:18 PM EDT
i am using visual web developer 2008 express edition, by default in this edition there no way to develop crystal reports. so i am export the datagrid data into the MS-Excel sheet.
any way thanks for you. if i work in visual studio that time your code is works me. so i am accepting your answer.
Thanks.