Accessing Main Report Parameter in SubReport
Using RB Ent 10.07. In an OnGetText event in a subreport, I want to be able
to access the main report's parameters. In the main report, I would do:
Report.Parameters['param1']
But trying this in the subreport gives me an error "Expected '(' or '[', but
found 'Parameters' instead"
Thanks,
David
to access the main report's parameters. In the main report, I would do:
Report.Parameters['param1']
But trying this in the subreport gives me an error "Expected '(' or '[', but
found 'Parameters' instead"
Thanks,
David
This discussion has been closed.
Comments
For future reference, please post RAP questions to the RAP newsgroup. This
helps us and others understand the issue better and provide a quick and
accurate answer.
The reason you are getting an error is that the subreport (TppChildReport)
object does not have a Parameters property. In order to access any main
report properties or values from a subreport in RAP, you will need to use
Global Variables. Creating a global variable for each passed parameter or
perhaps using a single TStringList to hold the parameters will give you
access to these values when coding inside the subreport.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com