Example grid report template—CCACCB search Chunk text

  1. Create the following text template file and name it CCACCB-Srch-Grid.tpl.

    CCACCB-Srch-Grid.tpl

    {!-- Datasource-Aliases: RSAccreditationBodySearch --}
    {.loop in $RSAccreditationBodySearch as $AB}
    Accreditation Body: {$AB.Code}—{$AB.Description}
    {.onEmpty}
    No accreditation body data found.
    {/loop}

    Since this report template is to create a report of the search results in the CCACCB—Search Accreditation Body application, then the RSAccreditationBodySearch data source is, by default, available to the report template. Also, since the report template only uses the RSAccreditationBodySearch data source, then no DSC file is required to build others. Therefore the template only comprises the TPL file and no DSC file.

  2. Create the following report template using the CCTPLR—Report Template application:

    Organisation Scope: Selected

    Report Template Code: CCACCB-SRCH-1

    Name: CCACCB Search Grid

    Is Active: Selected

    Type: 00—Grid

    File: Upload the CCACCB-Srch-Grid.tpl file

    Report Engine: 03—Text

    Default Output Format: TXT—Text

    Output File Name: CCACCB_Search_Results.txt

  3. Create the following application preference using the CCPREF—Preference application:

    Scope: Instance, or other scope to restrict the report template availability when performing the export to report.

    Preference Name: SEARCH_REPORT_CCACCB

    Description: Accreditation Body search reports available

    Setting Type: STRING

    Setting Value: Add CCACCB-SRCH-1:Accreditation bodies returned from search to the comma-separated list of available templates.

    Preference Type: PREFERENCE

    Is Active: Checked

  4. Enter search criteria in the CCACCB—Search Accreditation Body application and click Search.

    Note: Until a search is performed, the Export to report button is unavailable. Entering new search criteria also makes this button unavailable.

  5. Click Export to report to open the Export to Report dialog and enter the following report details:

    Report Template Code: CCACCB-SRCH-1

    Download: Selected

  6. Click OK to generate the grid report.

    The RSAccreditationBodySearch result set is provided from the CCACCB—Accreditation Body application to the report template.

  7. Click the Click to download button, then click the button showing the name of the downloaded file to open and view the report.