Forum: Ruby on Rails Jasper reports and iReport

2b226bafbb87a84231ca6b06bf979599?d=identicon&s=25 VSIntl (Guest)
on 2008-01-18 22:28
(Received via mailing list)
Has anyone succeeded in producing Rails reports using jasper reports?
I have prepared reports directly with Jasper's iReport tool using my
MySQL data.  It is a very powerful reporting tool.  The reports look
greate.

But I have not been able to produce the reports from my Rails
application.  I have followed the instructions provided at:

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

but am unable to make it work.  I am probably not doing something
really basic, relatively new at Rails.  When I enter the URL for the
controller "http://localhost:3000/reports/report"  as described in the
tutorial (above) I get the following error:

"Expected ./app/helpers/send_doc_helper.rb to define SendDocHelper"

Should I do something else first?
Fe57adefd16cbfa4d2e630c1533b29e1?d=identicon&s=25 Herman Jansen (herman)
on 2008-02-05 16:19
(Received via mailing list)
I have the same problem, but I'm kind of solving it to get my test
going by simply copying the code from send_doc_helper.rb into the
helper of the controller where I'm calling Jasperreports.
It is running now, but I don't get any output yet. There are however
quite some deprecation warnings in the log.
Let me know how you are getting on.

VSIntl schreef:
3299251223f55753ec84719de39e6e53?d=identicon&s=25 Jon Garvin (Guest)
on 2008-02-05 18:10
(Received via mailing list)
I was just doing some investigating on JasperReports yesterday and read
through that wiki page thoroughly.  Seems like a prime candidate for
someone who knows what they're doing to make into a plugin or gem.  I'm
thoroughly lost trying to figure out what I need to do to get this to
work.

FlexRails wrote:
>> I have prepared reports directly with Jasper's iReport tool using my
>> controller "http://localhost:3000/reports/report"  as described in the
>> tutorial (above) I get the following error:
>>
>> "Expected ./app/helpers/send_doc_helper.rb to define SendDocHelper"
>>
>> Should I do something else first?
>>
> >
>
>


--
http://www.5valleys.com/
http://www.workingwithrails.com/person/8078
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2008-02-05 18:49
(Received via mailing list)
On 18 Jan 2008, at 21:26, VSIntl wrote:

>
> but am unable to make it work.  I am probably not doing something
> really basic, relatively new at Rails.  When I enter the URL for the
> controller "http://localhost:3000/reports/report"  as described in the
> tutorial (above) I get the following error:
>
> "Expected ./app/helpers/send_doc_helper.rb to define SendDocHelper"

What if you do what the error message is suggesting? Change the name
of the module in send_doc_helper.rb to be  SendDocHelper instead of
SendDoc, and change
helper :send_doc
include SendDoc
to
helper :send_doc
include SendDocHelper
Fred
Fe57adefd16cbfa4d2e630c1533b29e1?d=identicon&s=25 Herman Jansen (herman)
on 2008-02-06 11:52
(Received via mailing list)
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.
00973881979aa0a660ffbbb2f7a907fb?d=identicon&s=25 Peter De Berdt (Guest)
on 2008-02-06 12:19
(Received via mailing list)
On 06 Feb 2008, at 11:51, FlexRails wrote:

> 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.

A blog or wiki post with the whole procedure and all pitfalls would
be nice. Do you run Jasper Reports as a Webservice or through a
commandline call?


Best regards

Peter De Berdt
Fe57adefd16cbfa4d2e630c1533b29e1?d=identicon&s=25 Herman Jansen (herman)
on 2008-02-06 15:08
(Received via mailing list)
@Fred
Thanks Fred. It works the way you suggested.

@Peter
It's based on
http://wiki.rubyonrails.org/rails/pages/HowtoInteg...
, so it's command line and it's fast enough for me.
Where do you think I should put the Wiki description ?
00973881979aa0a660ffbbb2f7a907fb?d=identicon&s=25 Peter De Berdt (Guest)
on 2008-02-06 17:03
(Received via mailing list)
On 06 Feb 2008, at 15:07, FlexRails wrote:

> @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 ?

The page you mentioned above might be a good place :-)


Best regards

Peter De Berdt
3299251223f55753ec84719de39e6e53?d=identicon&s=25 Jon Garvin (Guest)
on 2008-02-06 18:50
(Received via mailing list)
On Feb 6, 3:51 am, FlexRails <her...@intermatics.be> wrote:
If anyone is interested let me know and I will post some additional
information on how I got it to work.

Yes, Please!
36f02ca8773a0bdc3f2d90a932c1b8b3?d=identicon&s=25 KathysKode@gmail.com (Guest)
on 2008-02-06 19:17
(Received via mailing list)
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
Fe57adefd16cbfa4d2e630c1533b29e1?d=identicon&s=25 Herman Jansen (herman)
on 2008-02-07 12:16
(Received via mailing list)
ok, I will update the wiki, but I need a little bit of time. I'll try
to this this tonight.
42db98edb8de28e50395c4959a12a46a?d=identicon&s=25 jef (Guest)
on 2008-02-07 16:11
(Received via mailing list)
does jasper reports work on a shared hosting plan?

Jef
00973881979aa0a660ffbbb2f7a907fb?d=identicon&s=25 Peter De Berdt (Guest)
on 2008-02-07 16:56
(Received via mailing list)
On 07 Feb 2008, at 16:10, jef wrote:

> does jasper reports work on a shared hosting plan?

Does an ultra cheap car come with advanced options like voice
commands, keyless entry, active safety systems, wifi hookups, …?

Simple answer: no.

JasperReports is not so easy to deploy an a hosted site, because it
requires a Java server (Tomcat, Weblogic, Resin or something else),
which isn't supported by most providers.


Best regards

Peter De Berdt
Fe57adefd16cbfa4d2e630c1533b29e1?d=identicon&s=25 Herman Jansen (herman)
on 2008-02-07 20:20
(Received via mailing list)
If you want to use JasperReports as a webservice, yes indeed it will
take some effort to get it all set up correctly, although these days,
you will find hosting plans including Tomcat servers (or other Servlet/
JSP engines).

If you want to use JapserReports as a command line service, deployment
is actually quite simple as long as you are allowed to run Java
processes on your hosting server, but a lot of plans allow (short
running) Java processes.
Fe57adefd16cbfa4d2e630c1533b29e1?d=identicon&s=25 Herman Jansen (herman)
on 2008-02-07 23:27
(Received via mailing list)
I have updated the
http://wiki.rubyonrails.org/rails/pages/HowtoInteg...
wiki page with a complete description on how I got JasperReports to
work from rails. I hope it will be usefull for some of you.
Success.
3299251223f55753ec84719de39e6e53?d=identicon&s=25 Jon Garvin (Guest)
on 2008-02-08 17:21
(Received via mailing list)
On Feb 7, 3:26 pm, FlexRails <her...@intermatics.be> wrote:
> I have updated thehttp://wiki.rubyonrails.org/rails/pages/HowtoInteg...
> wiki page with a complete description on how I got JasperReports to
> work from rails. I hope it will be usefull for some of you.
> Success.

Thanks for the info Flex.  I've set things up like you described, but
am still having a couple small issues.

1) With a very simple "Hello World" report with just a static text
element, I'm able to compile the report and all but when I render it
through rails, I get a completely blank PDF.  Anybody had a similar
problem? thoughts?

2) iReport on Ubuntu7.10 seems to have stability issues.  I've
installed 2.04, 2.00 and 1.1.0 and all will freeze up when I try to
compile or execute a report with any kind of dynamic data, and
sometimes even when I'm just trying to work with a "hello world"
report with a single static text element.  anybody have any thoughts
on that?
Fe57adefd16cbfa4d2e630c1533b29e1?d=identicon&s=25 Herman Jansen (herman)
on 2008-02-08 18:02
(Received via mailing list)
1) In which banner have you put your static 'Hello world' text,
because when I put it in the title banner, or in detail, and I try to
run it from within iReport I get a message 'The document has no
pages.' The compilation however succeeds. In that case of course there
will be no output when you call the report from rails.
If you really got a report preview in iReport but no output in rails
you might look for a file called XmlJasperInterface.log somewhere in
your rails application and see if you find some more information
there. I had the same problem untill I copied the iReport lib files to
my rails/app/jasper/lib directory. So you might double check if you
have missed any of the lib files.

2) I'm running on a Mac and there it works fine. I suppose you could
develop your reports on a platform where iReport runs stable, and then
still deploy to Ubuntu.

Is there anyone who was successfull using my description, otherwise I
will have to check my description for possible errors ?
3299251223f55753ec84719de39e6e53?d=identicon&s=25 Jon Garvin (Guest)
on 2008-02-08 19:28
(Received via mailing list)
Flex, thanks a **ton** for your assistance.

My report preview in iReport is now working great even with dyanmic
data (on our token windows xp box).  I've got the "hello world" text
in the "page header" "banner" and a couple dynamic fields in the
"detail" banner.  the "build/execute with active connection" gives me
exactly what I would expect for the page heard and the dynamic data.
However, when I put the compiled .jasper file in app/reports  I still
get a blank pdf.

There are some differences in what I put in the app/jasper/lib
directory compared to your instructions.
a) you mention a jdt-compiler.jar, but my download of iReport 2.0.4
contained a jdt-compiler-3.1.1.jar.  At first, I figured that was just
a typo on your part.  Later I also found a plain jdt-compiler.jar in
the jasperreports_on_rails archive and tried that, too.  Neither
helped.
b) you mention a log4j-1.2.13.jar.  However, my 2.0.4 iReport only
contains a log4j-1.2.8 and 1.2.9 jars.  I put both of those in the lib
directory but that didn't work.then I found the log4j-1.2.13.jar in
the jasperreports_on_rails archive and replaced the other two with
it.  Still blank.

So, right now my lib dir has all the same 11 .jar files you mention in
your instructions (and no others), the only exceptions being that jdt-
compiler.jar and log4j-1.2.13.jar came from the jasperreports_on_rails
download instead of the latest version of iReport.

Still getting a blank pdf file though.  any more ideas?
3299251223f55753ec84719de39e6e53?d=identicon&s=25 Jon Garvin (Guest)
on 2008-02-08 19:33
(Received via mailing list)
Also, if I completely remove the .jasper file, I get the expected java
errors, and when I put it back I'm back to the blank pdf's, so I am
sure that it's finding and using the correct .jasper file. (just to
rule out one possible problem)
3299251223f55753ec84719de39e6e53?d=identicon&s=25 Jon Garvin (Guest)
on 2008-02-08 21:02
(Received via mailing list)
WhooHoo!  Got it working.  I had a typo in the xml_start_path I was
passing to send_doc.   With the two special files copied from
jasperreports_on_rails instead of from iReport, and my typo fixed,
it's working great.

I'm going to work on simplyfing this code and either posting some
alternate/simplified instructions to my blog or possibly even creating
a Rails plugin that makes all this a lot easier to do.  I'll post an
update to this thread if/when that happens.  Flex, if you want to
collaborate on the plugin, holler!
Fe57adefd16cbfa4d2e630c1533b29e1?d=identicon&s=25 Herman Jansen (herman)
on 2008-02-08 21:50
(Received via mailing list)
Hey Jon,

I'm glad you got it to work. I'm looking forward to your plugin,
although the hard part will probably always be the iReport and Java
part. I've never developed a plugin before so I don't know if I can be
of assistance. Are you going to put the Java stuff also inside the
plugin directory ?

Do you think I could improve the description of the whole process ?

I suppose I left the log4j-1.2.13.jar because the one from the iReport
lib was a lower version. I'm going to test however if it is also
working with the version that is included in iReport and will let you
know here.
3299251223f55753ec84719de39e6e53?d=identicon&s=25 Jon Garvin (Guest)
on 2008-02-08 22:39
(Received via mailing list)
On Feb 8, 1:50 pm, FlexRails <her...@intermatics.be> wrote:
> Hey Jon,
>
> I'm glad you got it to work. I'm looking forward to your plugin,
> although the hard part will probably always be the iReport and Java
> part. I've never developed a plugin before so I don't know if I can be
> of assistance. Are you going to put the Java stuff also inside the
> plugin directory ?
>

That's my plan.  I've created a few plugins (some only shared between
internal projects here at work and a couple released to the wild), so
I'm not worried about that part.  It also looks like I should be able
to integrate jasperreports into the plugin and stay true to jasper's
GPL licensing.

The one thing I'm still wondering about is that
XmlJasperInterface.class file and where it comes from, how it's
licensed, etc.  It seems like it would be necessary to include it with
the plugin, but do I need to include the source?  Does it have it's
own copywrite and license that needs to be included?  Anybody know who
originally wrote that code?

> Do you think I could improve the description of the whole process ?
>

Not sure.  One problem I ran into is my project uses RESTful routes,
so I needed to do a little extra to generate the original xml file and
the report, but I think including those instructions might have made
it more confusing for people not using RESTful routes, and those of us
who are should already know what we need to do.  Other than that, it
appears my whole problem was really my typo.


> I suppose I left the log4j-1.2.13.jar because the one from the iReport
> lib was a lower version. I'm going to test however if it is also
> working with the version that is included in iReport and will let you
> know here.
>

I'm currently using the two log4j's that come in iReport and it seems
to work, but I'm not doing anything complicated, so my not even be
exercising that code to find out it's not good enough.
Fe57adefd16cbfa4d2e630c1533b29e1?d=identicon&s=25 Herman Jansen (herman)
on 2008-02-09 00:12
(Received via mailing list)
The download contains also the XmlInterface.java source file. In that
file there is the e-mail address of the guy who wrote it. You could
maybe mail him about it.
3299251223f55753ec84719de39e6e53?d=identicon&s=25 Jon Garvin (Guest)
on 2008-02-09 00:16
(Received via mailing list)
On Feb 8, 4:11 pm, FlexRails <her...@intermatics.be> wrote:
> The download contains also the XmlInterface.java source file. In that
> file there is the e-mail address of the guy who wrote it. You could
> maybe mail him about it.
>
>

Hehe, I actually just found his address through a different route.
But based on what you found, it looks like I've definitely got the
right guy.  So, we'll see what he says.
6cdb0d9c2aeeb83e395ae28759b1848b?d=identicon&s=25 Eike (Guest)
on 2008-03-02 11:36
(Received via mailing list)
Hi,
I used the HowTo to install JasperReports in my Rails-application.
It works for rtf-files, but it doesn't work for pdf. No message in the
logfiles :( Anyone any idea?
Sometimes even rtf doesn't work and I get a 'Exception in thread
"main" java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/
JRDataSource'. Anyone any idea for that?
Thanks!
Eike
5d550787544f33d5d1201fa284daa320?d=identicon&s=25 Denis Mahony (denis_mahony)
on 2008-03-04 23:43
Thanks to Herman Jansen  for his work on this  :)

On the
 http://wiki.rubyonrails.org/rails/pages/HowtoInteg...

 page in the example xml code it has an inconsistency ?

'LIST' (opening reference,versus,  'LOOKUP' closing reference)
Would that cause a problem ?

I'm struggling to follow this tutorial. :(

<?xml version="1.0" encoding="UTF-8"?>
<customer_list_result>
  ......
</customer_lookup_result>

Denis
5d550787544f33d5d1201fa284daa320?d=identicon&s=25 Denis Mahony (denis_mahony)
on 2008-03-08 13:31
I've finally achieved some measure of success...
When I try to display data as PDF in IE , it now launched Adobe Reader,
but gives me an error message

'The file is damaged and could not be repaired'.

I suspect a typo in Document.rb , and I've looked at it 'till I'm blue
in the face and cannot see it....
Are all the path references correct ?  I had to insert a reference to
'app/' into the original tutorial code before the path in
Dir.foreach("/jasper/lib"

else I got a message :

Errno::ENOENT in CustomersController#report
No such file or directory - jasper/lib

Anybody spot a typo below ?
(Win XP = ROR ver 1.7.)

Denis


-----------------------------------------------------------
class Document   < ActiveRecord::Base
include Config
def self.generate_report(xml_data, report_design, output_type,
select_criteria)
    report_design << '.jasper' if !report_design.match(/\.jasper$/)
    interface_classpath=Dir.getwd+"/jasper/bin"
    case CONFIG['host']
      when /mswin32/
        Dir.foreach("/app/jasper/lib") do |file|
          interface_classpath << ";#{Dir.getwd}/jasper/lib/"+file if
(file != '.' and file != '..' and file.match(/.jar/))
        flash[:notice] = interface_classpath
        end
      else
        Dir.foreach("/app/jasper/lib") do |file|
          interface_classpath << ":#{Dir.getwd}/app/jasper/lib/"+file if
(file != '.' and file != '..' and file.match(/.jar/))
        end
      end
      result=nil
      IO.popen "java -Djava.awt.headless=true -cp
\"#{interface_classpath}\" XmlJasperInterface -o#{output_type}
-f#{Dir.getwd}/app/reports/#{report_design} -x#{select_criteria}", "w+"
do |pipe|
          pipe.write xml_data
          pipe.close_write
          result = pipe.read
          pipe.close
      end
    return result
  end
end
-------------------------------------------------------------------
5d550787544f33d5d1201fa284daa320?d=identicon&s=25 Denis Mahony (denis_mahony)
on 2008-03-12 02:37
(Received via mailing list)
>I've finally achieved some measure of success...
>When I try to display data as PDF in IE , it now launched Adobe Reader,
>but gives me an error message
>
>'The file is damaged and could not be repaired'.

Additionally, I now see that in the server console it generate output
as follows:
%PDF-1.4
%ooxe
3 0 obj <<Length 277/Filter/Flate.... an so on.
-about 4 lines of garbage...

It looks like it might be an Adobe PDF header ...
hmmm... must be the xmljasperinterface acting up..
java environment ??

jeez 1 it's so frustrating .....iReports looks so good :)


Denis
Fe57adefd16cbfa4d2e630c1533b29e1?d=identicon&s=25 Herman Jansen (herman)
on 2008-03-16 13:32
(Received via mailing list)
Check again if you have all the necessary classes from the iReports
lib directory.
5d550787544f33d5d1201fa284daa320?d=identicon&s=25 Denis Mahony (denis_mahony)
on 2008-03-16 21:05
Herman Jansen wrote:
> Check again if you have all the necessary classes from the iReports
> lib directory.

Thank for your suggestion. I've actually re-installed everything from
ground zero, because I had tried everything to resolve this issue.
In the process I've upgraded to RoR ver 2.0 (I has been at 1.7). That
involved jumping through a few hoops. I re installed iReports 2.0.4 and
JasperReports 2.0.5(very recent release)

I had double checked the lib replication dimension, and they were
identical, save for a version indicator in one file :- Log4J
files...(two). I've used the latest version 1.2.13.

Just for the record....

Directory of C:\InstantRails\rails_apps.......jasper\lib

13/12/2006  10:20           188,671 commons-beanutils-1.7.jar
08/12/2003  20:50           165,119 commons-collections-2.1.jar
15/01/2008  20:32            26,388 commons-logging-1.0.2.jar
01/07/2005  13:21         1,553,403 itext-1.3.1.jar
15/01/2008  20:32         1,922,698 jasperreports-2.0.4.jar
20/12/2005  17:45           294,514 jcommon-1.0.0.jar
15/01/2008  20:32         1,212,369 jdt-compiler-3.1.1.jar
20/12/2005  17:45         1,072,312 jfreechart-1.0.0.jar
04/12/2005  18:00           358,180 log4j-1.2.13.jar
22/08/2007  15:48           909,270 poi-3.0.1-FINAL-20070705.jar
15/07/2004  22:46         1,781,922 xalan.jar

Directory of C:\jasper\iReport-2.0.4\lib
<snip>
15/01/2008  20:32           188,671 commons-beanutils-1.7.jar
15/01/2008  20:32           165,119 commons-collections-2.1.jar
15/01/2008  20:32            26,388 commons-logging-1.0.2.jar
15/01/2008  20:32            18,404 commons-logging-api-1.0.2.jar
15/01/2008  20:32         1,553,403 itext-1.3.1.jar
15/01/2008  20:32         1,922,698 jasperreports-2.0.4.jar
15/01/2008  20:32         1,212,369 jdt-compiler-3.1.1.jar
15/01/2008  20:32         1,072,312 jfreechart-1.0.0.jar
15/01/2008  20:32           352,668 log4j-1.2.8.jar
15/01/2008  20:32           352,291 log4j-1.2.9.jar
15/01/2008  20:32           909,270 poi-3.0.1-FINAL-20070705.jar
15/01/2008  20:32         1,781,922 xalan.jar

Having re-checked everything and still having an Adobe launch with a
corrupt file error, I tried it on another PC.  It also has ROR version
2.0 , did NOT have ireports or Jasper installed, save for the files
copied to the ...app/jasper/lib.

Amazing ! It worked :) . Let joy be unconfined.

Now to figure out why that has happened ?
My PC is :- IntelDualCore , 4 Gig Ram, Win XP SR2 , Java version SE
1.6.0_05-b13. InternetExplorer ver 7.0.5730.11
(This PC is dual boot with Vista 64).

The other PC is;- IntelDualCore , 2 Gig Ram, Win XP SR1 , Java version
1.5.03. InternetExplorer ver 6.

The value set returned by Request.env are more detailed on the former...
I tested this by pasting some code into a view in mycookbook.com - as
the simplest available environment.

See http://wiki.rubyonrails.org/rails/pages/VariablesI...

I'm still puzzled as to why it should work on one PC and not another.
Since the application was simply copied from one PC to the other as a
folder within the rails_apps directory - with additionally copying the
MySQL data folder.

If i do not resolve this, I could not deploy to any particular PC
without the overhead of checking this aspect for all possible reports to
generated... ?

Any thoughts on why the variance ?  Seems like an environment issue ?

Sorry for goingon so long .
Thanks for your interests and contributions here :)

Regards,

Happy St. Patrick's day( tomorrow)  from ireland :)

Denis
5d550787544f33d5d1201fa284daa320?d=identicon&s=25 Denis Mahony (denis_mahony)
on 2008-03-16 22:23
Just for the record ; revisited

20/12/2005  17:45  294,514  jcommon-1.0.0.jar  IS in ROR lib
04/12/2005  18:00  358,180  log4j-1.2.13.jar  IS in ROR lib
15/01/2008  20:32  352,668  log4j-1.2.8.jar  IS in ROR lib
15/01/2008  20:32  352,291  log4j-1.2.9.jar  IS in ROR lib
15/01/2008  20:32  18,404  commons-logging-api-1.0.2.jar  not in ROR lib
64d5d0053959823b488dbfd1b6fab8cb?d=identicon&s=25 guyb (Guest)
on 2008-03-18 09:51
(Received via mailing list)
I have got Jasper Reports to work with Rails.  I have blogged it -
http://rails-revlog.blogspot.com/2008/03/bringing-....

I would be interested to read comments.

I am going to try JRuby on Rails and use the inate JVM to do the same
thing.
5d550787544f33d5d1201fa284daa320?d=identicon&s=25 Denis Mahony (denis_mahony)
on 2008-03-26 16:16
I did look at the ref in the last reply -very impressive - and i may go
that way.

Meahwhile the saga continues.....

I've finaly got JasperXMLInterface and Ruby to work - consistently every
time, producing PDF docs. (I did have to amend some of the suggested
code to fix a path error - omission of APP at one point)

Now for the wrinkle..
It was intermittemtly breaking, and it took me a while pin it down.

Reproduce the problem by;
run pdf report - works successfully, save it.
close pdf
close browser
close ruby console
close rails applicatiom dialog box
I -> configure database vis MyPHPAdmin
select Customer table
Insert a record , save , browse
close MyPHP
I -> Rails applications -> Manage Rails applications
Select app,
Start it with Mongrel*(ruby console opens)
select http://localhost:3000/customer_report (should produce a pdf
listing customers)
Adobe Reader displays an error message: There was an error opening the
document. The file is damaged and could not be repaired.


Fix the problem by:
close Adobe Reader
Close browser
close ruby console (=stops server)
close Rails applications dialog box
I -> config database MyPHPAdmin
select database
select table Customer
browse
delete last record
close browser
I -> Rails applications -> Manage Rails applications
Select app,
Start it with Mongrel*(ruby console opens)
select http://localhost:3000/customer_report (should produce a pdf
listing customers)
Adobe Reader opens with the pdf listing - perfect !

Question: Is this normal behaviour ? Would you expect it to be damaged
by the action of opening the database with PHPAdmin ? And what is
damaged exactly ?
It has to be some environment (Win XP?) issue ?

I would welcome comments.

Maybe one should not access the database with PHP ?
(I reminded of the old joke - 'only whan i laugh' - Was that a Len
Deighton book ?)

Regards

Denis
4dd75353dff93de29b53a1ac890a1771?d=identicon&s=25 Karthi kn (karthikeyan7585)
on 2008-04-16 07:06
Hi,

I have also started working on integrating the jasper report and ruby on
rails. I started with creating the report manually in iReport.

I created my XML file data source. Then I tried to create the report.

"Data—> Report query" in iReport was disabled even after i selected my
data source. I don't know why it happens like this. I am not able to
proceed further.
Any guess???

Please help me to find out the issue.


Thanks in advance...
5d550787544f33d5d1201fa284daa320?d=identicon&s=25 Denis Mahony (denis_mahony)
on 2008-04-16 09:28
> "Data—> Report query" in iReport was disabled even after i selected my
> data source.

Could it be that you have not yet opened (to create) a new file.
Those buttonsare enabledafter File->New document ?

It does seem a little strange that you can create a data source first
without starting a new document.... :)

Denis
4dd75353dff93de29b53a1ac890a1771?d=identicon&s=25 Karthi kn (karthikeyan7585)
on 2008-04-16 11:52
Thanks for you valuable suggestion. Today is the first day I started
working on iReport. I was doing the same mistake as you said.

Now I am able to run the report from the XML. But I am getting a blank
PDF. No data inside it.

Any guess why???
4dd75353dff93de29b53a1ac890a1771?d=identicon&s=25 Karthi kn (karthikeyan7585)
on 2008-04-16 16:57
I have done all the coding for ROR and iReports integration as mentioned
in http://wiki.rubyonrails.org/rails/pages/howtointeg...

When I run the URL in the browser I am getting a small alert message
saying
"The file is damaged and could not be repaired"

Any guess why it is coming???
5d550787544f33d5d1201fa284daa320?d=identicon&s=25 Denis Mahony (denis_mahony)
on 2008-04-16 19:27
Hi Karthi,

I had that problem several times and it's difficult to trace.
It means that Adobe Reader is launching put the file created and
delivered to it is malformed, probably due to the XML data stream not
conforming to the data stream presented to iReports when you designed
the report.

Most usually, in my case, it was a malformed XML file, being used as
input.
A:
If the XML input file used to design the report is *in any way*
different from the XML output by the CUSTOMER_LIST method,(I'm assuming
you used the example -your method may be different), it will fail.
B:
The XPATH2 (note the *2*) must be selected for the XPATH query to work
correctly.
(Did your fields display properly when you were designing the report ?)

C:
If the library files (JARS) are not exactly as they were when the
iReport is designed, it *will* fail -(jar version references excluded).
The JARS which you have in the RoR application folder *must* be the ones
copied in from the iReport/JasperReport Lib folder. See my list above.

Also a help to:

Look at the ruby console window as you run the report. Does the output
to it give any indication?  In this context, I heavily loaded the
document.rb with debug output (puts...) to help me trace the problem.
viz
---------------------------------------------
class Document   < ActiveRecord::Base
include Config
  def self.generate_report(xml_data, report_design, output_type,
select_criteria)
    puts("Got XML passed as :" + xml_data)
    puts("Got output type as:" + output_type)
    puts("Got reportpassed as:" + report_design )
    puts("Selection criteria is:" + select_criteria)
....
....

# What does Dir.for each do ?????? -this test line reads and lists on
console screen every matching file inc  . and .. (.=curDir , .. =parent
Dir)
    #Dir.foreach("c:/InstantRails/rails_apps/hats/app/jasper/bin") {|x|
puts("Got " + x) }

NOTE: hats was my appdir name- replace it with yours , if you decide to
insert debug code
-----------------------------------------------------------
Good Luck :)
Denis


Karthi kn wrote:
> I have done all the coding for ROR and iReports integration as mentioned
> in http://wiki.rubyonrails.org/rails/pages/howtointeg...
>
> When I run the URL in the browser I am getting a small alert message
> saying
> "The file is damaged and could not be repaired"
>
> Any guess why it is coming???
5d550787544f33d5d1201fa284daa320?d=identicon&s=25 Denis Mahony (denis_mahony)
on 2008-04-16 19:30
Sorry :(
forgot to trim trailing message text :(

Denis
4dd75353dff93de29b53a1ac890a1771?d=identicon&s=25 Karthi kn (karthikeyan7585)
on 2008-04-18 08:33
Thanks Denis. That helped. There was a mistake with my xml file. I got
it running successfully.

But I got the same problem again. I found out one of the reasons also.
When I created the report design in the iReport UI, the height and width
were some factors for the column headers.

When I run the report in iReport, the PDF was generated successfully.
But when i tried that jasper with my rails application, the file damaged
message was shown. When I adjusted the height and width of the fields in
the report design, I got it working.
5d550787544f33d5d1201fa284daa320?d=identicon&s=25 Denis Mahony (denis_mahony)
on 2008-04-18 18:05
I'm glad for you :)

It's intersting that the object width/height could be a cause of error.
I did note that it warns you when the objects overlap the boundries by
altering the colour of the object outline.

I wonder would you look at my post of 26.03.2008 16:16 and comment ?
Are you in Linux or Windows ? and do you use PHPadmin.
It still seems strange to me that the PDF file creation can be broken by
using PHP admin.

Regards

Denis
42db98edb8de28e50395c4959a12a46a?d=identicon&s=25 jef (Guest)
on 2008-04-28 15:10
(Received via mailing list)
Hi

I've got the same problem.

--- with pdf:
both web-browser crash.
with firebug i get this :
<html>
<body marginwidth="0" marginheight="0">
<embed width="100%" height="100%" name="plugin" src="http://localhost:
3000/admin/customer_report" type="application/pdf"/>
</body>
</html

But i don't know what to think about this

--- with rtf.

It works with IE & Firefox. But in both case The report is empty.



Any Idea of the problems??
42db98edb8de28e50395c4959a12a46a?d=identicon&s=25 jef (Guest)
on 2008-04-28 17:17
(Received via mailing list)
I try to debug, but no success

Here is my param of my IO.popen call:

java -Djava.awt.headless=true -cp "F:/jasper_test/app/jasper/bin;
F:/jasper_test/app/jasper/lib/commons-beanutils-1.7.jar;
F:/jasper_test/app/jasper/lib/commons-collections-2.1.jar;
F:/jasper_test/app/jasper/lib/commons-logging-1.0.2.jar;
F:/jasper_test/app/jasper/lib/itext-1.3.1.jar;
F:/jasper_test/app/jasper/lib/jasperreports-2.0.5.jar;
F:/jasper_test/app/jasper/lib/jcommon-1.0.0.jar;
F:/jasper_test/app/jasper/lib/jdt-compiler-3.1.1.jar;
F:/jasper_test/app/jasper/lib/jdt-compiler.jar;
F:/jasper_test/app/jasper/lib/jfreechart-1.0.0.jar;
F:/jasper_test/app/jasper/lib/log4j-1.2.13.jar;
F:/jasper_test/app/jasper/lib/poi-3.0.1-FINAL-20070705.jar;
F:/jasper_test/app/jasper/lib/xalan.jar"
XmlJasperInterface -ortf -fF:/jasper_test/app/reports/custrep.jasper -
x/customer_list_result/invoice_customers/customer


Here is my xml_data param of  the pipe.write method
<?xml version="1.0" encoding="UTF-8"?>
<customer_list_result>
  <invoice_customers>
<customer>
  <city>smalltown</city>
  <id type="integer">1</id>
  <name>A Nuino</name>
</customer>
<customer>
  <city>big town</city>
  <id type="integer">2</id>
  <name>3D-Design</name>
</customer>
<customer>
  <city>Expensivetown</city>
  <id type="integer">3</id>
  <name>International Inc.</name>
</customer>
  </invoice_customers>
</customer_list_result>


Does anybody see something wrong.


If i run this line
"XmlJasperInterface -ortf -fF:/jasper_test/app/reports/custrep.jasper -
x/customer_list_result/invoice_customers/customer"
in my command line interface (win xp), I've got this error:
[fatal Error] :3:1 Content is not allowed in prolog.

Does it mean something to someone??
5d550787544f33d5d1201fa284daa320?d=identicon&s=25 Denis Mahony (denis_mahony)
on 2008-04-28 19:38
>I've got this error:
> [fatal Error] :3:1 Content is not allowed in prolog.
>
It could be a malformed XML stream....

See http://www.judahfrangipane.com/blog/?p=53

Could this be the reason?

quotes from above link - The link does not work for me at present for
some reason.

QUOTE:
In an XML document the first thing before anything else you declare the
type like so:

Correct:

PLAIN TEXTXML:
<?xml version="1.0" encoding="utf-8"?>

Incorrect:

PLAIN TEXTXML:
helloworld<?xml version="1.0" encoding="utf-8"?>

Note: The text formatter that I use adds a space between the less than
sign and first question mark. That should not be there. In your document
do not include the space.

Anything before the first character generates this error. If you do not
see any characters you may have an invisible character. Then you would
have to erase (backspace) up to that first character and retype the xml
declaration or take a similar approach.
END QUOTE:

QUOTE:
Suggestions:

- Copy the text in your file and paste it into Notepad. Notepad strips
or converts non standard codes. It is not fool proof but seems to work
in most cases.

- Create a new file using your standard process. Copy the contents of
your original file and paste them into the new file. The content being
everything minus the beginning and end tags.
END QUOTE:

Denis :)
42db98edb8de28e50395c4959a12a46a?d=identicon&s=25 jef (Guest)
on 2008-04-29 22:43
(Received via mailing list)
I try this but it doesn't work.

Could u send me your example app that work. It could help me.
5d550787544f33d5d1201fa284daa320?d=identicon&s=25 Denis Mahony (denis_mahony)
on 2008-04-30 00:05
Attachment: test1.xml (499 Bytes)
Hi Jef,

If your report is blank you most likely did not tick the box in the
connection properties that says :
use the report XPATH expression when filling the report

Regards

Denis
5d550787544f33d5d1201fa284daa320?d=identicon&s=25 Denis Mahony (denis_mahony)
on 2008-04-30 00:13
Attachment: test.sql (50 Bytes)
Also make sure to select XPATH2 as the query type
and define the query as per attached
ie.
the XML tags:-
<customer_list_result>
  <invoice_customers>
   <customer>

become:

/customer_list_result/invoice_customers/customer

in the XPATH2 query window.

Denis
5d550787544f33d5d1201fa284daa320?d=identicon&s=25 Denis Mahony (denis_mahony)
on 2008-04-30 01:19
>>Could u send me your example app that work. It could help me.

your email address ?


Denis
42db98edb8de28e50395c4959a12a46a?d=identicon&s=25 jean-francois ferriere (Guest)
on 2008-04-30 10:08
(Received via mailing list)
Sorry

jfferriere@gmail.com

thanks

2008/4/30 Denis Mahony <rails-mailing-list@andreas-s.net>:
4dd75353dff93de29b53a1ac890a1771?d=identicon&s=25 Karthi kn (karthikeyan7585)
on 2008-06-03 14:38
Hi,

I have got some problem. I have integrated the JasperReport with my ROR
application.

When I use "pipe.read" it reads the stream but not fully. As there is a
special character which ruby takes as a EOF character. It's hex value is
"0x1a". When this character is reached, ruby stops reading the stream.

Please give a suggestion to solve this issue.


Thanks in advance...
5d550787544f33d5d1201fa284daa320?d=identicon&s=25 Denis Mahony (denis_mahony)
on 2008-06-03 18:55
Hi,

I noticed a change in the document.rb file on
IntegratingRubyAndJasperReports.
(It is difficult to determine the changes that are made due to the
method of updating the wiki :)

The mode needs to be set as 'w+b' for Windows.
This seems to have improved the stability of my PDF reports.
I thought you might be interested. It COULD be the cause of your error ?

Code fragment follows -note MODE is SET TO     "w+b" for Binary mode in
WINDOWS. and passed as 'mode' to the Java call.

Regards
Denis

when /mswin32/
        mode = "w+b" #windows requires binary mode
        #Dir.foreach("app/jasper/lib") do |file|
        Dir.foreach(Dir.getwd+"/app/jasper/lib") do |file|
        interface_classpath << ";#{Dir.getwd}/app/jasper/lib/"+file if
(file != '.' and file != '..' and file.match(/.jar/))
         end
      else
        mode = "w+"
        Dir.foreach(Dir.getwd+"/app/jasper/lib") do |file|
        interface_classpath << ":#{Dir.getwd}/app/jasper/lib/"+file if
(file != '.' and file != '..' and file.match(/.jar/))
        end
      end
      result=nil

      # removed--------------
      #IO.popen "java -Djava.awt.headless=true -cp
\"#{interface_classpath}\" XmlJasperInterface -o#{output_type}
-f#{Dir.getwd}/app/reports/#{report_design} -x#{select_criteria}", "w+"
do |pipe|
      # removed ------------------

       # edited -------------------------------
       IO.popen "java -Djava.awt.headless=true -cp
\"#{interface_classpath}\" XmlJasperInterface -o#{output_type}
-f#{Dir.getwd}/app/reports/#{report_design} -x#{select_criteria}", mode
do |pipe|
       # edited -------------------------------
4dd75353dff93de29b53a1ac890a1771?d=identicon&s=25 Karthi kn (karthikeyan7585)
on 2008-06-04 07:27
Thanks a lot Denis. That clearly solved my problem.
5d550787544f33d5d1201fa284daa320?d=identicon&s=25 Denis Mahony (denis_mahony)
on 2008-06-04 15:01
Karthi kn wrote:
> Thanks a lot Denis. That clearly solved my problem.

You're welcome. It feels good to be right now and again :)

Regards

Denis
170ef87c17047bb52b62caeb7355f029?d=identicon&s=25 Mauricio Alcayaga (gusantor)
on 2008-08-08 03:00
Hi everyone

I've followed your instructions here and at
http://wiki.rubyonrails.com/rails/pages/HowtoInteg..., but
no success, or just partial success, my pdf comes 0 bytes

I'm now trying the command line proposed there to get the report, and I
receive the folloing

Exception in thread "main" java.lang.NoClassDefFoundError:
XmlJasperInterface
   at gnu.java.lang.MainThread.run(libgcj.so.7rh)
Caused by: java.lang.ClassNotFoundException: XmlJasperInterface not
found in gnu.gcj.runtime.SystemClassLoader{urls=[],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
   at java.net.URLClassLoader.findClass(libgcj.so.7rh)
   at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.7rh)
   at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
   at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
   at gnu.java.lang.MainThread.run(libgcj.so.7rh)

I guess it's something related to XmlJasperinterface (class not found)

there is another place than <RAILSAPP>/app/jasper/lib where I should to
copy this file?, or maybe define $CLASSPATH environment variable?, or
something I'm missing?

BTW: I'm developing in a FedoraC6, with Apache, also using goldberg
(integrated site design for ruby on rails, due to this, I did some
changes to path's at /app/models/document.rb, but test if its geting the
right files and it is)

in advance, thanks for your time
5d550787544f33d5d1201fa284daa320?d=identicon&s=25 Denis Mahony (denis_mahony)
on 2008-08-08 19:40

> I guess it's something related to XmlJasperinterface (class not found)
>
> there is another place than <RAILSAPP>/app/jasper/lib where I should to
> copy this file?, or maybe define $CLASSPATH environment variable?, or
> something I'm missing?

The file should be in /BIN   not /LIB

ie. where your appplication is XXXXXX

C:\InstantRails\rails_apps\XXXXXX\app\jasper\bin

Regards

Denis
170ef87c17047bb52b62caeb7355f029?d=identicon&s=25 Mauricio Alcayaga (gusantor)
on 2008-08-08 20:00
Denis Mahony wrote:
>
>
>> I guess it's something related to XmlJasperinterface (class not found)
>>
>> there is another place than <RAILSAPP>/app/jasper/lib where I should to
>> copy this file?, or maybe define $CLASSPATH environment variable?, or
>> something I'm missing?
>
> The file should be in /BIN   not /LIB
>
> ie. where your appplication is XXXXXX
>
> C:\InstantRails\rails_apps\XXXXXX\app\jasper\bin
>
> Regards
>
> Denis

Thank you a lot Denis for taking time to answer this

I've just did a mistake writing prior post, my XmlJasperinterface.class
file actually is at <RAILSAPP>/app/jasper/bin, and I did also:

export CLASSPATH=<RAILSAPP>/app/jasper/bin

but my result pdf file is still getting 0 bytes

Sorry if did not try achieving this with a pure rubyOnRails application
(without using Goldberg) before post here, I'll try that this afternoon
because I'm suspecting Goldberg may be asking the report for
authentication when it try to get data from
<RAILSAPP>/app/views/XXXXX/customer_list

nevertheless, it's almost sure I have a problem with ruby accesing
XmlJasperinterface, as the message I recevie from command line attempt
states

any comment is welcome, regards Mauricio
5d550787544f33d5d1201fa284daa320?d=identicon&s=25 Denis Mahony (denis_mahony)
on 2008-08-08 20:57
> but my result pdf file is still getting 0 bytes
...
> any comment is welcome, regards Mauricio

Ae you actually getting a PDF file displayed that you can save, with no
data (a blank page?) Or are you getting a corruption when the PDF is
being written ?

The XML selection query used in the Rails code in the line-

send_doc(
render_to_string(:template => ‘accounting/customer_list’, :layout =>
false),
‘/customer_list_result/invoice_customers/customer’,
‘custrep’,
‘CustomerReport’,
’pdf’)

viz. /customer_list_result/invoice_customers/customer

must match the XML quey used when designing the Report to ensure you do
actually select the record/nodes you want to target.

Sorry, I'm not familiar with your development variation :(

Denis
170ef87c17047bb52b62caeb7355f029?d=identicon&s=25 Mauricio Alcayaga (gusantor)
on 2008-08-09 00:14
Denis Mahony wrote:

> Ae you actually getting a PDF file displayed that you can save, with no
> data (a blank page?) Or are you getting a corruption when the PDF is
> being written ?
>.
>.
>.
> Sorry, I'm not familiar with your development variation :(
>
> Denis

thank you Denis

I'm receiving a "file" with 0 bytes (absolutely blank page, no source
code), I can't save it

it seems that I first must be sure that java command line works
4dd75353dff93de29b53a1ac890a1771?d=identicon&s=25 Karthi kn (karthikeyan7585)
on 2008-08-11 05:32
It may be because of the invalid character in the stream. Try to read
the stream in binary mode. I mean, Use "w+b" instead of "w+", when you
open the pipe using IO.popen().
170ef87c17047bb52b62caeb7355f029?d=identicon&s=25 Mauricio Alcayaga (gusantor)
on 2008-08-11 23:42
Karthi kn wrote:
> It may be because of the invalid character in the stream. Try to read
> the stream in binary mode. I mean, Use "w+b" instead of "w+", when you
> open the pipe using IO.popen().

thank you Karthi, but I'm not using ruby to call XmlJasperInterface,
just the java command line

I was able to define CLASSPATH, so the java call it's working now, but
with same results that before... XmlJasperInterface.class is giving me a
corrupted pdf file, when I try to open it, acrobat says "there was an
error opening this document. A file read error has ocurred"

I reviwed the Xpath and it's the same that I set in the report, also
update all jar files to IReport3.0

thanks anyway
4dd75353dff93de29b53a1ac890a1771?d=identicon&s=25 Karthi kn (karthikeyan7585)
on 2008-08-12 06:15
Can you pls paste your code or java command here? That would be helpful.
170ef87c17047bb52b62caeb7355f029?d=identicon&s=25 Mauricio Alcayaga (gusantor)
on 2008-08-12 15:25
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>
<pettycashrequest>
  <account_id type="integer">10</account_id>
  <amount type="decimal">21.1</amount>
  <description>first one</description>
  <id type="integer">2</id>
</pettycashrequest>
<pettycashrequest>
  <account_id type="integer">105</account_id>
  <amount type="decimal">210000.21</amount>
  <description>second comment</description>
  <id type="integer">4</id>
</pettycashrequest>
  </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
4dd75353dff93de29b53a1ac890a1771?d=identicon&s=25 Karthi kn (karthikeyan7585)
on 2008-08-12 16:41
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>
<pettycashrequest>
  <account_id type="integer">10</account_id>
  <amount type="decimal">21.1</amount>
  <description>first one</description>
  <id type="integer">2</id>
</pettycashrequest>
  </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.
4dd75353dff93de29b53a1ac890a1771?d=identicon&s=25 Karthi kn (karthikeyan7585)
on 2008-08-12 16:42
You can refer my blog if you need.

http://kkarthik.wordpress.com/2008/06/10/how-to-in...
170ef87c17047bb52b62caeb7355f029?d=identicon&s=25 Mauricio Alcayaga (gusantor)
on 2008-08-14 18:21
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
170ef87c17047bb52b62caeb7355f029?d=identicon&s=25 Mauricio Alcayaga (gusantor)
on 2008-08-28 04:48
hi again, finaly it work :)

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/ins...),
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=<RAILSAPP>/app/jasper/bin:<RAILSAPP>/app/jasper/lib/filejar1.jar:<RAILSAPP>/app/jasper/lib/filejar2.jar:<RAILSAPP>/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
5d550787544f33d5d1201fa284daa320?d=identicon&s=25 Denis Mahony (denis_mahony)
on 2008-08-29 00:31
Mauricio Alcayaga wrote:
> thank everybody

I'm glad for your success :)

Denis
170ef87c17047bb52b62caeb7355f029?d=identicon&s=25 Mauricio Alcayaga (gusantor)
on 2009-11-05 18:23
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?g...
, so I set iText-2.0.8.jar, and it works
cheers!
6ee76d1280849cd14a28c63d71dbdcb1?d=identicon&s=25 Md. mujahidul islam Khan (mujahid_suvastu)
on 2010-03-09 08:01
Herman Jansen wrote:
> @Fred
> Thanks Fred. It works the way you suggested.
>
> @Peter
> It's based on
> http://wiki.rubyonrails.org/rails/pages/HowtoInteg...
> , 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/HowtoInteg... 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
F0eff1c5a819ce5dded1c008ee6a515d?d=identicon&s=25 Eswaramoorthy Selvaraju (eswaramoorthy)
on 2011-03-07 11:22
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.
F0eff1c5a819ce5dded1c008ee6a515d?d=identicon&s=25 Eswaramoorthy Selvaraju (eswaramoorthy)
on 2011-03-07 11:23
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.
8b440a301e8d75215626dbf4207c4459?d=identicon&s=25 vincent vincent (m20cent)
on 2011-04-26 18:02
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
8b440a301e8d75215626dbf4207c4459?d=identicon&s=25 vincent vincent (m20cent)
on 2011-04-27 14:56
Jon Garvin wrote in post #629004:
> On Feb 6, 3:51 am, FlexRails <her...@intermatics.be> 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
B045d4e171b1f7789862899306e53c9d?d=identicon&s=25 anusha c. (anusha_c)
on 2012-02-24 07:12
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
Cf6ec4d14ac8096e3eba3e8649708e7c?d=identicon&s=25 kengsreng tang (kengsreng)
on 2012-02-24 11:49
Hi all
http://wiki.rubyonrails.org/rails/pages/howtointeg...
i can't read this blog !!!
3963db0c4b50767377d1bfde88234ce2?d=identicon&s=25 Anushank Lal (anushank)
on 2012-10-16 09:31
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/howtointeg...

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.
3963db0c4b50767377d1bfde88234ce2?d=identicon&s=25 Anushank Lal (anushank)
on 2012-10-16 09:33
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.
927d157b8ddf72d3eb115c4e4a6e6263?d=identicon&s=25 arron w. (arron_w)
on 2014-06-11 05:26
KathysKode@gmail.com 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_r...)
I am
using can help with the related barcoding programs?



Best regards,
Arron
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.