Jump to content

removeField


2004 IR Help

Recommended Posts

By: Dave Welsh - jdwelsh

removeField

2005-01-18 08:10

I want to programmatically remove a field from a report. I have the simple report definition in an external XML file. My code looks like this:

 

JasperDesign jasperDesign = JasperManager.loadXmlDesign(<external file>);

 

jasperDesign.removeField("PROD_NAME");

 

JasperReport jasperReport = JasperManager.compileReport(jasperDesign);

 

The compileReport method throws the following exception:

 

Report design not valid :

1. Field not found : PROD_NAME

net.sf.jasperreports.engine.JRException: Report design not valid :

 

I'm wondering if anyone has had success using the removeField method, and if so, what am I doing wrong?

Link to comment
Share on other sites

  • 2 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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...