Page 2 of 2

Big Problem with Report.Show

Posted: Wed May 16, 2007 8:08 am
by Edward
Please use the following code to initialize variable MyVar in the Compiled report.

Code: Select all

StiReport MyReport = new Stireport();
MyReport.Load(@"C:\Myreport.mrt");
..
MyReport.RegData(...);
..
MyReport.Compile();
MyReport.CompiledReport["MyVar"] = 1; 
MyReport.Render(false);
MyReport.Show(true);
MyReport.CompiledReport["MyVar"] = 2;
MyReport.Render(false);
MyReport.Show(true);
In the build from May, 17 your code will work as

Code: Select all

MyReport["MyVar"] = 2; 
correctly.

Thank you.

Big Problem with Report.Show

Posted: Wed May 16, 2007 9:15 am
by EDV Gradl
Thanks for the hint.

Marco

Big Problem with Report.Show

Posted: Wed May 16, 2007 11:38 am
by Vital
We restore our previous code. So your code:

Code: Select all

StiReport MyReport = new Stireport();
MyReport.Load(@"C:\Myreport.mdc");
MyReport.Compile();
MyReport["MyVar"] = 1; // Value is set
MyReport.Render(false);
MyReport.Show(true);
MyReport["MyVar"] = 2 // Valus is not set
Will be work fine.

Thank you.