Add Sequence No to Report (Custom View)

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
vintoICT
User
Posts: 389

Add Sequence No to Report (Custom View)

Post by vintoICT »

The sequence no option is not available in my custom view report (I generated a report from a custom view table) How do infix this pls


arbei
User
Posts: 9288

Post by arbei »

There are grouping fields in reports, so the Sequence Number feature is not applicable. You need to add the sequence number in the Custom View, for example, if you use MySQL, you may google "mysql row number" for more information.


vintoICT
User
Posts: 389

Post by vintoICT »

Thank u. This will fix it. But also discovered that even in regular export (not custom view or report. ) When I export , the SN No column is not displayed. It only shows in browser. How can this be solved ?. Thank u


arbei
User
Posts: 9288

Post by arbei »

You may use the same method so that the row number is from the database (not added by PHP code).


vintoICT
User
Posts: 389

Post by vintoICT »

Issue solved this is working

SELECT ROW_NUMBER() OVER( ORDER by a.MDA_id) AS #, a.Year_of_Aquistion, a.MDA_id, b.MDA_Acronym , b.MDA , COUNT(*) ,sum(a.Aquistion_Cost) FROM assetstbl a, mdatbl b WHERE a.MDA_id= b.MDAID GROUP BY a.MDA_id, b.MDA_Acronym,b.MDA


mobhar
User
Posts: 11660

Post by mobhar »

vintoICT wrote:

but its failing in phpmaker custom view

You should always use Database View instead of PHPMaker's Custom View as possible.


vintoICT
User
Posts: 389

Post by vintoICT »

I just discovered that when i filter the report , my serial number fails. Intead of 1, 2, 3... i get the number on the serial number row. . e.g 200,201...

SELECT * FROM reportuserstbl WHERE MDA_id = 103 is the query phpmaker runs when i filter with MDA_id for instance.
it means row_NUMBER() only works when i select show all. when i filter roW_NUMBER() is ignored.

When I the view loads the the row number () column is serial I.e 1 2 3 4 ....
But when I search I get 12 30 35 70...
The numbers are not serial

How can i fix this pls


SRanade
User
Posts: 95

Post by SRanade »

This may help you: viewtopic.php?p=154642


Post Reply