johanandren Posted May 12, 2009 Share Posted May 12, 2009 We have created a custom component following the barcode example in the jasper reports project package and the description in the "JasperReport Ultimate Guide". Now we have come to the next step, but we have no clue about how to actually use our custom component in a report through iReport. Anyone knows how to add a custom component into the iReport palette or just by editing the jrxml-file? Thanks Link to comment Share on other sites More sharing options...
andfedotov Posted May 13, 2009 Share Posted May 13, 2009 Use it derectly in jrxml If you want to see it in iReport you might try to develop a plugin for this... Link to comment Share on other sites More sharing options...
andfedotov Posted May 13, 2009 Share Posted May 13, 2009 Post Edited by andfedotov at 13/05/2009 07:47 AM Link to comment Share on other sites More sharing options...
johanandren Posted May 13, 2009 Author Share Posted May 13, 2009 Ok, so I found the example report that uses the custom component in demo/barcode and following that example on how to add a custom component in the jrxml with the componentElement block I now have this problem: To specify the namespace for my custom component i need to define schemaLocation, the xsd-file for my report is placed on classpath in a jar together with the custom component. When i try with a relative classpath to the xsd-file and then try to compile or view the report in iReport in design mode i get an error that the file cannot be found (the xml parser treats the relative path as an absolute path in the filesystem). Is it possible to get jasper to tell the XML-parser to look for my .xsd in the classpath? In my spring beans-file which i have based on the xml in the barcode demo i have an xmlParser with a "internalSchemaResource" pointing to the xsd-file on the classpath. Is it possible to avoid coding any path to the .xsd file in the report xml and make it use that?Post Edited by johanandren at 05/13/2009 09:30 Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted May 13, 2009 Share Posted May 13, 2009 For this specific details, ask to the JasperReports forum. Lucian and Teodor are the experts of the custom components stuff.About how to write an ireport plugin for iReport in order to use your custom component, in the next version 3.5.2 there will be the support for Barcode. In 3.5.1 you can already find the support for the List component (which could be a little bit more complicated of what you actually need). I really hope to find the time to write a tutorial, maybe based on the integration I'm working on for the Barcode component.Giulio Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now