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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Variables within a formula

Thread ID:





56387 Feb 14,2007 12:06 PM UTC Feb 14,2007 01:30 PM UTC WinForms 1
Tags: Calculate
Henrik Brinch
Asked On February 14, 2007 12:06 PM UTC

Dear Sirs,

Is there any way I can add/set the index (business objects) from within a formula.

E.g. I want to be able to set a variable [A] to a value from within the formula, set a variable [B] and then set a [C] with the sum of [A] and [B] - all this from within the formulas.

I've tried making my own functions, SetVar that adds to the indexer


[A]+[B] gives 30 ... so that works...


SetVar(C, [A]+[B])


bA1A2ab ??????

What do I do?

Best Regards,
- Henrik Brinch

Administrator [Syncfusion]
Replied On February 14, 2007 01:30 PM UTC

bA1A2ab is the parsed version of [A]+[B]. If you evaluate bA1A2ab (by calling calcquick.Engine.ComputeValue("bA1A2ab"), you should get the sum of 10 and 20.

You did not post your SetVar, but if you somehow do the equivalent of

calcQuick["C"] = "=[A]+[B]";

then I think it should work. Here is a snippet that works as expected for me inside a button handler.

Syncfusion.Calculate.CalcQuick q = new Syncfusion.Calculate.CalcQuick(true);
q["A"] = "10";
q["B"] = "20";
q["C"] = "=[A]+[B]";

this.label1.Text = q["C"]; 'shows 30


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon