G
Guest
Hi, The first part of this code def works as i have an export function which
saves my crystal report, as a pdf, to disk. However they want to be able to
view them before deciding to save them. I have just started learning about
the CRviewer and have added the three lines at the bottom, but it fails on
showFirstPage (object not set to an instance of an object). How do i get my
report to show on the browser using the crystal report viewer (and as
importantly, in a new window)? if not can I use ExportOptions to show a pdf
not yet saved to disk?
I have found very very little help on this subject in msdn and other forums,
even books..anyone know ?
ReportDocument report = new ReportDocument();
report.Load(Server.MapPath("CrystalReportTemplates/Invoice.rpt"));
report.RecordSelectionFormula="{vueInvoice.InvoiceID} =" + invoiceid;
//attach login info to the report
TableLogOnInfo LogOn = new TableLogOnInfo(); etc etc
report.Refresh();
CrystalReportViewer viewer = new CrystalReportViewer();
viewer.ReportSource = report;
viewer.ShowFirstPage();
saves my crystal report, as a pdf, to disk. However they want to be able to
view them before deciding to save them. I have just started learning about
the CRviewer and have added the three lines at the bottom, but it fails on
showFirstPage (object not set to an instance of an object). How do i get my
report to show on the browser using the crystal report viewer (and as
importantly, in a new window)? if not can I use ExportOptions to show a pdf
not yet saved to disk?
I have found very very little help on this subject in msdn and other forums,
even books..anyone know ?
ReportDocument report = new ReportDocument();
report.Load(Server.MapPath("CrystalReportTemplates/Invoice.rpt"));
report.RecordSelectionFormula="{vueInvoice.InvoiceID} =" + invoiceid;
//attach login info to the report
TableLogOnInfo LogOn = new TableLogOnInfo(); etc etc
report.Refresh();
CrystalReportViewer viewer = new CrystalReportViewer();
viewer.ReportSource = report;
viewer.ShowFirstPage();