Question

5
Replies
232
Views
Shiva_Ramasamy Member since 2012 2 posts
Cognizant
Posted: April 7, 2016
Last activity: April 12, 2016
Closed

Report Definition - Custom HTML fragment called twice when clicked on page 2

We have report definitions that can return data for multiple pages of page size of 25 or more based on each report definition. For logging a NPI data, we developed a custom HTML fragment that would call an activity which will in turn insert records into a custom proprietary table. This works fine for page 1 of the report definition. When we click either next or '2' link, it calls the custom HTML fragment twice against only once. This custom HTML fragment is defined in report definition under Design tab (Format values area). See attached for details. We have tested with multiple report definitions in various applications and result is same.

Steps to Reproduce

Create a report definition , have data for multipage, configure a custom HTML fragment that could call an activity. See what happens when you click next or page 2 or 3 and so on.

No error message but inconsistent system behavior between first page invocation display vs multi-page display.

Suppose if there are 93 records and 50 records page size, here is the outcome.

• Page 1 invocation – For each row of the output resultset, this activity was called through custom HTML fragments (50 times in page 1 but we have a criteria to exit if index is > 1 for row numbers greater than 1).

o Custom fragment called 50 times but only executed once due to exit condition on index parameter of the pagelist.

• Page 2 invocation – For each row of the output resultset, this activity was called through custom HTML fragments (43 * 2 times in page 2 but we have a criteria to exit if index is > 1 for row numbers greater than 1).

o So for some reason, index = 1 comes twice, thereby resulting in executing this activity 2 times (out of 43 *2) instead of 1 times (out of 43 * 1)

Can someone explain this behavior and help us identify a solution where it doesn't call activity twice in page 2 vs page 1?

Pega Customer Service Reporting
Moderation Team has archived post
Share this page LinkedIn