Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to deploy a custom report template gallery for an End-User Designer

$
0
0

This example illustrates how easy it is to provide a custom template gallery for your End-User Report Designer.

In this sample, the application's Templates folder contains two sample report templates. Then, only a few lines are added to the app.config file, to deploy the template gallery, and that's it - the gallery is now ready to use.

Question Comments

Added By: Ruud Stumpel at: 7/25/2012 3:22:21 AM    

Hi,

When I run this sample I can't see any option in the smarttag menu that allows me to load the provided templates at runtime.
Do I miss something or is this a bug in this sample?

Thanks,

Ruud Stumpel

Added By: Mike Both - Kaarlaid OÜ at: 7/31/2012 12:08:06 AM    

Same here, no option for loading the templates is shown. Isn't there a report extension required to get this to work?
Mike

Added By: Graham Auty at: 9/13/2012 9:35:03 AM    

This sample works for me, but when I try to put the exact same lines into the config file for a WPF application I get a TypeInitialization exception. I have exactly the same references as the sample, plus additional ones for a WPF application. Has anyone seen this same problem and resolved it?

Added By: DvK at: 6/16/2014 7:27:51 AM    

When searching for a template and pressing enter creates an unhandled exception:

Steps to repeat:
Invoke the gallery.
In the searchbox type 121313 folllowed by enter.

The first template will be shown, but then the designer crashes:

System.InvalidOperationException was unhandled
 HResult=-2146233079
 Message=Invoke of BeginInvoke kan niet op een besturingselement worden aangeroepen tot de vensterkoppeling is gemaakt.
 Source=System.Windows.Forms
 StackTrace:
      bij System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
      bij System.Windows.Forms.Control.BeginInvoke(Delegate method, Object[] args)
      bij DevExpress.XtraReports.Native.Templates.TemplateForm.GetTemplates(TemplatesInfo templatesInfo)
      bij DevExpress.XtraReports.Extensions.ReportTemplateExtension.DevExpress.XtraReports.Extensions.ITemplateProvider.GetTemplates(String searchString, GetTemplatesHandler getTemplates)
      bij DevExpress.XtraReports.Native.Templates.TemplateForm.timer1_Tick(Object sender, EventArgs e)
      bij System.Windows.Forms.Timer.OnTick(EventArgs e)
      bij System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
      bij System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
      bij System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
      bij System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
      bij System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
      bij System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
      bij System.Windows.Forms.Application.DoEvents()
      bij DevExpress.XtraReports.Design.XRSmartTagService.ShowPopup(Point location, XRComponentDesigner designer, SmartTagSelectionItem smartTagSelectionItem)
      bij DevExpress.XtraReports.Design.SmartTagSelectionItem.HandleMouseDown(Object sender, BandMouseEventArgs args)
      bij DevExpress.XtraReports.Design.ReportFrame.CornerPanel.OnMouseDown(MouseEventArgs e)
      bij System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
      bij System.Windows.Forms.Control.WndProc(Message& m)
      bij System.Windows.Forms.ScrollableControl.WndProc(Message& m)
      bij System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
      bij System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
      bij System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
      bij System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
      bij System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
      bij System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
      bij System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
      bij System.Windows.Forms.Application.RunDialog(Form form)
      bij System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
      bij DevExpress.XtraReports.UserDesigner.XRDesignForm.DevExpress.XtraReports.UserDesigner.IDesignForm.ShowDialog()
      bij DevExpress.XtraReports.UI.ReportDesignTool.ShowDesignerDialog(IDesignForm form, UserLookAndFeel lookAndFeel, DesignDockPanelType hiddenPanels)
      bij DevExpress.XtraReports.UI.ReportDesignTool.ShowDesignerDialog()
      bij ReportGallerySample.Form1.btShowDesigner_Click(Object sender, EventArgs e) in d:\Users\Eroth\My Documents\Samples\XtraReports Suite\14.1.3\E4123\ReportGallerySample\ReportGallerySample\Form1.cs:regel 28
      bij System.Windows.Forms.Control.OnClick(EventArgs e)
      bij System.Windows.Forms.Button.OnClick(EventArgs e)
      bij System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
      bij System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
      bij System.Windows.Forms.Control.WndProc(Message& m)
      bij System.Windows.Forms.ButtonBase.WndProc(Message& m)
      bij System.Windows.Forms.Button.WndProc(Message& m)
      bij System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
      bij System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
      bij System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
      bij System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
      bij System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
      bij System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
      bij System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
      bij System.Windows.Forms.Application.Run(Form mainForm)
      bij ReportGallerySample.Program.Main() in d:\Users\Eroth\My Documents\Samples\XtraReports Suite\14.1.3\E4123\ReportGallerySample\ReportGallerySample\Program.cs:regel 28
      bij System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
      bij System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
      bij Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
      bij System.Threading.ThreadHelper.ThreadStart_Context(Object state)
      bij System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
      bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
      bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
      bij System.Threading.ThreadHelper.ThreadStart()
 InnerException:


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>