Jasper reports and iReport

Can you pls paste your code or java command here? That would be helpful.

Karthi kn wrote:

Can you pls paste your code or java command here? That would be helpful.

thanks Karthi, sure, my xml:

<?xml version="1.0" encoding="UTF-8"?>

<customer_list_result>
<invoice_customers>

<account_id type=“integer”>10</account_id>
21.1
first one
2


<account_id type=“integer”>105</account_id>
210000.21
second comment
4

</invoice_customers>
</customer_list_result>

the java command:

java XmlJasperInterface -opdf -f<RAILS_APP>/app/reports/testoXML.jasper
-x/customer_list_result/invoice_customers/pettycashrequest <
<RAILS_APP>/app/reports/customer_list.xml >
<RAILS_APP>/app/reports/testo.pdf

as you can see, I’ve just change last part of Xpath “pettycashrequest”

my report, executed on iReport works fine, giving me what I expect

by now, I’m trying to implement some debug on XmlJasperInterface looking
for causes for my corrupted pdf file, but java is a new world to me, I’m
going very slow

thanks again Karthi

I didn’t try with the direct java command.

Try to keep only one record in the xml, like the following.

<?xml version="1.0" encoding="UTF-8"?>

<customer_list_result>
<invoice_customers>

<account_id type=“integer”>10</account_id>
21.1
first one
2

</invoice_customers>
</customer_list_result>

If you try with the ruby code, then use “w+b” in IO.popen().

I am not able to find the exact cause of the error. Again check the
class path for all the jar files. Because you may have to add every jar
file in the CLASSPATH instead of just specifying the jars’ folder path.

hi all, and thanks for your concern about my dificulties

I have success running the java command line on my laptop (windows), but
not in the server (Fedora C6), in this last one I get an empty pdf (0
bytes), it seems that (in XmlJasperInterface.java) jasperPrint object
passed to JasperExportManager is empty or invalid

does anybody has had success doing this work on a linux box?, applied
some changes at XmlJasperInterface?

thanks in advance

You can refer my blog if you need.

http://kkarthik.wordpress.com/2008/06/10/how-to-integrate-crystal-reports-with-ruby-on-rails/

hi again, finaly it work :slight_smile:

at fedora c6, I’m using these files:

poi-3.0.1-FINAL-20070705.jar
jdt-compiler-3.1.1.jar
jcommon-1.0.0.jar
commons-beanutils-1.7.jar
barbecue-1.5-beta1.jar
jasperreports-3.0.0.jar
jfreechart-1.0.3.jar
xalan.jar
commons-collections-2.1.jar
iReport.jar
commons-logging-1.0.2.jar
log4j-1.2.9.jar
iText-2.1.3.jar

and Java Runtime Environment (JRE) 6 Update 7 (fedora c6 default
jre-1.4.2-cgj GNU java doesn’t work for me, for upgrading I followed
http://aditya-fedoralinux.blogspot.com/2008/08/installing-sun-java-instead-of-open-jdk.html),
before I upgrade, system gives me some GTK-WARNING message

for running the java command line first I set CLASSPATH adding these 2
lines to /etc/profile (I think there are better ways but this work for
me…)

#CLASSPATH=/app/jasper/bin:/app/jasper/lib/filejar1.jar:/app/jasper/lib/filejar2.jar:/app/jasper/lib/filejarN.jar

#export CLASSPATH

then, to “reload” or something, at prompt

#source /etc/profile

java command line should run

after that, ruby also works…

thank everybody

I think there’s an error in the version of iText-2.1.3.jar defined above

I’m doing a new fedora intall (c6) and using iText-2.1.7.jar gives me
some error (com.lowagie.text.Image.plainWidth()F), then tried
iText-2.1.3.jar (as defined above), same error, some google and found
http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=39315
, so I set iText-2.0.8.jar, and it works
cheers!

Mauricio A. wrote:

thank everybody

I’m glad for your success :slight_smile:

Denis

Herman Jansen wrote:

@Fred
Thanks Fred. It works the way you suggested.

@Peter
It’s based on
http://wiki.rubyonrails.org/rails/pages/HowtoIntegrateJasperReports
, so it’s command line and it’s fast enough for me.
Where do you think I should put the Wiki description ?

Hi
I am new at ruby/rails. I am trying to develop a complete application.
Now I am building reports using ireport. I have read
http://wiki.rubyonrails.org/rails/pages/HowtoIntegrateJasperReports this
instruction. But I didn’t understand this. Can you please give me a
guide line by using specific points? Such as :

  1. you have to install jasper-rails (gem install jasper-rails)
  2. now copy lib files from (……) to raillsapplicaion/app/jasper/lib
    folder
  3. add these code to the abc controller file
  4. put your *.jasper file to the raillsapplicaion/app/reports folder
  5. …….
  6. …….

Please help me if possible

mujahid

Hi All

I am using ireport 3.0.0.
I am getting the datasource from an xml response which is almost ten MB
file.
My problem here is if my input is large , ireport is taking hardly 10
minutes to give the output.
if i use small response as input then there is no problem.
So is there any optimization process are there to overcome these kind of
issues.

Herman Jansen wrote in post #628820:

I still have to try the suggestion from Fred but I got it to work on
my development machine. I had to jump through some loops, but it does
work.
I can now develop and test a report with iReport and call it from Ruby
on Rails.
If anyone is interested let me know and I will post some additional
information on how I got it to work.

Hi years ago you succeeded to cross Jasper and ruby on rails
Did you remember how you did?
are you still able to help me to do so?

Thanks in advance

I am using ireport 3.0.0.
I am getting the datasource from an xml response which is almost ten MB
file.
My problem here is if my input is large , ireport is taking hardly 10
minutes to give the output.
if i use small response as input then there is no problem.
So is there any optimization process are there to overcome these kind of
issues.

Jon G. wrote in post #629004:

On Feb 6, 3:51 am, FlexRails [email protected] wrote:
If anyone is interested let me know and I will post some additional
information on how I got it to work.

Yes, Please!

One day you got it work, and today i try to have it !!!
Do you remember how you did it? or did you find a better solution to use
reports within a rails project

Thanks

Hi all
http://wiki.rubyonrails.org/rails/pages/howtointegratejasperreports
i can’t read this blog !!!

Herman Jansen wrote in post #628820:

I still have to try the suggestion from Fred but I got it to work on
my development machine. I had to jump through some loops, but it does
work.
I can now develop and test a report with iReport and call it from Ruby
on Rails.
If anyone is interested let me know and I will post some additional
information on how I got it to work.

Hey hi,
Can u help me with example code how to invoke jasper viewer on client
side in ruby on rails. I am using iReport 4.0.0

Herman Jansen wrote in post #628820:

I still have to try the suggestion from Fred but I got it to work on
my development machine. I had to jump through some loops, but it does
work.
I can now develop and test a report with iReport and call it from Ruby
on Rails.
If anyone is interested let me know and I will post some additional
information on how I got it to work.

Hey Herman, I am also going through the same issue. I followed the same
wiki

http://wiki.rubyonrails.org/rails/pages/howtointegratejasperreports

But, it can’t working in Rails 3.2.6. I am a newbie in Rails. So, can
you please help me by showing the information on how you got it to work.

As I am newbie it helps more if you ll provide any sample app in Rails
3.

[email protected] wrote in post #629027:

I hope I’m not stepping upon this thread but continue to ask if anyone
is integrating barcodes into .pdf outputs in Rails?
I thought perhaps you good people might be somehow involved in
inventory applications.
Thank you,
Kathleen

Hi, Kathleen.
I wonder whether the barcode
reader(http://www.businessrefinery.com/products/barcode_reader_java/main.html)
I am
using can help with the related barcoding programs?

Best regards,
Arron

anusha c. wrote in post #1048589:

Herman Jansen wrote in post #628820:

I still have to try the suggestion from Fred but I got it to work on
my development machine. I had to jump through some loops, but it does
work.
I can now develop and test a report with iReport and call it from Ruby
on Rails.
If anyone is interested let me know and I will post some additional
information on how I got it to work.

Hey hi,
Can u help me with example code how to invoke jasper viewer on client
side in ruby on rails. I am using iReport 4.0.0

hey Anusha,

Have you got how it works, if done then please help me with example code
for the same.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs