vsabbu Posted October 17, 2007 Share Posted October 17, 2007 Hiiam 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 More sharing options...
swood Posted October 18, 2007 Share Posted October 18, 2007 In your main report, have you passed the date parameters to the sub reports? ShermanJasperSoft Link to comment Share on other sites More sharing options...
vsabbu Posted October 18, 2007 Author Share Posted October 18, 2007 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 More sharing options...
mdahlman Posted October 23, 2007 Share Posted October 23, 2007 vsabbu, You wrote, "I passed the date parameters to all the 4 subreports.", but it appears as if you haven't. What value do you have for the Parameters Map Expression? You probably need this: $P{REPORT_PARAMETERS_MAP} -MattJasperSoft Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now