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:
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
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>
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.
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
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?
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
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-
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().
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
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?
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. …….
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.
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.