Jump to content

Recommended Posts

Hi hkwall22,

 

Please follow the next steps to display the total number of records without showing the rows of data:

1) Add 'Autonumber' DataType in the table;

2) Create 'Tabular Report' DataPage with 'Autonumber equal 1' pre-defined criteria;

3) Add only Calculated Field on the 'Configure Results Page Fields' step: SELECT COUNT(autonumber_name) FROM table_name.  

You can read details in the article.  

 

Hope it helps.

Share this post


Link to post
Share on other sites

Hello;

 

I have the same need in a number of places in my app.  I have never been able to add a calculated field without a field to calculate.  In my experience you need at least one field in the results page to COUNT or any other calculation for that matter.

 

My Workaround:

1) Add the Aggregate (COUNT or COUNT NON-BLANK)

2) Choose Advanced tab -> Display Options -> Above Data

3) Put the DataPage in a div with the following styling

<div class="exDivClass">
<h2>All calls before 1PM</h2>
<script type="application/javascript" src="http://b5.caspio.com/scripts/e1.js"></script>
<script type="application/javascript">try{f_cbload("***","http:");}catch(v_e){;}</script>
</div>


.exDivClass{overflow: hidden; height: **px;}
/* overflow: hidden will hide whatever doesn't fit in the div */
.exDivClasstr:nth-child(1) {display: none;}
/* this will remove the blank row on top of the aggregate */
.exDivClass tr:nth-child(3) {line-height: 300%;}
/* the will add space below the aggregate so it looks like the aggregate is all that's there */

 

You might even be able to reduce the number of records displayed to speed up page load, as I've noticed these Aggregates load much slower than a normal DataPage.  I use iframes so all DataPages load at once rather than once at a time.

 

Hope this helps

Share this post


Link to post
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.

Guest
Reply to this topic...

×   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.

Loading...

×
×
  • Create New...