Refreshing data with Business Objects

Stimulsoft Reports.NET discussion
Post Reply
Martin Hart Turner
Posts: 66
Joined: Wed Apr 04, 2007 3:32 am
Location: Spain

Refreshing data with Business Objects

Post 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.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Refreshing data with Business Objects

Post by Vital »

You can use following code:

Code: Select all

report.DataStore.Clear();
report.RegData("MyData", myobj);
Thank you.
Martin Hart Turner
Posts: 66
Joined: Wed Apr 04, 2007 3:32 am
Location: Spain

Refreshing data with Business Objects

Post 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.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Refreshing data with Business Objects

Post by Vital »

In what place of report you call your static function?

Thanks.
Martin Hart Turner
Posts: 66
Joined: Wed Apr 04, 2007 3:32 am
Location: Spain

Refreshing data with Business Objects

Post by Martin Hart Turner »

Vital:

The text control that calls my static function to get it's contents is in a FooterBand.

Thanks,
MartinH.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Refreshing data with Business Objects

Post by Vital »

We need more information. Please send your code and your report.

Thank you.
Martin Hart Turner
Posts: 66
Joined: Wed Apr 04, 2007 3:32 am
Location: Spain

Refreshing data with Business Objects

Post 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.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Refreshing data with Business Objects

Post by Vital »

Problem solved.

Thank you.
Post Reply