Posted 29 April 2020, 8:56 pm EST
Hi!
I am using a licensed Version of ActiveReports 11. I am using also Section Report (Cade based):
In the Detail_Format section I’ve defined the following:
Dim _SubReport As arSubRerpot = Nothing
Where arSubRerpot is an external report, that is in the design time three times inserted under the names arSubRerpot1, arSubRerpot2, arSubRerpot3
The used Code looks like this:
Dim dt As DataTable ….
Dim i As Integer
For Each dr As DataRow In dt.Rows
Select Case i
Case 1
arSubRerpot1.Report = New arSubRerpot
_SubReport = arSubRerpot1.Report
Case 2
arSubRerpot2.Report = New arSubRerpot
_SubReport = arSubRerpot2.Report
Case 3
arSubRerpot3.Report = New arSubRerpot
_SubReport = arSubRerpot3.Report
End Select
SubReport = Nothing
I += 1
Next
This works fine!
Now I am having the problem, that the number of subreports is undefined, it may be 1 or 10 …
I am looking for a way to add the subreports programmatically and not in the design time.
Thank you in advance