A Container Report is a report which may be run or Scheduled and will in turn spawn off different reports that can be run and emailed to different users.
In the following example a report will be built which will spawn reports for distribution to Contract Managers.
Create a New Function for the container report
Function Code | Initials + Exercise No.e.g. xxBI0008 |
Function Description | Description identifier.e.g. Container Report |
Function Module | Contract Status |
Function Category | Report |
Function Context | Leave as defaulted from the Function Description. |
Function Program | wou005 |
Set up the Page
Set up the page section xxM2Exercise4 using Page Designer. Click Add
to create the new Page and fill in the fields as follows (leave the others blank):
Page | Give the page section the same name as the function created. |
Form Service Procedure | jcfrep.p |
Click Save
to save the new Page. Coins ERP+ returns to the summary for the page section being created.
Add the Page Section Forms
Select the Form tab create an Update form.
Click the
Add Button and enter the following information to create the Form :
Form | Update |
Field Type | Update |
Linked To | Leave blank |
Click the Save Button
to create the form.
Add the Fields
In the Field Tab go to the FORM selector at the bottom of the page, select Update and click Apply Filter.
You should always do this to ensure you are adding fields to the correct form β adding fields to an incorrect form will mean that they do not display.
Add the Field, leaving Field and Label blank :
In the Generate field, enter jcfrep.jobSelectionGenerate. This is the standard selection generator for contracts.
Click the Save Button
to create the field.
Create the Container Report
Create the Container Report xxM2Exercise4 β No header table is required
Body Tablejc_job
QueryFOR EACH jc_job WHERE jc_job.kco = {kco} {jobSelect}
Sortjc_job.job_fore+
Detail Level1
Add a Body form
Add the following field to the body form
Field | job_fore |
Label | Manager |
Function | FunctionName&jc_jobRowid={jc_jobRowid} |
View-As | Report |
FunctionName | should be the function name of the report to be generated from the container β use xxM2Exercise4a (replacing xx with your initials). |
Create the function for the Report to be generated by the Container
Function Code | Initials + Exercise No.e.g. NLM2Exercise4a |
Function Description | Description identifier.e.g. Container Report Contents |
Function Module | Contract Status |
Function Category | Report |
Function Context | Leave as defaulted from the Function Description |
Function Program | wou005 |
Report Parameters | Use the Report Selection page from the Container with stn_code=FunctionName and pass the contract manager code from the container report through to the generated report with the parameter &job_fore={job_fore} |
Create the Report to be spawned from the Container
Create the Container Report xxM2Exercise4a
Header Table | co_config,jc_config |
Body Table | jc_job |
Use the Query to pass the contract manager code from the container report as a required condition for the spawned report
FOR EACH jc_job WHERE jc_job.kco = {kco} AND job_fore = '{job_fore}'
Sort | jc_job.job_fore+ |
Add a body form and to this form add the following fields
Field | Label | Width |
job_num | Contract | 25mm |
job_name | Contract Name | 35mm |
RO_ContractCosts^TD | Costs TD | 20mm |
RO_ContractRevenue^TD | Revenue TD | 20mm |
Results
Run the Container Report. The output on the Report Status Workbench should be similar to that shown below:
Note, however that there is no easy way to identify which report goes to whom. This can remedied by a small change to the function:
Return to the function definition for xxM2Exercise4a and in the description field add {RO_job_fore_Desc} to the end of the context description.
This will instruct the function to display the Manager name alongside the report name in the print Queue.









