Page 1 of 1

Add Sequence No to Report (Custom View)

Posted: Wed Mar 10, 2021 6:40 pm
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


Re: Add Sequence No to Report. (Custom View)

Posted: Thu Mar 11, 2021 9:37 am
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.


Re: Add Sequence No to Report. (Custom View)

Posted: Thu Mar 11, 2021 11:49 am
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


Re: Add Sequence No to Report. (Custom View)

Posted: Thu Mar 11, 2021 12:51 pm
by arbei

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


Re: Add Sequence No to Report (Custom View)

Posted: Thu Mar 11, 2021 9:38 pm
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


Re: Add Sequence No to Report (Custom View)

Posted: Fri Mar 12, 2021 9:51 am
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.


Re: Add Sequence No to Report (Custom View)

Posted: Mon Apr 12, 2021 6:39 pm
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


Re: Add Sequence No to Report (Custom View)

Posted: Mon May 29, 2023 5:05 pm
by SRanade

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