Error when call Show() method in .net 5

Stimulsoft Reports.WPF discussion
Post Reply
soltanisoft
Posts: 4
Joined: Sun Jul 04, 2021 8:22 pm

Error when call Show() method in .net 5

Post by soltanisoft »

hi

i use stimulsoft 2021.1.1 and .net 5 .

when i call reportsource.show() to show report viewer , throw this exception : :oops:

System.MissingMethodException: 'Method not found: 'System.Windows.Forms.Panel Stimulsoft.Base.Viewer.IStiViewerAccessor.GetPanelDialogs()'.' :x



Code: Select all

 at Stimulsoft.Base.StiActivator.CreateObject(String typeName, Object[] arguments)
   at Stimulsoft.Base.StiActivator.CreateObject(Type type, Object[] arguments)
   at Stimulsoft.Report.StiGuiOptions.GetViewerForm(StiReport report, StiGuiMode guiMode)
   at Stimulsoft.Report.StiReport.Show(Form parentForm, IWin32Window win32Window, Boolean dialogForm)
   at Stimulsoft.Report.StiReport.Show(Form parentForm, Boolean dialogForm)
   at Stimulsoft.Report.StiReport.Show()
   at Co.Domino.WinUI.Windows.GenericWindows.PrintDialog.pgPrintDialog._printReport(Boolean showPreview) in G:\majid\source\Domino Gold\Domino .net 5\Co.Domino\Co.Domino.WinUI\Windows\GenericWindows\PrintDialog\pgPrintDialog.xaml.cs:line 252
   at Co.Domino.WinUI.Windows.GenericWindows.PrintDialog.pgPrintDialog.btnPrintPreview_Click(Object sender, RoutedEventArgs e) in G:\majid\source\Domino Gold\Domino .net 5\Co.Domino\Co.Domino.WinUI\Windows\GenericWindows\PrintDialog\pgPrintDialog.xaml.cs:line 215
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run()
   at Co.Domino.WinUI.App.Main()
-------------------------------------------------

that code work in .net4.7.2

please help to to solve this problem.
soltanisoft
Posts: 4
Joined: Sun Jul 04, 2021 8:22 pm

Re: Error when call Show() method in .net 5

Post by soltanisoft »

i port my app from .net 4.7 to .net core 3.1

now i have problem with show report viewer. when i call showWithWpf() ,

Image
soltanisoft
Posts: 4
Joined: Sun Jul 04, 2021 8:22 pm

Re: Error when call Show() method in .net 5

Post by soltanisoft »

Has anyone ever been able to use stimul in wpf .NET 5 or .NET Core 3.1? 🤔
soltanisoft
Posts: 4
Joined: Sun Jul 04, 2021 8:22 pm

Re: Error when call Show() method in .net 5

Post by soltanisoft »

solved my problem.

i installed Stimulsoft.Report.Wpf nuget packages.
Andrew
Posts: 4104
Joined: Fri Jun 09, 2006 3:58 am

Re: Error when call Show() method in .net 5

Post by Andrew »

Hello,

Okay, great! Thank you for letting us know about this.
Post Reply