Change structure of DataSource from without of Designer

Stimulsoft Reports.NET discussion
LukasT
Posts: 306
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

Change structure of DataSource from without of Designer

Post by LukasT »

Hello,
Is possible to change structure of DataSource (DataSet) from without of Designer? We have external data-structure designer and need to change structure in Designer without its closing and opening...
... that is because we have three layer architecture, designer is on presentation layer and user hasn't access to database. Structure of data is designing by server-client SQL application and result of this design is served to your Designer as DataSet...
Thank you for your advice ;-)
LukasT
Posts: 306
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

Change structure of DataSource from without of Designer

Post by LukasT »

... or, how to invoke Synchronize of DataSource in Designer (Synchronize button)? I have realized, that I can change data structure in runtime in StiReport which is designed, but don't know how to invoke designer to refresh DataSource tree...
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Change structure of DataSource from without of Designer

Post by Alex K. »

Hello,

In the release this feature will be added. It will also be possible to subscribe to the StiOptions.Engine.GlobalEvents.ReportSynchronized event and add your code to change the Dictionary.

Thank you.
LukasT
Posts: 306
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

Change structure of DataSource from without of Designer

Post by LukasT »

Hello Aleksey,
am I to understand, that you will add Synchronize method on Designer and this will synchronize designer dictionary with actual report dictionary?
Great... I am looking forward to release and some example ;-)
Have a nice day!
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Change structure of DataSource from without of Designer

Post by Alex K. »

Hello,

Yes, it is possible to subscribe to the Synhronize method in the designer.

Thank you.
LukasT
Posts: 306
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

Change structure of DataSource from without of Designer

Post by LukasT »

Hello,
could you send me any concrete example...?
Thank you.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Change structure of DataSource from without of Designer

Post by Alex K. »

Hello,

You can use the following code:

Code: Select all

        private void bDesign_Click(object sender, EventArgs e)
        {
            StiReport report = new StiReport();
            report.Load();
            StiOptions.Engine.GlobalEvents.ReportSynchronized += new EventHandler(GlobalEvents_ReportSynchronized);
            report.Design();
        }

        void GlobalEvents_ReportSynchronized(object sender, EventArgs e)
        {
            // Your code for synchronize dictionary (Data Sources)
        }
Thank you.
LukasT
Posts: 306
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

Change structure of DataSource from without of Designer

Post by LukasT »

I am sorry, but this is misunderstanding...
I need some function, which will push Synchronize button on Designer... something, what repaints DataSource tree in Designer after synchronize event...
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Change structure of DataSource from without of Designer

Post by Jan »

Hello,

You can call Synchronize function with help of following code:

Code: Select all

report.Dictionary.Synchronize();
Thank you.
LukasT
Posts: 306
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

Change structure of DataSource from without of Designer

Post by LukasT »

... sorry, but this does not invoke refreshing/repainting of Data Sources visual tree in Designer... :-(
Post Reply