edit on preview form, but the print result is not same...
i want to change the print value on the preview form.
when i close the editor form, the preview control display the right result. that's what i want.
but the print result don't change anymore...

        private void TxtObj_Click(object sender, EventArgs e)
        {
            TextObject curTextObject = sender as TextObject;
            if (curTextObject == null) return;
            curTextObject.InvokeEditor();
            curTextObject.SaveState();
            curTextObject.SaveStyle();
            InitModel.report.Preview.Refresh();
        }
when i close the editor form, the preview control display the right result. that's what i want.
but the print result don't change anymore...
This discussion has been closed.
Comments
but it's too complex...
what can i do?
Hello!
The TextObject.InvokeEditor() method edits only a temporary in-memory copy of the object in the current preview—to ensure that the changes are included in the final printout and export, you must save the modified page back to PreparedPages using ModifyPage(...):
private void TxtObj_Click (object sender, EventArgs e) { if (sender is TextObject curText && curText.InvokeEditor()) { int pageIdx = report.Preview.PageNo - 1; var page = report.PreparedPages.GetPage(pageIdx); // If necessary, find the object on the page and update its Text report.PreparedPages.ModifyPage(pageIdx, page); report.Preview.Refresh(); } }After calling ModifyPage(...), the modified text is saved both when printing and when exporting to PDF without launching the full designer.