carlos.cotelo
-
Posts
4 -
Joined
-
Last visited
Content Type
Profiles
Forum
Events
Featured Visualizations
Knowledge Base
Documentation (PDF Downloads)
Blog
Documentation (Test Area)
Documentation
Dr. Jaspersoft Webinar Series
Security Advisories
Downloads
Posts posted by carlos.cotelo
-
-
it seems that iReport can't process the xml datasource.
By example, i can't get any values searching with xpath when i run the queries in iReport, in the utility "Data/Consulta de Informe".
In this utility ("Query report"), in the part "Proveedor Fuente de Datos" the message "The active connection is not a Jasper Reports Datasource provider" appears when i touch the button "Coger datos de la fuente de datos".
When i try to execute the jrxml inside iReport, nothing happens, simply nothing. Any pdf is created.
And any error is show in the screen.
As i say in the first message, i think that the codification (in the ISO-8859-1 encoding) of the xml datasource is the problem here.
-
i can't execute a jrxml in my iReport because of the xml datasource it uses.
It's a xml in ISO-8859-1 encoding, but in the first line of the xml it has only the xml version, not the encoding:
Code: <?xml version="1.0"?>
I make also a webapp, and here, there aren't any kind of problem to compile and execute the jrxml with the same datasource that in iReport, the code to execute this is:
Code: [code]
String resultFileName = getResultFileName(template);
File createdFile = new File(getPdfsDir(), resultFileName);
System.out.println(" creating output file ... "«»);
DOMParser parser = new DOMParser();
InputSource in = new InputSource();
in.setEncoding("ISO-8859-1"«»);
in.setByteStream(new FileInputStream(new File(getXmlInputDir(), inputFileName)));
parser.parse(in);
System.out.println(" correctly parsed: "«»);
Document doc = parser.getDocument();
File file = new File(getTemplatesDir(), template);
System.out.println(" TemplateFileName " + file.getAbsolutePath());
InputStream inputStream = new FileInputStream(file);
jasperReport = JasperCompileManager.compileReport(inputStream);
jasperPrint = JasperFillManager.fillReport(jasperReport, new HashMap(), new JRXmlDataSource(doc));
JRPdfExporter exporterPDF = new JRPdfExporter();
exporterPDF.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporterPDF.setParameter(JRExporterParameter.OUTPUT_FILE, createdFile);
exporterPDF.exportReport();How can i do it with iReport?
I try changed the ireport.encoding property, via Edit/Personal Properties (or personal profiles, i have iReport in spanish, is Editar/Propiedades personales), but it doesn't seem to work.
I can't change my xml datasource to add the encoding (it's client's responsability...)
Thanks for your replies.
-
To solve this problem, i just write some String like "" or "application_Id" on the field application Id in the barcode's form.
Looking at the source of this class, BcImage, was why i can solve this little problem, that all the morning i spend with.size=372]http://www.jasperforge.org/components/com_joomlaboard/uploaded/images/barcodeForm.JPG
Post edited by: carlos.cotelo, at: 2008/03/04 10:38
Post edited by: carlos.cotelo, at: 2008/03/04 10:40
Barecode text is masked
in Products
Posted
Did you encounter the solution?
I try rewriting the class BcImage to setting the font manually, but i couldn't find a good solution.