HekimaWallaceQualls Posted January 19, 2015 Report Share Posted January 19, 2015 I want to display the total number of records in a table without showing the rows of data. For instances, if the record count is 21, I just need 21 but I don't need any other data. Quote Link to comment Share on other sites More sharing options...
iren Posted January 20, 2015 Report Share Posted January 20, 2015 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. Quote Link to comment Share on other sites More sharing options...
LWSChad Posted January 20, 2015 Report Share Posted January 20, 2015 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.