Jump to content
We've recently updated our Privacy Statement, available here ×

import a class into jrxml


magarwal

Recommended Posts

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

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...