Question

10
Replies
4239
Views
Chunzhi_Hong Member since 2013 137 posts
PEGA
Posted: 4 years ago
Last activity: 4 years 8 months ago
Closed
Solved

7.1.9 How to pass parameters from main report to sub report

According to prhelp document it is possible to pass parameters from main report to sub report.

Subreport parameters

If the subreport has input parameters, select the Auto-populate parameter values from the main report box, if you want the subreport parameters to have the same values as the corresponding parameters in the main report. This assumes that these parameters exist in both reports.

Otherwise, specify values for the parameters of the subreport.

However, I couldn't make it happen on my local PE. Am I missing something here?

Main reportSub Report
report-pass-param-main-query.JPGreport-pass-param-sub-query.JPG
report-pass-param-main-parameter.JPGreport-pass-param-sub-parameter.JPG
report-pass-param-main-subreport.JPGreport-pass-param-sub-index-join.JPG

report-pass-param-main-subreport-config1.JPG

report-pass-param-main-subreport-config2.JPG

Below is the SQL which is found in the clipboard page, "pyReportContentPage".

SELECT "PC0".pxhistoryforreference AS "pxHistoryForReference" ,

  "PC0".pxtimecreated              AS "pxTimeCreated" ,

  "PC0".pyperformer                AS "pyPerformer" ,

  "PC0".pymemo                     AS "pyMemo" ,

  "OP".SRCOL3                      AS "pyAccessGroupAdditional"

FROM personaledition.pr_history_data "PC0"

INNER JOIN

  (SELECT "OP".pyuseridentifier  AS "srcol1" ,

    "OP".pyusername              AS "srcol2" ,

    "AG".pyaccessgroupadditional AS "srcol3" ,

    "OP".pzinskey                AS "pzinskey"

  FROM personaledition.pr_operators "OP"

  INNER JOIN personaledition.pr_index_operators "AG"

  ON ( ( "OP".pzinskey      = "AG".pxinsindexedkey )

  AND "AG".pxobjclass       = ?

  AND "OP".pxobjclass       = ? )

  WHERE "AG".pxindexpurpose = ?

-- AND AG.pyaccessgroupadditional = ? <-- If the parameter had been passed to the sub report, then sub query should have included this filtering condition which is missing.

  ) "OP" ON ( ( "OP".SRCOL1 = "PC0".pyperformer )

AND "PC0".pxobjclass        = ? )

WHERE ( "OP".SRCOL3         = ? )

ORDER BY 1 ASC,

  2 DESC

pyPreparedValues(1) AdditionalAccessGroup

pyPreparedValues(2) Index-Operator

pyPreparedValues(3) Data-Admin-Operator-ID

pyPreparedValues(4) SR:Administrators

pyPreparedValues(5) History-Data-Admin-Operator-ID

Reporting
Moderation Team has archived post
Share this page LinkedIn