ozrebel Posted July 1, 2014 Share Posted July 1, 2014 HiI am designing a report in Jaspersoft Studio and have data arranged in the following formatCol 1 Col 2 Col 3data 1 data 2 data 3data 4 data 5 data 6What I would like some help with is in writing a query that will give me the contents of Col 3 when Col 1 = data1 and Col 2 = data 2All fields are strings.Would greatly appreciate some help on what might be the correct syntax.Thanks in advance.Tony Link to comment Share on other sites More sharing options...
mbmorgan Posted July 1, 2014 Share Posted July 1, 2014 I'm only familiar with SQL, but here's something that might help:select Col3 from [TABLE]where Col1 = Data1and Col2 = Data2 Note that the syntax might depend on what datasource you are using.Hope this helps!M.B.Morgan Link to comment Share on other sites More sharing options...
ozrebel Posted July 1, 2014 Author Share Posted July 1, 2014 Thanks for the response M.B. Morgan. I guess I didn't make myself clear enough though. What I was really looking for was a way to write a query in the Expression editor, as I already have an sql query which has delivered data to me in the format outlined. Would be great to know if it's possible, or whether I have to re-write the sql to deliver the data in a different manner to start with. Link to comment Share on other sites More sharing options...
Ankur Gupta Posted July 2, 2014 Share Posted July 2, 2014 Hi ,Have you tries using PrintWhenExpression Property This will allow you to decide when to print the contents of Column 3 , and that would be the expression you mentioned Col 1 = data1 and Col 2 = data 2Do Let me know if you need further details on this resolve. ThanksAnkur Gupta http://ankurthetechie.blogspot.in/ 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