error when trying to add components to Report !
Posted: Mon Sep 05, 2011 2:06 am
hello,
im trying to add components from report file (rep1.mrt ) to another blank report (report2.mrt) :
StiReport report1=new StiReport();
StiReport report2=new StiReport();
report1.load("rep1.mrt"); //this report just contains (PageHeaderBand + a text Component inside it) and (PageFooterBand + a text Component inside it)
StiComponentsCollection collection=report1.Pages[0].Components;
report2.Pages[0].Components.AddRange(collection);
report2.Show(); //
the problem is that the report Does not appear !!
also when i try to run designer >> report2.Design() , and then go to preview tab i got these 2 errors
1.Error! The error of compilation
The error of compilation is found in the 'Report' report:
Object reference not set to an instance of an object.
2.Error! The error of compilation
The error of compilation is found in the 'Report' report:
Object reference not set to an instance of an object.
how can i solve this ?
Thank You.
im trying to add components from report file (rep1.mrt ) to another blank report (report2.mrt) :
StiReport report1=new StiReport();
StiReport report2=new StiReport();
report1.load("rep1.mrt"); //this report just contains (PageHeaderBand + a text Component inside it) and (PageFooterBand + a text Component inside it)
StiComponentsCollection collection=report1.Pages[0].Components;
report2.Pages[0].Components.AddRange(collection);
report2.Show(); //
the problem is that the report Does not appear !!
also when i try to run designer >> report2.Design() , and then go to preview tab i got these 2 errors
1.Error! The error of compilation
The error of compilation is found in the 'Report' report:
Object reference not set to an instance of an object.
2.Error! The error of compilation
The error of compilation is found in the 'Report' report:
Object reference not set to an instance of an object.
how can i solve this ?
Thank You.