Page 1 of 2

Change structure of DataSource from without of Designer

Posted: Wed Sep 22, 2010 5:47 am
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 ;-)

Change structure of DataSource from without of Designer

Posted: Wed Sep 22, 2010 7:42 am
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...

Change structure of DataSource from without of Designer

Posted: Fri Sep 24, 2010 1:04 am
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.

Change structure of DataSource from without of Designer

Posted: Fri Sep 24, 2010 1:54 am
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!

Change structure of DataSource from without of Designer

Posted: Mon Sep 27, 2010 12:34 am
by Alex K.
Hello,

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

Thank you.

Change structure of DataSource from without of Designer

Posted: Mon Oct 04, 2010 5:32 am
by LukasT
Hello,
could you send me any concrete example...?
Thank you.

Change structure of DataSource from without of Designer

Posted: Mon Oct 04, 2010 5:58 am
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.

Change structure of DataSource from without of Designer

Posted: Mon Oct 04, 2010 7:30 am
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...

Change structure of DataSource from without of Designer

Posted: Mon Oct 04, 2010 9:14 am
by Jan
Hello,

You can call Synchronize function with help of following code:

Code: Select all

report.Dictionary.Synchronize();
Thank you.

Change structure of DataSource from without of Designer

Posted: Mon Oct 04, 2010 9:20 am
by LukasT
... sorry, but this does not invoke refreshing/repainting of Data Sources visual tree in Designer... :-(