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

Can we able to create generic jrxml file?


spiker_bang

Recommended Posts

Hi,

Is it possible to create generic jrxml instead of individual jrxml files?

Ex :

(Part of jrxml file)

<parameter name="ageParam" class="java.math.BigDecimal"/>
<queryString>
<![CDATA[select * from employee where sal > 20000 and age > $P{ageParam}]]>
</queryString>

assume here ageParam :25

If I use this jrxml file, we can use this only for different age's

instead of this, is it possile to use like

1)

<parameter name="queryParam" class="java.lang.String"/>
<queryString>
<![CDATA[$P{queryParam}]]>
</queryString>

assume here queryParam : select * from employee where sal > 20000 and age > 25

or

2)

<parameter name="selectValue" class="java.lang.String"/>
<parameter name="fromValue" class="java.lang.String"/>
<parameter name="whereValue" class="java.lang.String"/>
<queryString>
<![CDATA[select $P{fromValue} from $P{fromValue} where $P{whereValue}]]>
</queryString>

assume here selectValue : * or name,sal,age,desig,bu

fromValue : employee

whereValue : sal > 20000 and age >25

 

Is it possible to create dynamic templates then static ones, which can be possible with cristal reports??

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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...