loyalman Posted August 16, 2006 Share Posted August 16, 2006 :( Hi all! I have some dynamic reports. I have a question like "(($F{NAME})==null?"SELECT * FROM CITIES;":"SELECT * FROM CITIES WHERE NAME ='London';".... later. I want to make a report with one para. If I put a para by condition in the query. That is Ok. But I do not want to put a para into the query. it is error . :( . I used the same query in the forum. But it is error. Please let me know how to write a dynamic query!!! :( .Thanks advance!!!Best regards!:cheer: Note! Sorry! my Enghlish is not good! Link to comment Share on other sites More sharing options...
dprogrammer Posted August 18, 2006 Share Posted August 18, 2006 If I understood correctly you want to use a parameter in a query. Add a parameter, say $P{pCity} and check "Is for Prompting" option. Modify your query as: Select * From Table Where $F{City}=$P{pCity}. Hope this helps. Link to comment Share on other sites More sharing options...
salishs Posted December 17, 2009 Share Posted December 17, 2009 Hi ,I also has the problem with dynamic parameter passing ,ok iwill explaini want to get the data of a month so my query will beselect * from fruit where month(shiftdate)=10;this will give me the needed result ,ok but if any date in that month eg:sundays are holidays so that day will be no data and also that date also missing i want that date also as in the date column ad the remain as 0.00,so i written a pgm in java to get alla the dates in a month and pass to the quey(not in report)asselect * from fruit where shiftdate=2009-10-04;this is sunday so i get the output as sunday 0.0 0.0 in my java pgm but how can i pass the dates dynamically or is there any option other than this .I'm using ireport 3.0.0 Please help me 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