error when trying to add components to Report !
error when trying to add components to Report !
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.
error when trying to add components to Report !
Hello.
Please, send us a sample report with data to reproduce the issue.
Thank you.
Please, send us a sample report with data to reproduce the issue.
Thank you.
error when trying to add components to Report !
Hello.
If you want to copy all report you can simply copy the report:
Thank you.
You copy only components, but no Data Source.Dejoni wrote:im trying to add components from report file (rep1.mrt ) to another blank report (report2.mrt) :
the problem is that the report Does not appear !!Code: Select all
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(); //
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 ?
If you want to copy all report you can simply copy the report:
Code: Select all
report2 = report1;
error when trying to add components to Report !
hi Aleksey ,thank you for your answer,
actually i don't use any data Sources in the report , also i don't need to copy all the components in the report i just need to copy some Components (header and footer).
Thank you.
actually i don't use any data Sources in the report , also i don't need to copy all the components in the report i just need to copy some Components (header and footer).
Thank you.
error when trying to add components to Report !
Hello,
Sorry for the delay with response. We need some additional time to prepare the sample for you.
Thank you.
Sorry for the delay with response. We need some additional time to prepare the sample for you.
Thank you.
error when trying to add components to Report !
hi Aleksey ,
are there any samples ?, please guide me on how to solve this problem ....
Thank you.
are there any samples ?, please guide me on how to solve this problem ....
Thank you.
error when trying to add components to Report !
Hello,
You can use the following code, for example:
Thank you.
You can use the following code, for example:
Code: Select all
StiReport report1 = new StiReport();
StiReport report2 = new StiReport();
report1.Load(@"d:\test1.mrt");
StiPage newPage = report2.Pages[0];
newPage.Components.AddRange(report1.Pages[0].Components);
foreach (StiComponent comp in newPage.GetComponents())
{
comp.Page = newPage;
}
report2.Show();
error when trying to add components to Report !
We have been so glad that we purchased your software...
keep up the good work :biggrin:
Thank you.
keep up the good work :biggrin:
Thank you.
error when trying to add components to Report !
Hello,
Thank you very much for choosing our product.
We shall!
Have a great day.
Thank you.
Thank you very much for choosing our product.
We shall!
Have a great day.
Thank you.