Report criteria form validation

Report criteria form validation

Postby binx35 » Wed Nov 02, 2016 12:25 am

Hi,

I have what is probably a simple question about report criteria forms, but can't seem to work out how best to do it?

I have several reports each with a criteria form which typically request date ranges and then do some validation.
In the event of an error, I popup an alert to the user and the report exits.
If the input is ok, I apply the criteria to the query in the "PHP Used to Create #TABLE_ID#" and it retrieves all records.

What I would like to do (presumably again in PHP?) is to detect if the number of records is greater than a certain value and if it is then popup a message to the user asking them to reduce or narrow the date range.

I have already added PHP code to get the record count but not sure how to: (a) popup a message to the user from the PHP and (b) exit the report cleanly without generating an empty report or any error messages.

Thanks in anticipation.

Cheers,
Peter
binx35
 
Posts: 4
Joined: Wed Nov 19, 2014 1:00 am

Return to General



cron