spmdd111 Posted August 10, 2016 Share Posted August 10, 2016 I hope someone can guide me in the right direction. I want to use the jasperreports server 6.3.0 to generate some reports by using PHP. In PHP I use the Jaspersoft PHP client 2.0 to generate the reports. This works fine but I have a problem with parameters.This is how my JRXML looks like:<textField> <reportElement x="305" y="42" width="100" height="30" uuid="5bbcd9d3-c70e-4b5c-8b0e-5948ce000cbd"/> <textFieldExpression><![CDATA[$P{Parameter1}]]></textFieldExpression></textField></pre>[/code]I want to fill that Parameter with a value, what I tried is to use input controls but in the report the value is always null.My PHP code is:$c = new Client( "http://localhost:8080/jasperserver", "jasperadmin", "jasperadmin");$controls = array( 'Paramter1' => 'Hello World!');$report = $c->reportService()->runReport('/reports/testreports/report1', 'pdf', null, null, $controls);[/code]I assume that eitherit is not possible to use input controls to achieve what I wantI'm doing something wrong.Thank you very much for any helpful answers! Link to comment Share on other sites More sharing options...
jduran_3 Posted August 10, 2016 Share Posted August 10, 2016 You can view you have and error in the name of parameter in php?Paramter1 vs Parameter1 in the reportyou lost an "e" Link to comment Share on other sites More sharing options...
spmdd111 Posted August 11, 2016 Author Share Posted August 11, 2016 Thanks a lot that was the solution. I just wasted a couple of hours :( When the mistake is too easy it takes ages to find it. Thanks a lot! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now