Jump to content

grantbacon

Members
  • Posts

    19
  • Joined

  • Last visited

grantbacon's Achievements

Apprentice

Apprentice (3/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. Hi ashcsi1322, After you obtain a JobSummary, you can use its ID with the getJob method to obtain the full details of a scheduled job, as below: $job_details = $c->jobService()->getJob($jobs[0]->id);[/code]
  2. Hi Ashy, You will be able to attach a Calendar to a Job. You can find the documentation in the latest code in the /docs/ folder which will contain examples of how to do this
  3. Hola, Su esta usando JasperReports Server o solo tiene un reporte que ha hecho usando JasperReports Library en Java? (lo siento por el Espanol mio malo) Gracias, Grant
  4. Hi Ashy, I suggest using v2.0.0 (available on github: http://github.com/Jaspersoft/jrs-rest-php-client) with versions 5.0 and greater.
  5. Hi Joe, the PHP client should work fine with both CE and PRO. Can you censor and post your Client instantiation call?
  6. The URI you provide to runReport should match the URI within the JasperReports Server. You can get this URI by right clicking on a report in the repository and selecting "Properties.." The error you show seems like your $c may not have been instantiated properly. You can try using var_dump to ensure that it has created an object properly, and additionally you can try to var_dump the contents of $c->serverInfo() to ensure the connection is being properly made to your JRS instance Additionally, you won't want to change any of the underlying directory structures as the autoloader attempts to load classes as they are needed based on their expected locations within your filesystem
  7. Sure, Composer is just a dependency manager, similar to Maven for Java. It just helps manage packages and libraries you use when building your PHP application.
  8. Hi, it seems that you are using an old version of the PHP client. I would suggest checking out the latest version on Github and reading the provided documentation. It is very likely that this was a previous bug that has been taken care of by the latest version of the client. You can obtain the latest version of the PHP client from the Releases page of the community site, or you can visit Github: http://github.com/Jaspersoft/jrs-rest-php-client
  9. If you are using the most recent version of jrs-rest-php-client, the constructor has changed. However, it seems that the autoloader is not being loaded properly... it could be an OS-specific issue. There are a few ways you could solve this: 1) in autoload.dist.php you can replace the line: $location = JASPERCLIENT_ROOT . $class . '.php'; [/code]with the following: $location = JASPERCLIENT_ROOT . str_replace('\', '/', $class) . '.php'; [/code]2) or you could use Composer and have it generate an autoloader for you, and use that autoloader (recommended) Then you would want to modify your client constructor to use a URL as the first parameter <?phprequire_once("autoload.dist.php");use JaspersoftClientClient;$client = new Client("http://localhost:8080/jasperserver-pro", "username", "password", "organization_name"); [/code]
  10. You may want to remove your url/username/password details
  11. If you are using an old version, just remove ->reportService(), and the argument order should be the same.
  12. As of now, its not possible to include images embedded in a report using the PHP client in HTML format. The URIs you are seeing refer to some resources that require an authenticated session to view. One solution currently would be to host the images in a place accessible to the public (e.g: a separate web server). Naming the images as seen in the output and without a suffix, this should load the images. For example, if you request the image as below (note, I'm using latest github version, its unclear if youre using version from exchange, or github) $report = $c->reportService()->runReport("/reports/samples/AllAccounts", "html", null, "http://testprefix.com/images/");[/code]Then when images are added to the HTML, they'll have a src attribute with the prefix your provided: <img src="http://testprefix.com/images/img_0_46_0" style="position: absolute; left:145px; top: 22px;" alt="" title="JasperReports Logo"/></div></td><td>[/code]
  13. The SOAP client is outdated. If you downloaded the php-client from the community Exchange, you can find a more recent REST client in the rest folder of the archive. If you would like an even more recent release, you can check out the github for the PHP client project here: https://github.com/Jaspersoft/jrs-rest-php-client Included within are many examples to help you get started connceting JRS to your php application. Please post more questions if you have any regarding the PHP REST Client for JRS.
  14. First, you must add your reports to your instance of JasperServer. Once you've done this, each report will have a specific URI relative to its location on the report server. You should then take a look at the PHP Client for JasperReports, which you can find on GitHub: https://github.com/Jaspersoft/jrs-rest-php-client Once you've installed the PHP client, you will be able to make requests within your PHP application to obtain and display reports in whichever format you prefer (iframe, offer for download, etc) An example to help you get started: If you have a report located at the URI "/reports/MyReport" you will be able to display it to users in an HTML format using the following PHP code: <?phprequire_once __DIR__ . "/vendor/autoload.php";header('Content-Type: text/html');use JaspersoftClientClient;$c = new Client( "localhost", "8080", "jasperadmin", "jasperadmin", "/jasperserver-pro", "organization_1" ); $report = $c->reportService()->runReport('/reports/MyReport', 'html');echo $report; ?>[/code] In this simple example, a client connection is created and stored in $c using the credentials supplied in the instansiation. You can then use any of the services provided by Client to access various functionality of the JasperReports Server. For displaying reports, you will want to use the report service. In the example above, we ask the client to provide the report located at the URI "/reports/MyReport" in HTML format. It is then stored in $report. Since the report is in HTML, you can then display it simply by echoing the content of $report.
  15. Hi Pablo, The jrs-rest-php-client on github currently has repositoryService and Resource services which are expected to work with the next release of JRS Pro. You can develop code and test it against the latest trunk build for the community edition if you would like to develop prior to the next release. If you checkout the tag for "lastSuccessfulBuild-trunk" or "lastReviewed-trunk" (stable version) below, you can build the community edition which will support the latest php client. Link to public SVN: http://anonsvn:anonsvn@code.jaspersoft.com/svn/repos/jasperserver
×
×
  • Create New...