No announcement yet.

Need help with a report created with JasperSoft IReport

  • Filter
  • Time
  • Show
Clear All
new posts

  • Need help with a report created with JasperSoft IReport


    I created a report using IReport, however for some weird reason it doesn't display the correct value. Mysql Workbench shows the following result:


    Below is a screenshot of the report.


    Here is the line from the query for that particular column:

    LPAD(cash_payments_detail.`control_acc`,5,0) AS Control_Account,

    Any help would be much appreciated.

    Thank you.
    Last edited by gamer99; 01-17-2014, 10:15 AM.

  • #2
    what does your report show without the left padding?



    • #3
      Hi there,

      Thanks for the reply. It shows the same (the incorrect values) even after removing the left padding/LPAD. Another thing I noticed is that when I preview the report in IReport with the query still being there, it shows up fine both with and without LPAD. But when I remove the query and replace it with: $P{pdf_query} I get the incorrect values upon running the application and loading the report.

      Its only the values that begin with 0 that are affected.

      I really appreciate you taking your time and replying. Thank you.


      • #4
        iReport has basicaly nothing to do with your final report, you just use it to visually design the layout and kick it up a notch.
        The only two things involved are your jrxml-file and the phpjasperxml class.
        If your SQL statement delivers the correct data (which it does) but the report turns out to be faulty there are only two options.
        You are using a feature (from iReport) in your report the phpjasperxml class can't cope with (yet?) or you hit a bug.
        Neither one would surprise considered phpjasperxml is still alpha.
        Well, what I can say is put the plain data on the report without any formatting and test it in your application.
        In the worst case you have to do it field by field. I know, painstakingly slow but ...

        Sorry, that I couldn't be of any more help.

        By the way, what does your account# look when you have a credit booking into an account < 10000?



        • #5

          Thank you so much for taking the time to write up a detailed reply and helping me out. It really means a lot.

          I am attaching another image with the complete data from the table and pdf report (unbound from any particular record number and without any formatting).

          As you have mentioned above, I already tried testing the report with only the problematic field and yielded the same result, you can see in the image.



          • #6
            what version of the phpjasperxml class are you using? The latest development is a bit buggy, I guess.
            I have an older version and it is working. I could create the output you are
            trying to achieve. If you are interested in it please send me a email.



            • #7

              Thanks for the reply, I was using phpjasperxml_0.9b. But your reply got me thinking on the correct lines and I updated the the version to 0.9d and that has fixed this issue.
              I really appreciate all the help and could never have fixed any of this without it.




              • #8
                Well now the report is loading fine locally but still is inaccurate when live online. Its possible some files in the class folder were not overwritten. I'll delete the folder and reupload. Will post an update.


                • #9
                  Yup, the class files just had to be properly overwritten, I must have missed a few. Anyways deleting the folder and uplaoding it again did the trick.

                  JSB, thank you for all the help and guidance. I really appreciate it. Also a super thanks for offering to create the output.