Jump to content
  • 0

Grouping List Report



5 answers to this question

Recommended Posts

  • 1

Hello @ServiceBreez

Sorry for the delay,  please check the steps below regarding to the 3rd suggestion:

Important Field(s) to accomplish this: 

ID (Autonumber)

GroupField (Text255)

The idea here is to display the Group field in every first occurance of the group in the report, using a Calculated field and HTML.

Step 1: Create a table containing the mentioned fields

Step 2:  Create a List DataPage and use the table.

Step 3:  Add a HTML Block, that will display the GroupField Like this:

<h3 style="background: rgb(238, 238, 238); border: 1px solid rgb(204, 204, 204); padding: 5px 10px;"><span style="color:#FF0000;">[@field:GroupField]</span></h3>

Step 4: Add a "Calculated Field" that will SELECT the minimum/first record occurance in every Group and use a CASE statement that will hide the  "Grouping Label" is condition not met. Like this:

CASE WHEN ( (SELECT MIN(ID) FROM TableName  WHERE GroupField=target.[@field:GroupField]) = [@field:ID])

ELSE 'none !important'

Step 5:  add a Style function and use the calculated field value to  hide the  Grouping label in the other record that doesn't met the condition:

<h3 style="background: rgb(238, 238, 238); border: 1px solid rgb(204, 204, 204); padding: 5px 10px; display: [@calcfield:1];"><span style="color:#FF0000;">[@field:GroupField]</span></h3>

Notice the "display: [@calcfield:1];" in the code.

Step 6: Hide the Calculated field in the report using this code:
Refer to this link: https://howto.caspio.com/tech-tips-and-articles/common-customizations/how-to-hide-fields-in-datapages/

<table style="display:none;"><tr><td>

Make sure that you enclose the calculated field with the HTML Block wit hthe code:

Step 7:  Use the ID as the Default sort order field:


You may test it out here:


I have also attached the DataPage and Dependencies for you reference.


I hope this helps :) 


Link to comment
Share on other sites

  • 0

Hi @ServiceBreez,

As I know there is no Grouping feature in the "List DataPage"  in a standard way. Here's what I think you can do:

  • Sort the records by the field you want instead, for them to be ordered:
  • Create a multiple List DataPage that is filtered base on your Groupfield (not recommended)
  • Or you can do a custom code(JavaScript) that display the HTML Block below in every first occurrence per/base on GroupField. (If you do this, make sure that the record is sorted as well)


I hope the suggestions helps. 

Link to comment
Share on other sites

  • 0

Hi @WatashiwaJin - thank you for that suggestion. 

With regards to the multiple List Datapage, are you suggesting multiple datapages on a webpage?  Or is there something actually called a multiple list datapage?

It sounds like the javascript option sounds promising.  I am not familiar with how to display based on every first occurrence.  Is there a sample you might be able to point me too?


(BTW, your creativity is amazing!)

Link to comment
Share on other sites

  • 0

Thank you @ServiceBreez :)

What I suggesting in the second part is "Multiple DataPage on a WebPage" (This is not recommended because it will cause you a lot of DataPage depending on your Group(s)) but if you want to do this, you need to do a seperate search and report DataPage (https://howto.caspio.com/tech-tips-and-articles/tech-parameters/how-to-separate-search-page-and-results-page-into-two-different-webpages/) and alter the system message "No Records found" so when you search for a specific group, that message won't appear in the other DataPage.  Check here on how to change it:


As for the 3rd suggestion, I was thinking that this is also possible with the use of calculated fields + HTML combination without using JavaScript. Let me try that and get back to you :) 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...