Jump to content
We've recently updated our Privacy Statement, available here ×

Two reports, same information, diferent format


Odri

Recommended Posts

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

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...