convert parameter to int in Stimulsoft mrt

You can use standard C# function in Stimulsoft .MRT report although I have not seen them in documents as such. For example if you want to add two parameter values in Stimulsoft MRT Report, you will have to convert them to integer first. By default they are of “Object” type.

In the following example, I am converting @Month object into an integer. It must first be converted to string using ToString() and then use Int32.Parse() function to convert it.

{Int32.Parse(DataSource1.Parameters["@Month"].ParameterValue.ToString())}

This variable can then be added to another variable (concatenation) as

Int32.Parse(DataSource1.Parameters[“@num1”].ParameterValue.ToString()) + Int32.Parse(DataSource1.Parameters[“@numb”].ParameterValue.ToString())

Advertisements
This entry was posted in Tutorials/Tips and tagged , . Bookmark the permalink.

1 Response to convert parameter to int in Stimulsoft mrt

  1. amin says:

    Coooool, Thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s