Jump to content

Date input controls in jasperserver


vsabbu

Recommended Posts

Hi

iam using jasper server 2.0.1.My jasper server report has 4 sub reports.when i run the reports it works fine.

but all my 4 subreports queries have From date and Todate parameters.i manually gave the dates to generate the report and it works fine.

i have added from date and todate input controls. Now problem is..all the 4 sub reports queries has to take these input dates and accordingly data should display from database.

 

Please anyone spent some time and reply me.

thanks a lot.

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

hi swood thanks for the reply..

 

I passed the date parameters to all the 4 subreports.

But Iam getting sql exception.

my first sub report has query is like this..

 

 

SELECT cust_name,tkt_cust_id,CUST_ID,SUM(CASE WHEN UPPER(tkt_notified) = 'Y'

AND Tickets_Proc.Tic_Cust_Dev_Func_Rep(tkt_id) <>4 AND tkt_status <> 'R' THEN 1 ELSE 0 END) AS ack_met_open ,

SUM(CASE WHEN UPPER(tkt_notified) = 'Y' AND Tickets_Proc.Tic_Cust_Dev_Func_Rep(tkt_id) <>4 AND tkt_status = 'R'

THEN 1 ELSE 0 END) AS ack_met_closed ,SUM(CASE WHEN UPPER(tkt_notified) = 'Y' AND

Tickets_Proc.Tic_Cust_Dev_Func_Rep(tkt_id) =4 AND UPPER(tkt_status) <> 'R' THEN 1 ELSE 0 END) AS ack_brc_open ,

SUM(CASE WHEN UPPER(tkt_notified) = 'Y' AND Tickets_Proc.Tic_Cust_Dev_Func_Rep(tkt_id) =4 AND UPPER(tkt_status) = 'R'

THEN 1 ELSE 0 END) AS ack_brc_closed ,SUM(CASE WHEN tkt_notified IS NULL AND Tickets_Proc.Tic_Cust_Dev_Func_Rep(tkt_id)

=4 AND UPPER(tkt_status) <> 'R' THEN 1 ELSE 0 END) AS not_ack_brc_open ,SUM(CASE WHEN tkt_notified IS NULL AND

Tickets_Proc.Tic_Cust_Dev_Func_Rep(tkt_id) =4 AND UPPER(tkt_status) = 'R' THEN 1 ELSE 0 END) AS not_ack_brc_closed ,

SUM(CASE WHEN tkt_notified IS NULL AND Tickets_Proc.Tic_Cust_Dev_Func_Rep(tkt_id) <> 4 AND tkt_status <> 'R'

THEN 1 ELSE 0 END) AS not_ack_not_brc_yet_open ,SUM(CASE WHEN tkt_notified IS NULL AND

Tickets_Proc.Tic_Cust_Dev_Func_Rep(tkt_id) <> 4 AND tkt_status = 'R'

THEN 1 ELSE 0 END) AS not_ack_not_brc_yet_closed FROM TICKETS,customers WHERE tkt_cust_id=cust_id AND

TRUNC(tkt_created_date) BETWEEN DATE($P{FromDate}) AND DATE($P{ToDate}) AND tkt_cust_id = CUST_ID AND tkt_cust_id=$P{CUST_ID} GROUP BY tkt_cust_id ,cust_name,cust_id

 

 

FromDate and ToDate are the two input date controls..

Is this is the way of Passing parameters to the query?

Please reply me.

 

Thanks a lot

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...