Jaspersoft / jrs-rest-php-client

REST API wrapper for PHP used to interact with JasperReports Server
GNU Lesser General Public License v3.0
63 stars 59 forks source link

Uncaught exception 'Jaspersoft\Exception\RESTRequestException' with message 'null' when i add jrxml resources to a report #22

Open bigbill91 opened 8 years ago

bigbill91 commented 8 years ago

How can I add other sub resources to this report using PHP.
I can't find any documentation of this case.

 `$c = new Client(
 "http://192.168.1.101:8080/jasperserver",
 "jasperadmin",
 "jasperadmin");

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

But always this error shown with message 'null'

meatballcoder commented 8 years ago

Do you mean as opposed to the path above?

bigbill91 commented 8 years ago

I mean, how can I add sub jrxml files as resources in this principal report file5Report