ashish.anant Posted January 4, 2008 Share Posted January 4, 2008 Hello All, I'm trying to run the bellow query through Jasper reports. The report ask for two input paramters (startDate and endDate), so, I added two control with the similar name what I'm using in query (pStartDate and pEndDate) of date type. The format I'm using for date is "mm-dd-YYYY". But the problem is, whenever I'm running the same query with some date range directly on mysql console, I'm getting the result properly. Same query with same input is also running and giving me correct result through Open Reports also. But whenever I'm running this query through Jasper Report, I'm getting NOTHING (Saying ... reports data empty). I think, the format of date or something somehow is going wrong here. Can someone pls give me any idea what I'm missing here? I pasted the query below of this mail. I'm using iReport2.0.3 with Jasperserver & MYSQL/ JDK1.6 thanks (in adv) Ashish.(ashishanant@gmail.com) ================== select PO.created as 'Date', PO.purchase_order_id as 'Transaction ID', L.price as 'Transaction Amount', concat(PO.status, '-', ifnull(PO.delivery_status,'')) as 'State', 'paypal' as 'Payment Source', UB.userId as 'Buyer User ID', UB.userEmail as 'Buyer email', PPPVB.email as 'Buyer Paypal ID/Email', URB.buyerRating as 'Buyer Rating', US.userId as 'Seller User ID', US.userEmail as 'Seller email', PPPVS.email as 'Seller Paypal ID/Email', URS.sellerRating as 'Seller Rating', G.gameShortName as Game, UAB.userAvatarName as 'Buyer Avatar Name', UAS.userAvatarName as 'Seller Avatar Name', CI.catalogItemTitle as Item, L.price as Amountfrom ps_purchase_order PO join ps_listing L on (PO.listing_id = L.listing_id) join useravatar UAB on (PO.avatar_id = UAB.userAvatarId) join ps_purchase_attempt PURCHA on (PURCHA.purchase_order_id = PO.purchase_order_id) join ps_payment_attempt PAB on (PURCHA.payment_attempt_id = PAB.payment_attempt_id) join ps_payment_vehicle PVB on (PVB.payment_vehicle_id = PAB.payment_vehicle_id) join ps_paypal_payment_vehicle PPPVB on (PPPVB.payment_vehicle_id = PVB.payment_vehicle_id) join user UB on (UAB.userId = UB.userId) join useravatar UAS on (L.avatar_id = UAS.userAvatarId) join user US on (UAS.userId = US.userId) join ps_account ACCTS on (US.userId = ACCTS.user_id) join ps_payment_vehicle PVS on (ACCTS.account_id = PVS.account_id) join ps_paypal_payment_vehicle PPPVS on (PPPVS.payment_vehicle_id = PVS.payment_vehicle_id) join catalogitem CI on (L.item_id = CI.catalogItemId) join game G on (CI.gameId = G.gameId) join userrating URB on (UB.userId = URB.userId) join userrating URS on (US.userId = URS.userId)where PO.status in ('PAID', 'INVOICED') and PVS.status = 'ACTIVE' and (date_format(PO.created, '%m-%d-%Y') >= $P{pStartDate}) and (date_format(PO.created, '%m-%d-%Y') <= $P{pEndDate})group byPO.purchase_order_idorder byPO.created desc; Link to comment Share on other sites More sharing options...
Teodor Danciu Posted January 5, 2008 Share Posted January 5, 2008 Hi, It is not clear to me if we talk about JasperReports alone, or iReport or JasperServer.Can you clarify? Thank you,Teodor 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