Ad Hoc Domain parameters

Hello colleagues!

I've been creating Ad hoc domain and trying to use derived table because I have a specific query. Can I provide some kind of placeholders in query as parameters while creating domain? For example, here we have a query: select * from table_x where y = ?. How can I provide parameter for this "?" so that I can use it and pass it in View or Report component further?

Thank you!

john.doe1991's picture
Joined: Oct 10 2013 - 11:57pm
Last seen: 8 years 1 month ago

4 Answers:

You can use profile attribute or user attribute. Those could be defined at server level, user level or tenant level.

https://community.jaspersoft.com/documentation/jasperreports-server-user...

HTH

nthapa's picture
1149
Joined: Jan 24 2014 - 9:53am
Last seen: 6 years 9 months ago

I'm sorry. I didn't really get from this doc how can I access user attributes from query in Derived Table tab?

john.doe1991 - 8 years 1 month ago

Hi,

I am unable to access given link: https://community.jaspersoft.com/documentation/jasperreports-server-user...

Can you please check once?

Thanks

gowthamsenmca - 8 years 1 week ago

Seems that we should use domain design XML file. Otherwise, what expression should I use to access current logged in user from that XML?

john.doe1991's picture
Joined: Oct 10 2013 - 11:57pm
Last seen: 8 years 1 month ago

This might be more clear:

https://community.jaspersoft.com/documentation/jasperreports-server-ulti...

You can also add server level attributes from Repository ->root->System properties ->GlobalPropertiesList ->Edit (after right clicking) and make the required changes.

To access those variables, you can directly use  {attribute('attributeName')}  on your sql.

nthapa's picture
1149
Joined: Jan 24 2014 - 9:53am
Last seen: 6 years 9 months ago

Hi, Any one solve this issue? please inform me to vedamprudhvi@gmail.com thanks

vedamprudhvi's picture
Joined: Nov 3 2016 - 2:39am
Last seen: 6 years 4 months ago
Feedback