Home » Developer & Programmer » Reports & Discoverer » Report parameter Validation (Oracle 10g)
Report parameter Validation [message #352503] Wed, 08 October 2008 01:43 Go to next message
Messages: 1
Registered: April 2008
Junior Member
Is it possible to validate the report parameter on the client end, before actually submitting the report parameter form to the application server ?


A report parameter form which takes a Date and then generate a report against it.
User is entering an invalid date in date parameter field "Abcdefghh" and clicks the submit button, a new web page opens with following error message.
REP-546: Value does not match mask 'dd/mm/yyyy'.
ORA-01858: a non-numeric character was found where a numeric was expected

REP-0091: Invalid value for parameter 'DTE'.

Is it possible that, this error can be handled at the browser (client end), can we apply data validation check on the date parameter field ?

Parameter form field has a property validation trigger can it be used for this purpose, if yes then please explain how.

Thank you.
Re: Report parameter Validation [message #352641 is a reply to message #352503] Wed, 08 October 2008 14:22 Go to previous message
Messages: 21130
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Well, you could try to do the following: create a CHARACTER (not date) parameter and convert it to a date using the TO_DATE function. If it fails, display an error. Something like this:
  l_date date;
  l_date := to_date(:par_date, 'dd.mm.yyyy');
  return (TRUE);
  when others then
    srw.message(10, 'Date format should be DD.MM.YYYY');
    raise srw.program_abort;

Beware of the WHEN OTHERS exception handler, as it will catch everything.

The other option might be creating your own parameter form (using Forms Builder, for example), let user enter date value and intercept possible error in a form, before actually calling the report (if everything is OK, you'd, of course, pass date parameter from a form to a report).
Previous Topic: Discoverer Desktop aborts when passing parameters
Next Topic: Column Overlapping in the report output
Goto Forum:

Current Time: Wed Jul 26 21:46:58 CDT 2017

Total time taken to generate the page: 0.13198 seconds