Example grid report template—CCSAMP search Chunk text

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

    CCSAMP-Srch-Grid.tpl

    {!-- Datasource-Aliases: RSSampleSearch --}
    {.loop in $RSSampleSearch as $Sample}
    current Sample is called {$Sample.SampleCode}
    {.onEmpty}
    No sample data found.
    {/loop}

    Since this report template is to create a report of the search results in the CCSAMP—Search Sample application, then the RSSampleSearch data source is, by default, available to the report template. Also, since the report template only uses the RSSampleSearch 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: CCSAMP-SRCH-1

    Name: CCSAMP Search Grid

    Is Active: Selected

    Type: 00—Grid

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

    Report Engine: 03—Text

    Default Output Format: TXT—Text

    Output File Name: CCSAMP_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_CCSAMP

    Description: Sample search reports available

    Setting Type: STRING

    Setting Value: Add CCSAMP-SRCH-1:Samples returned from search to the comma-separated list of available templates.

    Preference Type: PREFERENCE

    Is Active: Checked

  4. Enter search criteria in the CCSAMP—Search Sample 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: CCSAMP-SRCH-1

    Download: Selected

  6. Click OK to generate the grid report.

    The RSSampleSearch result set is provided from the CCSAMP—Sample 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.