How to save modified data in preview ?

Stimulsoft Reports.NET discussion
Post Reply
lampson
Posts: 42
Joined: Wed Dec 30, 2009 4:28 am

How to save modified data in preview ?

Post 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


Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

How to save modified data in preview ?

Post 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.
lampson
Posts: 42
Joined: Wed Dec 30, 2009 4:28 am

How to save modified data in preview ?

Post by lampson »

Sorry, I means , in the c# code , how to get text box value of page??

Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

How to save modified data in preview ?

Post 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.
lampson
Posts: 42
Joined: Wed Dec 30, 2009 4:28 am

How to save modified data in preview ?

Post by lampson »

Thanks, I'll try it .
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

How to save modified data in preview ?

Post by Alex K. »

Hello,

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

Thank you.
Post Reply