PostReport Class Methods
In this section, we discuss the PostReport class methods. The methods are discussed in alphabetical order.
Syntax
AddDistributionOption(DistIdType, DistId)
Description
Use the AddDistributionOption method to specify the users authorized to view the report once it is available in the Report Manager.
Parameters
Field or Control |
Definition |
---|---|
DistIdType |
Specify the distribution ID type as a string. This identifies if the value passed in the DistID is either a user or role. Values for this parameter are:
|
DistID |
Specify the distribution ID as a string. |
Returns
Returns a number: 0 if successful, 1 if the system detected an error in the parameter passed.
Example
The following example grants access to the VP1 user and all users associated with the MANAGERS role.
&POSTRQST.AddDistributionOption("User", "QEDMO" );
&POSTRQST.AddDistributionOption("Role", "MANAGERS");
Syntax
Put()
Description
The Put method inserts a request in the Report Manager table which runs according to the values in the properties of the PostReport object. In order to successfully schedule a process or job, certain properties are required.
Parameters
None.
Returns
None. If you want to verify that the method executed successfully, check the value of the Status property.
Example
&POSTRQST.Put();
&RPTINSTANCE = &POSTRQST.ReportId;
If (&RPTINSTANCE > 0) Then
MessageBox(0, "", 63, 119, "Successfully processed request with Rpt. ID %1 for Process %2 to post from directory %3", &RPTINSTANCE, &POSTRQST.ProcessName, &POSTRQST.SourceReportPath);
Else
MessageBox(0, "", 63, 122, "Not successful for process request for Process %1 to post from directory %2", &POSTRQST.ProcessName, &POSTRQST.SourceReportPath);
End-If;