Records unshow when sort by

This public forum is for user-to-user discussions of PHP Report Maker. Note that this is not support forum.

Records unshow when sort by

Postby Fvs44 » Wed Jan 17, 2018 12:17 am

Hello,

I'm using PHPReportMaker v7.0.2 connected to a MicrosoftSQL 2012 database.
When I want to sort a column (ascending/descending) on the web page by clicking on the columns header, all the records disappears.
The only way to get them back is to close and re-open the web browser.

I don't have this problem with v11 connected to the same database, but I would like to stay on v7 for some reasons.
I don't have this problem with v7.0.2 connected to a MySQL database.

Thanks for any help.
Fvs44
 
Posts: 4
Joined: Wed Jan 17, 2018 12:10 am

Re: Records unshow when sort by

Postby arbei » Wed Jan 17, 2018 10:17 am

Enable the option "Debug" in [Tools] -> [Advanced Settings] to show the SQL which retrieving the records.

Also, use [Right-Click] -> [View Source] to see if there are any error returned.
arbei
 
Posts: 1526
Joined: Wed Sep 09, 2015 10:13 am

Re: Records unshow when sort by

Postby Fvs44 » Wed Jan 17, 2018 4:57 pm

Here is the debug logs when I sort a column:
"Host=Provider=SQLOLEDB;Persist Security Info=False;Data Source=172.22.15.80;Initial Catalog=cinetic;User Id=sa;Password=Fives2017
version=6.1 (ado_mssql): SET DATEFORMAT ymd (ado_mssql): SELECT COUNT(*) FROM [cinetic] ORDER BY [Machine Nb] ASC

8127: Column "cinetic.Machine Nb" is invalid in the ORDER BY clause because it is not contained in either an aggregate function or the GROUP BY clause. (ado_mssql): SELECT * FROM [cinetic] ORDER BY [Machine Nb] ASC

Page processing time: 0.18619322776794 seconds"

What means "Column "cinetic.Machine Nb" is invalid in the ORDER BY clause because it is not contained in either an aggregate function or the GROUP BY clause. (ado_mssql): SELECT * FROM [cinetic] ORDER BY [Machine Nb] ASC "?
Fvs44
 
Posts: 4
Joined: Wed Jan 17, 2018 12:10 am

Re: Records unshow when sort by

Postby Webmaster » Fri Jan 19, 2018 10:38 am

You need to remove the ORDER BY clause when executing SELECT COUNT(*) ... for MSSQL.

Unfortunately PHP Report Maker 7 is too old to be supported. Try to upgrade to the latest version if possible.
Webmaster
 
Posts: 10790
Joined: Fri Aug 06, 2004 5:59 pm

Re: Records unshow when sort by

Postby Fvs44 » Thu Jan 25, 2018 4:16 pm

I plan to move to PHP rmk 11 soon but don't have enough time for now (some functionnalities need to be rebuild as languages or horizontal menu).

I searched but I don't find what I need to change to "remove the ORDER BY clause when executing SELECT COUNT(*) ... for MSSQL."?
Fvs44
 
Posts: 4
Joined: Wed Jan 17, 2018 12:10 am


Return to General Discussion (PHP Report Maker)