I have a master report and a subreport. The master report has a section that is assigned a data source and creates a line for each item in the data source, and one segment of that section is the subreport. This is all done in UI, not programmatically. The parameters are set up and sent properly, and if I just assign the parameters to a textbox in the subform, they are rendered properly. However, I need that subreport to take a parameter and do some programmatic work, not just assign it to a field with UI configurations. In this case, it reads a string parameter, calls other code with that string to generate more data, and uses that data to draw custom text objects on the form.
The parameter passing to a field works fine. The code that reads does the extra building works fine. What doesn't work is that the code in the subform is unable to read the parameters. If I read ReportParamters.Value in the constructor method of the subform, it returns the default value of the parameter, not the value that shows up in the textbox. I have tried capturing each of the raised events and testing on those points, all with the same results. So far, it appears that the ReportParameters are not passed to the subform until all of the code-based events have transpired. If I try to read the text-box programmatically, the value given is the formula for the parameter, not the value of the passed parameter. Is there an event that I am missing, or is a subform just not expected to do any programmatic work with the parameters given?