reporting posteReport = new reporting(); posteReport.DoPDF(Session, Request, Page, ref myReport);
that way any page and any ReportDocument can be exported to PDF with very litte extra effort
don't forget to repopulate the data as well before calling the ExportPDF code...
and for the Push Model... up until now i've been using the Pull model with SQL Server 2000, but since i have Stored procedures with 15 parameters and seeing as CR.NET hates it when a report is linked to a Stored Procedure that has logic and if clauses, throwing all sorts of errors... i decided to go with the Push model.
Four steps to do: __creation__ -define a dataset file (CR gets its field references here) -build the report using dataset file as source (dataset file can then be deleted.....) ___run time____ -fill a dataset object in the code (which creates a datatable within the dataset) -associate the report to the dataset object
it all works well, until Boom!, run time gives you a nice Engine Exception : Query Error of some kind (don't have the exact term, using a french version)
the trick is, give the dataset a name... and also give this same name to the datatable you create in step 3.