magarwal Posted January 31, 2008 Share Posted January 31, 2008 I want to construct my query in my struts action calss and pass the entire query as a parameter to my JRXML file. How can I do this?? Also what will be the name of the parameter in which I store my query?? Link to comment Share on other sites More sharing options...
svenn Posted February 1, 2008 Share Posted February 1, 2008 Are the fields and tables in your query going to change ie is your query dynamic? Link to comment Share on other sites More sharing options...
vk01 Posted February 1, 2008 Share Posted February 1, 2008 If it is straight forward query, you can define a parameter in the report in iReport. And pass that parameter into this report. Link to comment Share on other sites More sharing options...
svenn Posted February 1, 2008 Share Posted February 1, 2008 Ah but it's not that simple. That approach only works if you will be using the same fields and tables for you query. If you will be changing these values then it will not work. Link to comment Share on other sites More sharing options...
magarwal Posted February 1, 2008 Author Share Posted February 1, 2008 For now the fields and columns dont change. Link to comment Share on other sites More sharing options...
svenn Posted February 1, 2008 Share Posted February 1, 2008 Then vk01 approach will work. If they change you would have to manually build the jrxml file then complie and run it. Note that since you are submitting your SQL as a parameter you will have to manually create all the fields in the report. 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