Current filter:
                                You should refresh the page.
                                0
                                  • Hi Guys,

                                    would it be possible to get an event/virtual method to provide our own TemplateForm? The reason behind this is, that i expect to get many reports in our online gallery, and so i want at least to set an category for each report - so the user can prefilter what kind of report he searches:

                                    for example:

                                    1) label reports

                                    2) invoice reports

                                    3) statistic reports

                                    and so on... Currently i see no way since we cannot extend the template form!

                                    thx

                                • Hi Martin,

                                  Thank you for your question. We appreciate your patience while we are working on a suitable solution.

                                You must  log in  or  register  to leave comments

                                1 Solution

                                0

                                Hi Martin,

                                Thank you for your message.

                                You can create your own report templates without using the ReportTemplateExtension class. Here is some sample code.

                                	
                                [C#]
                                ... public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { XRDesignForm f = new XRDesignForm(); f.DesignMdiController.DesignPanelLoaded += new DesignerLoadedEventHandler(DesignMdiController_DesignPanelLoaded); f.ShowDialog(); } void DesignMdiController_DesignPanelLoaded(object sender, DesignerLoadedEventArgs e) { XtraReport rootReport = e.DesignerHost.RootComponent as XtraReport; ComponentDesigner designer = e.DesignerHost.GetDesigner(rootReport) as ComponentDesigner; designer.Verbs.Add(new CustomDesignerVerb(rootReport, "Load Report Template...", OnLoadReportTemplate)); } void OnLoadReportTemplate(object sender, EventArgs e) { System.Windows.Forms.MessageBox.Show("Show here your custom template form"); using(Report1 reportTemplate = new Report1()) { using(MemoryStream stream = new MemoryStream()) { reportTemplate.SaveLayoutToXml(stream); stream.Position = 0; //native XtraReports method new DevExpress.XtraReports.Import.TemplatesConverter().Convert(stream, ((CustomDesignerVerb)sender).Report); } } } } class CustomDesignerVerb : DesignerVerb { public XtraReport Report { get; private set; } public CustomDesignerVerb(XtraReport report, string text, EventHandler handler) : base(text, handler) { Report = report; } } ...

                                Thanks,
                                Elliot

                                You must  log in  or  register  to leave comments
                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.