SumRunning problem

Stimulsoft Reports.NET discussion
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

SumRunning problem

Post by Jan »

Hello,
khongminh9 wrote:Thanks Edward, but hoow to access variable MyVariable from Code Behind?
When i access variable MyVariable is emtpy
Code i used:
rpt.Dictionary.Variables["MyVariable"].Value

This is example (attach). How to access value txtTotalPrice after calculate
You can use following code:

Code: Select all

rpt["MyVariable"]
Thank you.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

SumRunning problem

Post by Jan »

Hello,
khongminh9 wrote:i want convert totalprice decimal to word same function ToCurrencyWords in Stimusoft report
but i need convert to Vietnam language.
Unfortunatelly report engine does not support Vietnam language.

Thank you.
AAA
Posts: 8
Joined: Tue Jul 07, 2009 11:40 pm
Location: dsda

SumRunning problem

Post by AAA »

Thanks Jan. I already accessed with syntax rpt["MyVariable"]
Now i want update variable MyVariable with new value after convert it to Words

Code: Select all

rpt.RegData("SqlDS_Contract", dt);
rpt.Render();

// After rpt.Render() i can access correct value of MyVariable with rpt["MyVariable"]            
ReadNumber rn = new ReadNumber(Convert.ToInt64(rpt["MyVariable"]));
string strWord = rn.reader();   // Convert decimal to Words
((Stimulsoft.Report.Components.StiText)rpt.GetComponentByName("txtTotalPriceinWord")).Text.Value = strWord;
But new value cant update to txtTotalPriceinWord. Can I rerender txtTotalPriceinWord with new value?
I already try again rpt.Render(); but not affect
Sorry my bad english
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

SumRunning problem

Post by Ivan »

Hello,
khongminh9 wrote:... But new value cant update to txtTotalPriceinWord. Can I rerender txtTotalPriceinWord with new value?
I already try again rpt.Render(); but not affect
Please modify your code as following:

Code: Select all

rpt.RegData("SqlDS_Contract", dt);
rpt.Render();

// After rpt.Render() i can access correct value of MyVariable with rpt["MyVariable"]           
ReadNumber rn = new ReadNumber(Convert.ToInt64(rpt["MyVariable"]));
string strWord = rn.reader();   // Convert decimal to Words
((Stimulsoft.Report.Components.StiText)rpt.GetComponentByName("txtTotalPriceinWord")).Text.Value = strWord;

rpt.Compile();
rpt.Render();
Thank you.
AAA
Posts: 8
Joined: Tue Jul 07, 2009 11:40 pm
Location: dsda

SumRunning problem

Post by AAA »

Thanks so much Ivan
My problem resolved
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

SumRunning problem

Post by Ivan »

Hello,

We are always glad to help you.
Let us know if you need any additional help.

Thank you.
Post Reply