Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Display X number of records

edited Aug 19, 2021 3:44PM in Reporting & Analytics for B2C Service 7 comments

Summary

Display X number of records

Content

We want to create a top 10 report and only display the top 10 in the report results. I thought I had a example script I used for a top 100 but it is not working for a different top 10 report. Attached is what I have so far. Any guidance is greatly appreciated.

Code Snippet

global $x;
global $i;
if ($rows[0][0]->val==$x)
    {
    $i=$i+1;
    if($i>=10)
    unset($rows[0]);
    }
else
{
    $x=$rows[0][0]->val;
    $i=0;
}

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!