Page 1 of 1

Change value of the one of data columns in the rendered document

Posted: Thu Apr 21, 2022 10:28 pm
by nozdUp
Dear Stimulsoft team

I have the rendered document in the *.mdc file. Berfore print I want change value of one data column in the document. How can I do this?

Code: Select all

var stiReport = new StiReport();
stiReport.LoadDocument(filePath); // path of the *.mdc file
// Which command for change one of the data columns?
Best regards,
nozdUp

Re: Change value of the one of data columns in the rendered document

Posted: Fri Apr 22, 2022 1:41 pm
by Lech Kulikowski
Hello,

You should change it in the report template - mrt file and then render the report again.

Or use the following code:
(report.RenderedPages.GetComponentByName("Text1") as StiText).Text = "new text";

Thank you.

Re: Change value of the one of data columns in the rendered document

Posted: Fri Apr 22, 2022 2:51 pm
by nozdUp
You helped me!

Thanks!

Re: Change value of the one of data columns in the rendered document

Posted: Fri Apr 22, 2022 7:38 pm
by Lech Kulikowski
Hello,

You are welcome.