How To Return Value From Sub-Report

This recipe demonstrates how to return value from sub-report using parameter.

Steps taken:

  1. Create a main report (Master.rml) which references the sub-report (Sub.rml) in “Page Header” and “Section Header”. The sub-report contains the following data field with script in “Section Header”:(Data Field 0) Param
    (On Render End:) Param = 1;
  2. Add the following data fields with script in “Page Header”:(Data Field 1) "Param 1: "+Param(Data Field 2) "Param 2: "+Param(Data Field 3) "Param 3: "+Param
  3. Add the following data field with script in “Section Header”:(Data Field 4) Param
  4. Add the following data field with script in “Page Footer”:(Data Field 5) Param

HowToReturnValueFromSubReport

To download the necessary files for this recipe, refer to the attached ZIP file.
HowToReturnValueFromSubReport.zip (5.8 KB)