Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Shell directly to PDF in new browser window
Message
General information
Forum:
ASP.NET
Category:
Reporting
Environment versions
Environment:
ASP.NET
Database:
MS SQL Server
Miscellaneous
Thread ID:
01282389
Message ID:
01282447
Views:
7
Thanks, I found what I was looking for - can't be much simpler than this:

CrystalDecisions.CrystalReports.Engine.ReportDocument report;
report = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
string rptFile = Server.MapPath("Invoice.rpt");
report.Load(rptFile);
report.SetDataSource(ds);
// Test Export PDF directly to browser
report.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Response, false, "ExportedReport");

>>When you use the Cryatal Reports control it creates a preview in HTML and then clicking on a print button in a toolstrip generates another browser window that has export options and then pressing a button on that page creates the PDF.
>>
>>I'd like to just have the user click on a button and go directly to the generated PDF. Can this be easily accomplished?
>
>Yes very easily :)
>Kevin's awesome article will tell you everything (about CR) you need to know.
>http://www.code-magazine.com/Article.aspx?quickid=0501071
Regards,

E.R. Gilmore
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform