Page 1 of 1
SubReport UseExternalReport
Posted: Tue Oct 02, 2012 2:30 pm
by tpontow
Hello,
is it true that
Code: Select all
StiSubReport.UseExternalReport = true
does not work in Silverlight? No chance of loading a subreport from another report design file at runtime?
Regards
Thorsten Pontow
Re: SubReport UseExternalReport
Posted: Wed Oct 03, 2012 8:04 am
by Alex K.
Hello,
Please check the following code as example:
Code: Select all
private void button1_Click(object sender, RoutedEventArgs e)
{
StiReport report = null;
var sr = Assembly.GetExecutingAssembly().GetManifestResourceStream("SilverlightApplication1.Report1SubReport.mrt");
report = new StiReport();
report.GetSubReport += new StiGetSubReportEventHandler(report_GetSubReport);
report.Load(sr);
sr.Close();
sr.Dispose();
report.Render();
report.Show();
}
private void report_GetSubReport(object sender, StiGetSubReportEventArgs e)
{
StiReport report = null;
var sr = Assembly.GetExecutingAssembly().GetManifestResourceStream("SilverlightApplication1.Report2SubReport.mrt");
report = new StiReport();
report.GetSubReport += new StiGetSubReportEventHandler(report_GetSubReport);
report.Load(sr);
sr.Close();
sr.Dispose();
e.Report = report;
}
Thank you.
Re: SubReport UseExternalReport
Posted: Thu Oct 04, 2012 12:17 pm
by tpontow
Hello Aleksey,
your code works for Forms and Wpf but not for Silverlight. I did it a similar way but i used the OnGetSubReport() method which i have overwritten. But both ways did not work in Silverlight.
Thank you
Re: SubReport UseExternalReport
Posted: Fri Oct 05, 2012 7:04 am
by tpontow
Hello,
it looks as if i have some timing/synchronization problems in my application. I will have a deeper look on that and will come back later with more detailed information.
Thank you
Re: SubReport UseExternalReport
Posted: Fri Oct 05, 2012 12:31 pm
by Alex K.
Hello,
Ok.
Let us know if you have any additional information.
Thanky ou.