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

use $P{param} as select * from $P{param}


openxadmin

Recommended Posts

Trying to use the params for the tablename.  If I can get this working it means I can use the same sub report for multiple tables by just sending the tablename to the sub report.

 

I have been using the parameters in joins and where clauses for a while and am supprised that the param will not work with the tablename.

 

Any Ideas other than writing the jrxml before compiling the sub report?

 

Chris

 

select CAST(date_format(from_unixtime(timestamp) , '%Y-%m-%d' ) as DATETIME) as date,
round(max_value,2) as max,
node_ref_table.node
FROM $P{table}
JOIN node_ref_table ON ( 
node_ref_table.ref = node_ref 
and node_ref_table.ref =  $P{node})


 
group by node limit 10

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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