No announcement yet.

Jasper Reports

  • Filter
  • Time
  • Show
Clear All
new posts

  • Jasper Reports

    Please could someone assist. Being fairly new to scriptcase and on the whole very impressed. well that was until i tried to produce some transactional reports and soon realised that the PDF report generator is very poor.

    I have seen many threads on the use of JasperStarter which looks to be the ideal solution. I have managed to create reports from the command line and it works extremely eel, but i am severely struggling in trying to launch these through scriptcase.

    Please could someone please assist and advise me how i can execute the following:

    ./bin/jasper/bin/jasperstarter pr ./bin/jasper/examples/report_name.jrxml -t generic -f view -u username -p abc123 --db-driver com.mysql.jdbc.Driver --db-url jdbc:mysql://localhost/DB_Name

    Thanks in advance

  • #2

    you can do with the php exec() command. Just put your command in a string and

    $mycommand= '[fullpath]/bin/jasper/bin/jasperstarter pr [fullpath]/bin/jasper/examples/report_name.jrxml -t generic -f view -u username -p abc123 --db-driver com.mysql.jdbc.Driver --db-url jdbc:mysql://localhost/DB_Name';
    exec( $mycommand );

    Pay attention to path. Instead of "./bin" put the full path i.e. "/opt/jasperstarter" in my case ( Linux )
    Giorgio Bravi
    Dolphin Software & Thinkware


    • #3
      Hi Giorgio

      Thanks for your post. I think I am going crazy. I followed your recommendations and jasperstarter will not execute from within scriptcase using exec(). I know the jasperstarter script works fine from terminal. So i am totally at a loss. Could this be a permissions issue.

      I would be most grateful for your advice.



      • #4
        Hi Andy

        if you are on Linux i suggest to create a shell command file to launch jasperstarter and put this one on the exec() command

        BASEDIR=$(dirname $0)
        cd $BASEDIR
        echo $* >>out.log
        ./bin/jasperstarter pr $*

        Test the logfile just to be sure the command is executed

        also change the permissions and owner/group to ww-data or apache depending wich distribuition you have.

        Hope this help
        Giorgio Bravi
        Dolphin Software & Thinkware


        • #5
          Thanks for your help and advice. The reports are now working very well. The problem was both the path as you suggested and the apache security privileges. now all good

          Thanks again



          • #6
            you're welcome. I'm glad I helped
            Giorgio Bravi
            Dolphin Software & Thinkware


            • #7
              Didn't tried but I think there are a post in the forum about PHPJasperXML, I think it's very interesting.

              Professional Scriptcase Services
              Some Customers opinions


              • #8
                PHPJasperXML is an option but I tried it and it has many limitations . For example does not handle subreports.
                Giorgio Bravi
                Dolphin Software & Thinkware


                • #9
                  I tried PHPJasperXML and it is a good product. It just shows local images. Is there a way to show images from database? .
                  I tried JasperStarter too. It shows images from database but not mantain format (Centered is now left).
                  I'll try SOAP an Jasper Report Server.
                  Another way you recomends??