Using an External Report
Using an External Report
I'm trying to use the External sub report feature and have looked at the other forum posts, but am having difficulty using it correctly. I have a very limited understanding of VB and c# and have no experience trying to translate one to the other. All the reports I have created so far are in VB and have had a co-worker write some VB functions that we use in the report so looking at the other examples and trying to figure out the correct syntax in c# and translate that to VB has been unsuccessful so far. I have also tired looking at the example reports in the other forums posts about this topic but again have been unsuccessful seeing where the external report event is being called out. Any direction on getting this feature working in a VB report would be greatly appreciated. Thanks!
Using an External Report
Hello,
You can use the following code:
Thank you.
You can use the following code:
Code: Select all
...
Dim report As StiReport = New StiReport()
report.Load("E:\\Report.mrt")
AddHandler report.GetSubReport, AddressOf report_GetSubReport
report.Render()
report.Show()
...
Private Sub report_GetSubReport(ByVal sender As Object, ByVal e As StiGetSubReportEventArgs)
Dim subReport As StiReport = New StiReport()
subReport.Load("e:\\Report1.mrt")
e.Report = subReport
End Sub