Page 1 of 1

How to save modified data in preview ?

Posted: Mon Aug 01, 2011 9:43 pm
by lampson
Hi
In the code to generate an array of variables,and then bind to table in design mode (table can be edited).
Modify the array of values, how to save the array to C# code ?
Have trouble a few days.
Thank you to help



How to save modified data in preview ?

Posted: Tue Aug 02, 2011 9:36 am
by Ivan
Hello,

Sorry, maybe we did not exactly understood your question. Could you explain your issue in more details.
And, if possible, send us a sample report template with data or a simple test project, which reproduces the issue?

Thank you.

How to save modified data in preview ?

Posted: Tue Aug 02, 2011 7:18 pm
by lampson
Sorry, I means , in the c# code , how to get text box value of page??


How to save modified data in preview ?

Posted: Wed Aug 03, 2011 1:05 am
by Ivan
Hello,

You can use the following code, for example:

Code: Select all

            StiReport rep = new StiReport();
            rep.Load(@"d:\report.mrt");
            rep.Render();
            rep.Show(true);

            //for save all editable fields
            rep.SaveEditableFields("d:\\test.xml");

            //for get textbox values list
            ArrayList textValues = new ArrayList();
            foreach (StiPage page in rep.RenderedPages)
            {
                foreach (StiComponent comp in page.GetComponents())
                {
                    if (comp.Name == "YourComponentName")
                    {
                        string st = (comp as StiText).Text;
                        textValues.Add(st);
                    }
                }
            }
Thank you.

How to save modified data in preview ?

Posted: Thu Aug 04, 2011 4:22 am
by lampson
Thanks, I'll try it .

How to save modified data in preview ?

Posted: Thu Aug 04, 2011 7:59 am
by Alex K.
Hello,

Ok.
Let us know if you need any additional help.

Thank you.