hmahdavi
hmahdavi

Reputation: 2354

How to set text of Text element in StimulSoft via code?

I try to set text of Text element in my stimulsoft report via code.I use this code in TextEditor windows into Expression tab.but don't work .I try to use this code into BeforPrintElement and AfterPrintElement events but in this case don't print any things. How to fix this?

    {if(ProcGetReportTRAINPDF.Fk_sellerCode=="8006")
      {
    AgencyCommission.value=  ((int.Parse(ProcGetReportTRAINPDF.Formula10)*2)/100).Tostring();
      }
if(ProcGetReportTRAINPDF.Fk_sellerCode=="8025")
      {
    AgencyCommission.value=  ((int.Parse(ProcGetReportTRAINPDF.Formula10)*1.8)/100).Tostring();
      }
    }

Upvotes: 0

Views: 1600

Answers (1)

HighAley
HighAley

Reputation: 1329

The Value of the text component is compiled as a method, so it's impossible to change text this way. You should use the GetValue event of the text component.

Upvotes: 1

Related Questions