

Since we are using an Rpx based file for our SubReport ,we will need to make sure that we load the Rpx file to an ActiveReports instance( if you are guessing how ?The LoadLayout method is here for the rescue). Now our next task is to Pass the parameter value to the subreport. In the Parent Report, we have created a parameter and set its value that we want to Pass to the SubReport (Refer lines 3 to 8).
#Activereports 7 toolbar items click code
The Solution involves creating a simple application where are going to Set a Parameter value in the Parent Report and then pass the parameter to the SubReports as well, now lets dwell into the code at work and see in actionĬode for the Parent Report: 1: public void ActiveReport_ReportStart()ĥ: myParam1.Type = Ħ: myParam1.Value = "This Value Passed from Parent Report" ĩ: Subrpt = new () ġ0: Parameter myParam2 = new Parameter() ġ3: myParam2.Type = ġ7: = ġ8: = Subrpt You can see that all the job here is done by the Parent Report itself, i.e it is responsible for getting the parameter value and passing it across to the SubReport.

So if you think that it might to too much to ask for from ActiveReports, then read ahead and be proved otherwise. We may however find our selves in a predicament where not only do we need to pass the parameter to the Report but also pass this parameter to a Subreport contained in this report. Usually we would pass parameters from our Web Page or the Windows form to the “Report” and generate a report based on these parameters. We know that ActiveReports supports passing parameters to report and if you are wondering what I meant, then you should probably give this article a read before moving any further.
#Activereports 7 toolbar items click series
I guess it was time that we made some additions to the “ActiveReport for Dummies” series and in the process give our customers something to cheer about.
