Hi,
I have many single page reports which contain unrelated data from differnt sources. I would like to allow the user to combine them into one 'report pack', so that they may use the export functionality to produse a PDF file.
I know I can do this manually by creating seperate pages & data bands, but is there any way to embed existing reports inside another report? I have looked at the subreport function but am afraid I don't understand how to use it.
Regards,
Jon.
Sub Report/Report Pack
Sub Report/Report Pack
Hello,
For the Sub-Report component you can set the Page or another report. As a way, you can try to put several SubReport components on one page and set for it links on another reports.
Thank you.
For the Sub-Report component you can set the Page or another report. As a way, you can try to put several SubReport components on one page and set for it links on another reports.
Thank you.
Sub Report/Report Pack
Aleksey,
Thank you for the response. Could you please tell me how I do this? I can see the 'Use External Report' property, but cannot figure out how to set the report it uses.
Also, I will obviosuly need to do this in code at runtime. I will need to link each subreport to each main report and then set the datasource for each, as each main report has it's own Connection/Table.
Could you please give me a vb.net example of how to do this?
Many Thanks,
Jon.
Thank you for the response. Could you please tell me how I do this? I can see the 'Use External Report' property, but cannot figure out how to set the report it uses.
Also, I will obviosuly need to do this in code at runtime. I will need to link each subreport to each main report and then set the datasource for each, as each main report has it's own Connection/Table.
Could you please give me a vb.net example of how to do this?
Many Thanks,
Jon.
Sub Report/Report Pack
Alesey,
Sorted it out. I use the following and it seems to work ok.
Dim ds As DataSet = New DataSet
Dim stiSub1 As New StiReport
Dim stiSub2 As New StiReport
Dim stiReportPack As New StiReport
With stiSub1
.Load(ReportPath & "\FirstReport.mrt")
.Dictionary.DataSources.Clear()
ds.ReadXmlSchema(ReportPath & "\FirstReport.xsd")
ds.ReadXml(ReportPath & "\FirstReport.xml")
.Dictionary.ImportXMLSchema(ds)
.RegData("Table", ds)
End With
With stiSub2
.Load(ReportPath & "\SecondReport.mrt")
.Dictionary.DataSources.Clear()
ds.ReadXmlSchema(ReportPath & "\SecondReport.xsd")
ds.ReadXml(ReportPath & "\SecondReport.xml")
.Dictionary.ImportXMLSchema(ds)
.RegData("Table", ds)
End With
With stiReportPack
.SubReports.Add(stiSub1)
.SubReports.Add(stiSub2)
.Render()
End With
Regards,
Jon.
Sorted it out. I use the following and it seems to work ok.
Dim ds As DataSet = New DataSet
Dim stiSub1 As New StiReport
Dim stiSub2 As New StiReport
Dim stiReportPack As New StiReport
With stiSub1
.Load(ReportPath & "\FirstReport.mrt")
.Dictionary.DataSources.Clear()
ds.ReadXmlSchema(ReportPath & "\FirstReport.xsd")
ds.ReadXml(ReportPath & "\FirstReport.xml")
.Dictionary.ImportXMLSchema(ds)
.RegData("Table", ds)
End With
With stiSub2
.Load(ReportPath & "\SecondReport.mrt")
.Dictionary.DataSources.Clear()
ds.ReadXmlSchema(ReportPath & "\SecondReport.xsd")
ds.ReadXml(ReportPath & "\SecondReport.xml")
.Dictionary.ImportXMLSchema(ds)
.RegData("Table", ds)
End With
With stiReportPack
.SubReports.Add(stiSub1)
.SubReports.Add(stiSub2)
.Render()
End With
Regards,
Jon.
Sub Report/Report Pack
Hello,
Great!
Have a nice day!
Thank you.
Great!
Have a nice day!
Thank you.