This topic is locked

Mandatory Search Parameters before a report

2/28/2008 5:11:14 AM
PHPRunner General questions
S
steveh author

Before I start chopping code, is there an easy way to accept search parameters prior to running a report?
I have a report that with no parameters will produce a few million rows, so I want to prompt for a couple of mandatory parameters (year and country) before I show the report.
Out of the box there doesn't seem to be a way to have no records on the report screen in the same way you can with tables?

S
steveh author 2/28/2008

Obvious stupidity on my part as there is an option the same as tables to have no records on the first screen......

S
steveh author 2/28/2008

Looks like there could be a bug here, as even with records suppressed on the first page the page times out before loading, presumably because it's running and returning some serios data.
Having run a trace it looks like it;s trying to run selected for the various lookups, surely the point of having no records is to defer that?

J
Jane 2/29/2008

Steve,
No records on the first page option works for tables only.
To add the same functionality for the reports add following code to the Report page: Before SQL query event on the Events tab:

if (!@$_REQUEST["a"])

$strWhereClause = whereAdd($strWhereClause,"1=0");