Odri Posted May 3, 2022 Share Posted May 3, 2022 Hi, I would appreciate if someone could help me with this:I have multiple reports that display the same information but in different ways, they use the same query to get the same information but they have differences like one has vertical orientation and the other one horizontal.My problem is that whenever I make a change in one report query, I have to implement the same change in all the other reports. Is is possible to use one query for all of these reports so they all update when I change the query?I'm not using jasper server Link to comment Share on other sites More sharing options...
dprogrammer Posted May 4, 2022 Share Posted May 4, 2022 It depends how reports are getting their queries. You could pass same query as a parameter string from external source to your reports. Write your query inside a parameter , say paramReportQuery Then in sql editor of each jasper report, you just have this parameter name as follows:$P!{paramReportQuery} Link to comment Share on other sites More sharing options...
dprogrammer Posted May 4, 2022 Share Posted May 4, 2022 Link to comment Share on other sites More sharing options...
Odri Posted May 4, 2022 Author Share Posted May 4, 2022 Thanks! I'll give it a try! Link to comment Share on other sites More sharing options...
jgust Posted May 5, 2022 Share Posted May 5, 2022 Another option is to use a stored procedure.Move your code into a stored procedure then use a data adapter with plsql language. That plsql language is not just for Oracle but it works on sql server too. When you change the SQL language a new default parameter is created as $P{ORACLE_REF_CURSOR} which holds the result of the procedure.Here is an example of how to call a stored procedure:{ call SP_RPT_STAFF_PAYROLL_SPEC_PGM($P{PS_M_ACAD_YR},$P{PS_M_COLL_NAME},$P{PS_M_SUBM_NUM},$P{PS_M_ORG_ID},$P{PS_M_SSN_SELECTION},$P{ORACLE_REF_CURSOR}) } 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