Page 1 of 1
Refreshing data with Business Objects
Posted: Tue Jun 05, 2007 7:00 am
by Martin Hart Turner
Hi:
I have a report that is connected to Business Objects (DevExpress - XPO) and I'm having trouble getting the report to refresh if I change the underlaying object.
For instance I have an Invoice that I print, I then change the discount and save the object, but the report will not see this change until I exit the program and enter again.
How can I force a data refresh? I've tried Refresh() etc, but they don't work.
Regards,
MartinH.
Refreshing data with Business Objects
Posted: Tue Jun 05, 2007 7:19 am
by Vital
You can use following code:
Code: Select all
report.DataStore.Clear();
report.RegData("MyData", myobj);
Thank you.
Refreshing data with Business Objects
Posted: Tue Jun 05, 2007 11:22 am
by Martin Hart Turner
Vital:
Vital wrote:You can use following code:
Code: Select all
report.DataStore.Clear();
report.RegData("MyData", myobj);
Thank you.
Sorry, but that didn't work, but it may be my fault as I didn't explain in enough detail where my problem was coming from.
The contents of the Text I am trying to update is from a static function in my program, not directly from a DataSource. The problem is that my static function is not called after the initial invoice has been printed, it seems to use data in a cache. The report.DataStore.Clear() is fine for resetting the data, but I need something else to tell the report to reset itself and call my static functions a second time.
Thanks,
MartinH.
Refreshing data with Business Objects
Posted: Tue Jun 05, 2007 2:08 pm
by Vital
In what place of report you call your static function?
Thanks.
Refreshing data with Business Objects
Posted: Wed Jun 06, 2007 2:11 am
by Martin Hart Turner
Vital:
The text control that calls my static function to get it's contents is in a FooterBand.
Thanks,
MartinH.
Refreshing data with Business Objects
Posted: Wed Jun 06, 2007 5:00 am
by Vital
We need more information. Please send your code and your report.
Thank you.
Refreshing data with Business Objects
Posted: Wed Jun 06, 2007 5:14 am
by Martin Hart Turner
Vital:
Vital wrote:We need more information. Please send your code and your report.
Thank you.
I have sent the report via email to support [@] stimulsoft.com
Thanks,
MartinH.
Refreshing data with Business Objects
Posted: Wed Jun 06, 2007 1:04 pm
by Vital
Problem solved.
Thank you.