Variables

Stimulsoft Reports.NET discussion
Post Reply
MikeC
Posts: 51
Joined: Mon Jun 07, 2010 3:36 pm

Variables

Post by MikeC »

Hi,
I have a variable that is currently string data, but it's a 4 digit year (such as 1991). I need to convert it to something so I can subtract a year from it and put it in the report. For example:

The year that the variable is holding is 1991. I need to show the prior year (1990) in couple places in the report.

How to I convert the string data to something I can do a math calculation on in another variable?

Thanks
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Variables

Post by Ivan »

Hello,

Please try to use the following expression:

Code: Select all

{int.Parse(your_variable) - 1}
Thank you.
Post Reply