cancel
Showing results for 
Search instead for 
Did you mean: 

Prompts in where clause gives error

former_member640919
Participant
0 Kudos

Hi,

when start date and end date and Date  type prompts are selected the report should display the data between the date range, if  dates and date type prompts are not selected then the report should display all records present in the table.

Created below 3 prompts and filter in the IDT

Date Type=@prompt('Enter Date Type','A',{'Order Date','Req Date'},Mono,Free,Persistent,,Optional)

Prompt1=@prompt('Enter Date Type','A',{'Order Date','Req Date'},Mono,Free,Persistent,,Optional)

Prompt2=@prompt('Enter Date Type','A',{'Order Date','Req Date'},Mono,Free,Persistent,,Optional)

filter_Dynamic_Dates=Order Type='Order Date' and Eqp.Order_Dt between Prompt1 and Prompt2) or

       (Order Type='Req Date' and Eqp.Req_Dt between Prompt1 and Prompt2) or(Date Type not in('Order Date','Req Date))

I am getting the "failed to execute runnable (java.lang.NullPointer Exception error, when I am not selecting the 3 prompts. I can execute the query, if I am selecting the 3 prompts.  If  dates and date type prompts are not selected then the report should display all records present in the table.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

The fact that you specify the prompts as optional inherently causes the restriction to be excluded if a value is not selected.

Kind regards,

Leandi