Create a Shell Report and Link it to Sub-Report

The AllCrystalReportsSearchWrapper stored procedure (i.e. the stored procedure used by the Core Reporting Model) must receive several parameters from the user interface (User ID, Report ID, Select String, Where String, View Name), in order to display properly. However, the dashboard interface only passes through a single parameter (user ID). Thus, you must first create a shell report that only receives this single parameter, and then link it to the sub-report.

  1. Open this starter Shell report (refer to the separately provided .rpt file).
  2. From Crystal Reports, select “Set Data Source Location”, and replace the “Current Data Source” with the appropriate data source / server for your report.

  3. Insert the sub-report into the shell report.

    Core Reporting Model - Sub Report

    Notes:

    • Use File / Page Setup to set margins of the report as appropriate for your dashboard. The sample dashboard shell provided in this document is designed to fit into a 3 X 3 dashboard in the Governance Portal.
    • The sub-report is the report created using the AllCrystlReportsSearchWrapper stored procedure.
    • After inserting the sub-report, you must - link it to the main report. The sub-report needs to receive several key parameters (User ID, Report ID, Select String, Where String, View Name). You need to create formulas that will pass these parameters to the sub-report.

  4. Update the formulas provided in the sample Shell report based on the parameters for your specific report.

    Formula

    Update

    Parameter_RptID

    No change required; this formula should always be: 0

    Parameter_SecWhereStr – no change

    No change required; this formula should always be: “”

    Parameter_SelectStr

    Update this formula. Copy the select string from the sub-report’s @SelectStr parameter into this formula field (refer to Step 2-3 in the section, “Download and Develop the Crystal Report”). The shell report needs to tell the sub-report that it wants to get these fields from the core reporting view. The formula should look something like this:

    "OrgUnitName,RCMStatus,ObjvName”

    The fields contained within the quotes are the same fields in the sub-report’s @SelectStr parameter.

     

    Parameter_UserId

    No change required; this formula should always be: floor({RptDataShell;1.UserId})

    Parameter_ViewName

    No change required; this formula should always be: RptConfigViewProcRskMatCoreSearch

    Parameter_WhereStr

    Update this formula. Copy the select string from the sub-report’s @WhereStr parameter (refer to Step 4 in the section, “Download and Develop the Crystal Report”) into this formula field. The shell report needs to tell the sub-report that it wants to filter the results from the core reporting model based on this set of parameters. The formula should look something like this:

    "AND ( [RCMStatus] IS NOT NULL )" where the text contained within the quotes is the same as the sub-report’s @WhereStr parameter.

  5. Right-click on the sub-report, and select Change Subreport Links.
  6. Highlight each parameter field from the Available Fields panel and click the > button to move it to the Field(s) to link to panel.

  7. Select ?@RptId from the Subreport parameter field to use drop-down list to link each of the parameters to its corresponding formula in the main report.

    Core Reporting Model - Subreport Parameter Fields Update

  8. Click OK to save the report.

See Also

Creating an In-Line Dashboard Report

Display the Report Dashboard in the Governance Portal

Create Custom Page to Fit Reports in the Dashboard