Examples: AddMyReport()

The following example trigger processing procedure uses the AddMyReport() function to add a simple report item to the Home Page template for a role. Notice how the items in the syReportData composite are filled in to indicate which report is being added.

in integer iUserRole;

local syReportData RptData;

{Add a simple report for all roles}
RptData:'Report Type' = REPORTTYPE_SIMPLE;
RptData:'Product ID' = IG_PROD_ID;
RptData:'Report Series DictID' = IG_PROD_ID;
RptData:'Report Series ID' = 1;
RptData:'Report ID' = ReptID_LeadsSimple;
RptData:'Report Option Name' = "Leads";
RptData:'DictID' = IG_PROD_ID;
RptData:'Resid' = resourceid(report IG_Leads);
RptData:'User ID' = 'User ID' of globals;
RptData:'My Report Name' = "Leads";

AddMyReport(RptData) of form syMyReportsObj;

Documentation Feedback