I need to load every report in a new web window, not in the one where the custom parameters capture is done.
I'm basically having:
- A page .ASPX wich contain an .ASCX wich contain controls to capture the parameters to be passed to the report.
- An aditional page "Reports.ASPX" wich contain the "CrystalReportViewer" and who is in charge of showing every report in my CS web project.
I basically do:
- In the Clic() event of the button which is in charge of launching the report:
// To create a dataset to feed the report according to user request
dsReport = GetReportDataSet(GetCurrentUserParams());
// To create the report object from the report class .rpt
CurrentReport = new MyReportClass();
// To asociate the created DataSet to the report object
CurrentReport.SetDataSource(dsReport);
// To pass ussing Session the report to the report form which contain the ReportViewer
Session.Add("CurrentReport",CurrentReport);
// To transfer the control to the pages wich is in charge of showing the report
Server.Transfer("Reports.aspx");
- In the Page_Load() event of the page "Reports.aspx"
ReportClass CurrentReport = (MyReportClass)(Session["CurrentReport"]);
CrystalReportViewer1.ReportSource = CurrentReport;
CrystalReportViewer1.Visible = true;
So, everytime, each report is loaded in the same iexplorer window, having to deal with further navigation issues, for instance, loosing navigation history when I send output to PDF instead of previewing it.
Changing targets in the Crystal Report Viewer doesnt work for the first call.
Ok, thanks a lot in advance, I hope it's clear enough my current approach to be improved in such way I mentioned..
L.