Support Article

Wrong query built up for RD when dependent classes checked

SA-37978

Summary



After running a report user is getting below error with Pega 7.2.1.

Error Messages



Error:
Text Input ** ** An error occured on executing the query for the report definition - There was a problem getting a list: code: 936 SQLState: 42000 Message: ORA-00936: missing expression DatabaseException caused by prior exception: java.sql.SQLSyntaxErrorException: ORA-00936: missing expression | SQL Code: 936 | SQL State: 42000


Steps to Reproduce

  1. Create Application in "Framework and Implementation" where application accelerator generates upto AA-FW-BBBFW-Work (FW Layer - Concrete class) & AA-Top-BBB-Work(Imp Layer- Concrete class [Division layer=Top]).
  2. Create Validation class in FW layer as AA-FW-BBBFW-Work-Validation where directed path set to AA-FW-BBBFW-Work.
  3. Create Validation class in Imp layer as AA-Top-BBB-Work-Validation where directed path set to AA-FW-BBBFW-Work-Validation.
  4. Create a RD(say MyActivityValidationSearch) in AA-Top-BBB-Work-Validation. Refer .pxCoverInsKey in the report definition and check the checkbox labeled with "Remove Duplicate Rows".
  5. Refer pxCoverInsKey again in the RD and change summarize field to 'count'.
  6. Run the RD and check the below error :

Error:
** ** An error occured on executing the query for the report definition - There was a problem getting a list: code: 0 SQLState: 42601 Message: ERROR: syntax error at or near "FROM" Position: 361 DatabaseException caused by prior exception: org.postgresql.util.PSQLException: ERROR: syntax error at or near "FROM" Position: 361 | SQL Code: 0 | SQL State: 42601


Root Cause



When Remove Duplicate Records is checked pyGetDistinctRecords property is set to True.

And it is not set to False when the user changes it to summary report.

Resolution



Apply HFix-34011 to resolve the issue.

Published May 15, 2017 - Updated May 25, 2017

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.