I know this is another question about performance...
But i've read some Topic that's talk about that, and i think i used the right way, but i want to be sure

I've made report who load Data with Stored Procedure. I've export my report as .CS file, and create in my projet an Assembly who contains all of my report in .CS.
In server part (we used WCF), I export in pdf (to save in DataBase and return file on the client part) or savedocument (and return this to displayed in viewer on the client part) my report. I export very large report (more than 17000 pages), and user's pc are not powerfull (4Go RAM). I don't have any error with my development pc (16 Go RAM), and if i do smaller report (of course

More over, i observed that i can generate more larger pdf export than a SaveDocument (for a viewer display).
So this is an example of what i do :
Code: Select all
MemoryStream myDocument = new MemoryStream();
//Instanciate my report
StiReport report = null;
report = new MyReport1();
OR
report = new MyReport2();
OR
report = new MyReport3();
//Change the connectionString
string connectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString;
report.Dictionary.Databases.Clear();
report.Dictionary.Databases.Add(new Stimulsoft.Report.Dictionary.StiSqlDatabase("Name", "Name", connectionString, false));
//Add references assembly (Contains business object that contains parametrers for stored procedure)
List<string> assemblies = report.ReferencedAssemblies.ToList();
assemblies.Add(System.Reflection.Assembly.GetAssembly(typeof(MyTypeOfBusinessObject)).Location);
report.ReferencedAssemblies = assemblies.ToArray();
report.RegBusinessObject("Obj1", new GeneralsParameters() {...});
report.RegBusinessObject("Obj2", new SpecialParameters() { ...});
report.Render();
//in different case :
report.SaveDocument(myDocument);
OR
report.ExportDocument(Stimulsoft.Report.StiExportFormat.Pdf, myDocument);
//Others code lines who persist generated files
return myDocument;
Best regards,
Morgan.