This topic is locked
[SOLVED]

 Strange behavior in the export and print pages

7/22/2020 2:36:39 PM
PHPRunner General questions
Max author

Hello

I have several lists, which use filters to reproduce the desired list view of records.
The problem is that when the export or print function is executed, the filters set by the client are not in any way considered, and only the first records in the table are exported or printed (in a variable number that is still different from those in the list page).
I had never seen this problem in last four year, I've quickly check two entire webapps made with the last phprunner version and ALL of them are affected by this problem (these two webapps are made from scratch with PHPRunner Enterprise 10.4 35160, and now I'm using PHPRunner Enterprise 10.4 35387).
Please, has anyone encountered the same problem? Is there a way to fix it? (except to change the code in BeforeQueryExport by changing the $strWhereClause).
I have already tried to delete all the contents of the output folder, force a complete build, try to change some parameter of the export setting, etc... the problem remains the same.
Thanks in advance.

Admin 7/22/2020

BEforeSQLQuery is a wrong event for this purpose. Use the technique explained in this article:

https://xlinesoft.com/phprunner/docs/dynamic_sql_query.htm

Max author 7/22/2020



BEforeSQLQuery is a wrong event for this purpose. Use the technique explained in this article:

https://xlinesoft.com/phprunner/docs/dynamic_sql_query.htm


Well, thanks for this suggestion.
Anyway, for me it's not an option to rewrite manually all export pages (I've a too much of them in several projects, all made with last phpr).
Do you have other ideas how to fix this problem? I can provide live example where to see and reproduce the problem.
Thanks again.

Admin 7/23/2020

Yes, I just answered this question. You may experience issues like this if you use BeforeSQLQuery event instead of suggested approach:

https://xlinesoft.com/phprunner/docs/dynamic_sql_query.htm

Max author 7/23/2020



Yes, I just answered this question. You may experience issues like this if you use BeforeSQLQuery event instead of suggested approach:

https://xlinesoft.com/phprunner/docs/dynamic_sql_query.htm


Ok, thank you for the directions.
Anyway, at this moment I can confirm the issue reported; the only workaround that I've founded is replace filter panel with search panel (where it's needs to export/print list filtered by some terms).