Support Article
Report Schedule does not work with subreports
Summary
Report Schedule does not work for report definitions. On configuring subreports, the Report Schedule fails when it is run as a scheduled task.
Error Messages
Attempting to access a rule with a bad defined-on class: Trying to open rule "XXXXXX" of class "Rule-Access-Property", but no defined-on class (pyClassName) was specified.
Steps to Reproduce
- Create a report definition with a subreport configured in the Data Access tab.
- Use the subreport property in the main report for filter conditions and as input for any function using an alias name for the property.
- Schedule the report to run at a specific time.
Root Cause
A defect in Pegasystem's code or rules. In the subreport, for fields, the class name was not set for alias. The Report Schedule failed when privileges for the associated property (alias) was checked. This occurred since the class name was empty.
Resolution
Perform the following local-change.
- Save As Pega-ScheduledTask-Reporting pyExecuteTask activity to the application ruleset.
- Replace the below code:
//Code to convert Clipboard pagelist to Array list
ClipboardPage cpResults = tools.findPage("cpResults");
resultsList = cpResults.getProperty(".pxResults");
iter1 = resultsList.iterator();
while (iter1.hasNext()) {
resultProp1 = (ClipboardProperty) iter1.next();
resultPage1 = resultProp1.getPageValue();
listOfFields.add(new com.pega.pegarules.priv.IPropertySecurity.PropertySecurityInfo(resultPage1.getString(".pyClassName"), (resultPage1.getString(".pyPropertyName")).substring(1)));
}
with the below code snippet:
//Code to convert Clipboard pagelist to Array list
ClipboardPage cpResults = tools.findPage("cpResults");
resultsList = cpResults.getProperty(".pxResults");
iter1 = resultsList.iterator();
while (iter1.hasNext()) {
resultProp1 = (ClipboardProperty) iter1.next();
resultPage1 = resultProp1.getPageValue();
if(!resultPage1.getString(".pyClassName").isEmpty() && resultPage1.getString(".pyClassName") !=null ) {
listOfFields.add(new com.pega.pegarules.priv.IPropertySecurity.PropertySecurityInfo(resultPage1.getString(".pyClassName"), (resultPage1.getString(".pyPropertyName")).substring(1)));
}
}
Published March 23, 2018 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.