Question

10
Replies
4308
Views
Close popover
Chunzhi Hong (Chunzhi_Hong)
PEGA
Consulting Manager, Pega Consulting
Pegasystems Inc.
JP
Chunzhi_Hong Member since 2013 138 posts
PEGA
Posted: February 9, 2016
Last activity: February 10, 2016
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 report Sub Report
report-pass-param-main-query.JPG report-pass-param-sub-query.JPG
report-pass-param-main-parameter.JPG report-pass-param-sub-parameter.JPG
report-pass-param-main-subreport.JPG report-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,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.