how to create a report using jaspersoft php client


    I'm new to jaspersoft. I'm working on a php web application and i want to implement jaspersoft reporting in it. I went through a lot of the available documentation. I used rest api and i was able to connect to the repository and download a report present in the repository as a pdf. My question is is it possible to create a report using php client. I didn't find any example doing that. Also i want to know if it is possible to use mysql queries to fetch data from a DB and use that data to create a report. Any help is appreciated.

Thanks in advance


ajesh.s's picture
Joined: Aug 15 2013 - 11:29pm
Last seen: 9 years 3 months ago

2 Answers:

Sorry my friend... is imposible, ... you must desing your report in jasperstudio and create a web interface to send it parameters to your report...


plantillas's picture
Joined: Apr 8 2015 - 12:49pm
Last seen: 7 years 4 months ago

Yes you can do it by using composite resources that you can specify your data sources your jrxml file, input controls

 $c = new Client(
     $report = new ReportUnit;
     $report->label = "file5Report";
     $report->description = "file5Report";
     $report->jrxml = "/jrxml/file2";
     $report->dataSource = "/datasources/datasource";
     $c->repositoryService()->createResource($report, "/ImageFolder", false);
}catch (\Jaspersoft\Exception\RESTRequestException $e){
      echo $e->getMessage();

I hope that my answer is helpfull

bilel.krichen's picture
Joined: Jun 9 2016 - 3:39am
Last seen: 6 years 5 months ago