Jasper PHP library on Github

Jasper PHP library providing smooth access to JasperReports server via REST / REST v2 API

I did not like the original JasperSoft PHP library, it was not well written, not fully object orientated and not well enough documentated.

My classes are fluent, namespaced, well documentated and make use of Exceptions.

 

(JasperReports and any term associated with “Jasper” including their logo belongs to Jaspersoft.)

6 thoughts on “Jasper PHP library on Github

  1. Hello
    I have the following error that is what I am doing wrong?

    Fatal error: Uncaught JasperException[505]: HTTP Version Not Suppported on GET request

    Thank you

  2. I am desperately trying to modify a resource using your classes. I have the Jaspersoft server community edition installed and I can get resource descriptors and run reports fine. Now, I want to modify a datasource.

    Here’s the code:

    $datasource = $jasper->getResourceDescriptor(‘/datasources/MySQL’);
    /* change the database name */
    $datasource->setPropDatasourceConnectionUrl(“jdbc:mysql://localhost:3306/trirace4”);

    $jasper->modifyResource($datasource);

    I tried a mutipart post for the modifyResource function but for the love of god, I CAN’T GET IT TO WORK. I keep getting Bad Request 400. Now I wonder if the server can handle those request or maybe they are not implemented in the community version. Please help me figure out the code.

    Thanks in advance

    • I will have a look into it and reply to you soon! I think it is possible. I’ve had a lot of Bad Requests, too. Basically it should work the same way as uploading any other resource. Should be the function JasperRest->multiput() with a class JasperDatasource extends JasperResourceDescriptor.

  3. Excuse me,
    I want to ask you one.
    I use your client folder in your project.
    Since I use it for insert users into jasperreport server, it was getting error.
    Do you have any ideas about this problem?
    Thank in advance

    • Hello and thanks for your response. Unfortunately I did not implement methods regarding the permission and user management into the library but you can send me an email specifying your issues and I will try my best to make the library fit your needs. If you are running the scripts via Windows, make sure to change the CURL cookie path, search or files for COOKIEFILE, is something starting with /tmp/ in Linux.

Leave a Reply

Your email address will not be published. Required fields are marked *