raparlasiva Posted September 10, 2012 Share Posted September 10, 2012 Hi, I have created four parameters in my ireport1. calendar2. week --->Prompt3. year ---> Prompt4. formatterI have calculated the date range using the 4 above parameters ('startDate' , 'endDate') My report lets the users see the number of orders from week number and year they choose from the dropdown box.. My issue is now how to pass the variable values of 'startDate' and'endDate' to the sql query i.e, the stored procedure (call stored_procedure('startDate' , 'endDate') Post Edited by raparlasiva at 09/10/2012 19:40 Link to comment Share on other sites More sharing options...
marianol Posted September 10, 2012 Share Posted September 10, 2012 I'm assuming you calculated your dates in new report parameters, and those parameters are named 'startDate' , 'endDate'.So for using them in your query you need to use the $P{param_name} syntax. In your case:call stored_procedure($P{startDate} , $P{endDate})See: http://jasperforge.org/website/ireportwebsite/IR%20Website/ir_using_parameters.html?header=project&target=ireport Mariano Link to comment Share on other sites More sharing options...
raparlasiva Posted September 10, 2012 Author Share Posted September 10, 2012 calculated the date range using the below linkhttp://type-exit.org/adventures-with-open-source-bi/2010/06/date-calculation-in-ireport/ 'startDate' , 'endDate' ---> variable names and not parameters. Link to comment Share on other sites More sharing options...
marianol Posted September 10, 2012 Share Posted September 10, 2012 Sorry I did not read your post correctly. You are saying that you've calculated those dates in Variables, Variables scope starts after the query has been executed and may have evaluation times. In your case you will need to do the calculation of your dates in Parameters using the parameter default expression property. Also check the ORDER of the parameter sin the Report Inspector because iReport will execute them in that order. So your StartDate and EndDate parameters should be the last ones. Link to comment Share on other sites More sharing options...
raparlasiva Posted September 10, 2012 Author Share Posted September 10, 2012 ur so awesome..It worked..Thanks a lot for your support. Ur so awesome..thank you again..it worked..thank GOD! Link to comment Share on other sites More sharing options...
raparlasiva Posted September 18, 2012 Author Share Posted September 18, 2012 i have two parameters1. week and2. yearboth use as prompt on ireport.But when I add a single value input control and run the same report on jasper server, the single value input control is not visible and only a pop up window is opening up.I want to know why my single value input control not showing up when I am running the report on jasper server ? thanksSiva Link to comment Share on other sites More sharing options...
sumayya.sultana Posted June 29, 2015 Share Posted June 29, 2015 you have to add the input controls as per the name you have given to the parameters ,then it works. Link to comment Share on other sites More sharing options...
sumayya.sultana Posted June 29, 2015 Share Posted June 29, 2015 can you eloborate how you are giving it.if you give the input controls with the same name you define a parameters with case senstivie then it works 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