magarwal Posted March 2, 2007 Share Posted March 2, 2007 I am trying to set a parameter in my jrxml to -<parameter name="MapValue" isForPrompting="false" class="gov.fema.paegrants.util.PdfDataSource"/> and I do have an import statement -<import value="gov.fema.paegrants.util.*" /> but when I compile my JRXML using IReport, I get the following error - net.sf.jasperreports.engine.JRException:ÂErrorsÂwereÂencounteredÂwhenÂcompilingÂreportÂexpressionsÂclassÂfile: 1.Âgov.fema.paegrants.util.PdfDataSourceÂcannotÂbeÂresolvedÂtoÂaÂtype ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂvalueÂ=Â(net.sf.jasperreports.engine.JRDataSource)(((gov.fema.paegrants.util.PdfDataSource)parameter_MapValue.getValue())); Any help would be appreciated. Link to comment Share on other sites More sharing options...
lucianc Posted March 2, 2007 Share Posted March 2, 2007 Is this class present on the iReport classpath (Options/Classpath)? Regards,Lucian Link to comment Share on other sites More sharing options...
magarwal Posted March 2, 2007 Author Share Posted March 2, 2007 IReport gives 2 options - Add a folder and Add a Jar. I have added the folder where this class file resides on my machine but that did not help Link to comment Share on other sites More sharing options...
lucianc Posted March 3, 2007 Share Posted March 3, 2007 You have to add a class folder in the same way you would add it to a Java classpath. I.e. if your PdfDataSource.class file is under the x/y/z/gov/fema/paegrants/util folder, you need to add x/y/z to the classpath and not x/y/z/gov/fema/paegrants/util. HTH,Lucian 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