Create designer menu ???

Stimulsoft Reports.NET discussion
jayakumargr
Posts: 85
Joined: Sat Jan 20, 2007 4:21 am

Create designer menu ???

Post by jayakumargr »

Hai,
is there any possibilty to create designer menu in windows form ? if possible then how to create....???

(that is,i add menu names in my own format.and those menus are performing desinger menu functionalities)

Thanks in advance,
Jayakumar
Guest
Posts: 182
Joined: Tue Jun 06, 2006 8:04 am

Create designer menu ???

Post by Guest »

Use follow code for your button to access menu functionalities, for example, for create new report:

Code: Select all

StiMainMenuService mainmenu = StiMainMenuService.GetService(stiDesignerControl1);

mainmenu.InvokeReportNew();
where stiDesignerControl1 your StiDesignerControl placed to windows form
For create new page:

Code: Select all

StiMainMenuService mainmenu = StiMainMenuService.GetService(stiDesignerControl1);

mainmenu.InvokePageNew();
and etc.

Thank you.
jayakumargr
Posts: 85
Joined: Sat Jan 20, 2007 4:21 am

Create designer menu ???

Post by jayakumargr »

Hai,
Thanks for your reply.it works fine.

i want to know,how to open dictionay window,report tree and properties window at run time ???

Please provide the solutions...

Thanks in advance,
Jayakumar
Guest
Posts: 182
Joined: Tue Jun 06, 2006 8:04 am

Create designer menu ???

Post by Guest »

For Property Grid use the following code:

Code: Select all

StiPropertiesPanelService properties = new StiPropertiesPanelService();
properties.Init(stiDesignerControl1);
For Report Tree:

Code: Select all

StiReportTreePanelService tree = new StiReportTreePanelService();
tree.Init(stiDesignerControl1);
For Dictionary:

Code: Select all

StiDictionaryPanelService dictionary = new StiDictionaryPanelService();
dictionary.Init(stiDesignerControl1);
Thank you.
jayakumargr
Posts: 85
Joined: Sat Jan 20, 2007 4:21 am

Create designer menu ???

Post by jayakumargr »

Hai,
Thanks. Which namespace is used for StiPropertiesPanelService,StiReportTreePanelService and StiDictionaryPanelService ???

Thanks in Advance,
Jayakumar
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Create designer menu ???

Post by Brendan »

Code: Select all

Stimulsoft.Report.Design.Panels
jayakumargr
Posts: 85
Joined: Sat Jan 20, 2007 4:21 am

Create designer menu ???

Post by jayakumargr »

Hai,

i wrote following,


StiReport rpt = new StiReport();
StiDesigner design = new StiDesigner(rpt);

StiReportTreePanelService tree = new StiReportTreePanelService();
tree.Init(design);

but it doesn't work...

How to show the Reporttree window ??

Thanks,
Jayakumar
Guest
Posts: 182
Joined: Tue Jun 06, 2006 8:04 am

Create designer menu ???

Post by Guest »

You must place StiDesignerControl on your windows form and write:

Code: Select all

StiReport rpt = new StiReport();
stiDesignerControl1.Report = rpt;
StiReportTreePanelService tree = new StiReportTreePanelService();
tree.Init(stiDesignerControl1);
Thank you.
jayakumargr
Posts: 85
Joined: Sat Jan 20, 2007 4:21 am

Create designer menu ???

Post by jayakumargr »

Hai,
i want to open report tree for existing(already opened designer) report designer. it is same as like designer view menu operation.

View --> Report Tree(ctrl+shift+l)

How to open report tree...???


Thanks in advance,
Jaykumar
Guest
Posts: 182
Joined: Tue Jun 06, 2006 8:04 am

Create designer menu ???

Post by Guest »

Use the following code:

Code: Select all

            StiReportTreePanelService tree = StiReportTreePanelService.GetService(design);
            StiPanelService service = (tree as StiPanelService);
            if (service.DockingControl.IsVisible)
            {
                ((StiDockingPanel)service.DockingControl.Parent).DoClose(service.DockingControl);
            }
            else
            {
                design.DockingManager.ClosedControls.Remove(service.DockingControl);
                StiDockingPanel dockingPanel = new StiDockingPanel(design.DockingManager);
                dockingPanel.Controls.Add(service.DockingControl);
                dockingPanel.DockPanelToForm(design, service.DockStyle);
            }  
Of course, you may write

Code: Select all

StiDictionaryPanelService
or

Code: Select all

StiPropertiesPanelService
instead

Code: Select all

StiReportTreePanelService
Thank you.
Post Reply