3
votes

I created a CDE parameter report in this report I want pass parameter through url my CDE report link as below

http://localhost:8080/pentaho/content/pentaho-cdf-dd/Render?solution=demo&path=&file=pass_parameter.wcdf&userid=joe&password=password

and my cda query url as below

http://localhost:8080/pentaho/content/cda/doQuery?path=demo/pass_parameter.cda&dataAccessId=jdbc&paramdeviceType=deviceType

In above cda query url if I pass deviceType as below

http://localhost:8080/pentaho/content/cda/doQuery?path=demo/pass_parameter.cda&dataAccessId=jdbc&paramdeviceType=Linux

It shows me a json formatted output in browser. So I used CDE report in iframe on my jsp page and that iframe I pass first url. I want to pass deviceType parameter in my first url like

 http://localhost:8080/pentaho/content/pentaho-cdf-dd/Render?solution=demo&path=&file=pass_parameter.wcdf&userid=joe&password=password&deviceType=Linux

but it not display any output, how I pass parameter through url?

1
can you please provide me link how to start from beginingMuhammad Younas

1 Answers

3
votes

After long researching I found solution of my questions. First in my jndi query component query required attribute value and that attribute value I want to pass through url for this I select one component parameter and write javascript code as below

function() 
{ 
  cname = Dashboards.getQueryParameter('name');
 } 

you can also this script to your component under pre execution and add parameter name as cname value also cname and my query will select * from table name where cname=${cname}. and in my iframe url I pass argument as below

http://localhost:8080/pentaho/content/pentaho-cdf-dd/Render?solution=demo&path=&file=pass_parameter.wcdf&userid=joe&password=password&name=Linux

and it shows me a results which I want.