Jump to content

Data in JavaBeans set datasource not refreshing


croutledge

Recommended Posts

I have created a JavaBeans set datasource to load some test data so i can preview my report in iReport.  But if i amend the code in the Java Class it will only show the new data in the Preview in iReport if i close iReport and start it up again.  Is there any way to get around this?

No matter how many times i click refresh it won't pull the new data in.

Link to comment
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

I have included the folder to the class in the classpath and set it to reloadable and it still won't refresh the data until i close iReport and start again. Does it need to be in a jar file? I find it easier to add the folder the java project is in, into the classpath so i don't always have to export it to a jar.

 

Cheers

Link to comment
Share on other sites

Giulio,

 

Just tried it with a jar file and the refresh works just fine that way. So i created a jar, previewed the report. Changed the Java code to a new value, created the jar and refreshed the preview and it was updated.

 

Would be handy to have this work with a folder as i'm using RAD and i wouldn't normaly create a JAR file.

 

Thanks for help

 

Carl

Link to comment
Share on other sites

hm, no idea.

I use scriptlets and a JRBeanCollectionDataSource as data source expr. for my subreport. All my reports and scriptlets (in a subdir) are in folders, i.e. I don't use jars at all and everything works fine.

regards,
dman

Link to comment
Share on other sites

  • 2 years later...

I have found a way to get iReport to refresh the datasource using a classpath folder.  After you change the dataprovider class and re-compile it, go to the Connections/Datasources dialog by clicking the button to the left of the datasource dropdown.  Select the datasource you are using and click the Modify button.  Then just click the Save button.  This will refresh the memory copy of the datasource class.

It would be really nice if the Preview function would just reload the class automatically.

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