We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Automatically recalculating dependant formulas

Thread ID:

Created:

Updated:

Platform:

Replies:

52895 Dec 5,2006 03:14 PM Dec 7,2006 07:22 AM Windows Forms 1
loading
Tags: Calculate
Greg Perrott
Asked On December 5, 2006 03:14 PM

I have created a custom function that returns real-time data from the Reuters network.

I am using the CalcQuick class to define formulas that use the real-time data. The custom function is called “REUTER and is passed a string parameter that defines what data to capture.

this.calculator["Bond Turnover 2017"] = "=REUTER('NZSPREAD,IRGROW,3,1,48,5')";
this.calculator["IIB 2016"] = "=REUTER('NZG0216=FISW,HS_CODE')";
this.calculator["TEST"] = "=([Bond Turnover 2017] + [IIB 2016])/2";
this.calculator["TEST1"] = "=REUTER('NZSPREAD,IRGROW,3,1,48,5') + REUTER(\"NZG0216=FISW,HS_CODE\")";
this.calculator["TEST2"] = "=[TEST]*2";

In the example above, when a new value arrives from Reuters for the “Bond Turnover 2017”, I would like to recalculate the “Bond Turnover 2017” value and have all other dependant values (eg “TEST”, and “TEST2”) recalculated automatically and just be notifed via the ValueChanged or ValueSet events when this happens.




Administrator [Syncfusion]
Replied On December 7, 2006 07:22 AM

Here is a sample that I think does what you described.

http://www.syncfusion.com/Support/user/uploads/Calc_Update_3d0f3531.zip

A comment is that the CalcQuick object will not have any way of knowing that a new value has arrived from your Reuter source unless that Reuter source raises an event when one of its values has changed. So, in the sample, a ReuterChanged event was added and is raised when a timer event changes the values provided by Reuter. In this way, you can listen for this event and force CalcQuick to recalculate when this changed event comes in.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;