please how i can use variable value in created method in stimulsoft? i created string variable in stimulsoft under the name (DateFormat), and in my C# code i pass the value for this variable as the following :
report["DateFormat"] = Session["DateFormat"].ToString();
in my stimulsoft code i created the following code to use the value of this variable and return the result to the text box:
Code: Select all
public string strTodt(DateTime strDate)
{
string dateFormat = Convert.ToString(Dictionary.Variables["DateFormat"]);
string stringDate = strDate.ToString(dateFormat);
return stringDate;
}
error CS0119: 'Stimulsoft.Report.StiReport.Convert(Stimulsoft.Report.Units.StiUnit, Stimulsoft.Report.Units.StiUnit)' is a 'method', which is not valid in the given context
but if i use in my method direct value the report run properly, as the following:
Code: Select all
public string strTodt(DateTime strDate)
{
string stringDate = strDate.ToString("dd,MM,yyyy");
return stringDate;
}
Thank you