Starting in 2019, the Reporting control is no longer included in Essential Studio®. If you're experiencing issues with the Syncfusion� Reporting Platform, Report Viewer, Report Designer, or Report Writer, we recommend migrating to Bold Reports, our dedicated reporting platform.

Bold Reports offers a comprehensive suite of tools and features for all your reporting needs, and we will help you make a smooth transition from the discontinued control. Our support team at https://support.boldreports.com/ is here to assist you with any questions or difficulties you may encounter during the migration process.

We thank you for choosing Syncfusion� and appreciate your understanding.

Creating RDLC Reports in Report Designer throws NullReferenceException

Hi,

I am following the instructions on http://help.syncfusion.com/ug/wpf/report%20designer/documents/creatingrdlcreportsi.htm to use objects as a data source.

Very little code is used but i have MainWindow.xaml.cs

    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            Designer.DesignMode = DesignMode.RDLC;
            Designer.Assemblies = new List<Assembly>();
            Designer.Assemblies.Add(Assembly.GetExecutingAssembly());
        }
....

And MainWindow.Xaml
....
    <Grid>
        <Grid>
            <syncfusion:ReportDesigner x:Name="Designer" />
        </Grid>
    </Grid>
</Window>

And DataStore.cs which has the code pasted from the help topic.

When i run the builder and create a new data set as per the instructions it works fine until i try step 8 'Click Run to preview the report in the designer.'
When i click Run i get a System.NullReferenceException {"Object reference not set to an instance of an object."}

I can't seem to get it to work! If i do not have a datasource which references an object then it will not throw an exception. I have tried including every DLL in case its a reference problem.

StackTrace:
   at Syncfusion.RDL.DOM.ConnectionProperties..ctor(ConnectionProperties connectionProperties)
   at Syncfusion.RDL.DOM.DataSource.Update(DataSource datasource)
   at Syncfusion.RDL.DOM.DataSource.Clone()
   at Syncfusion.Windows.Reports.Designer.ReportDesignView.OpenViewer()
   at Syncfusion.Windows.Reports.Designer.ReportDesigner.ViewReportViewer()
   at Syncfusion.Windows.Reports.Designer.ReportDesigner.Btn_ViewReport_Click(Object sender, RoutedEventArgs e)
   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 Syncfusion.Windows.Tools.Controls.RibbonButton.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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, 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.Application.RunInternal(Window window)
   at System.Windows.Application.Run()
   at WpfApplication1.App.Main() in d:\2014-04-9 - Developer Days 2\WpfReportDesigner\WpfApplication1\WpfApplication1\obj\Debug\App.g.cs:line 0
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Is there a working example of this somewhere?

2 Replies

SA System Administrator April 9, 2014 04:11 PM UTC

Just to add a final comment (I can't seem to edit a post) I was looking at other posts by users (http://www.syncfusion.com/support/forums/wpf/reportdesigner/115630) and the source provided for one of the solutions has this exact same problem. I am using Visual Studio 2013 and have tried various framework versions.




AS Anandakumar S Syncfusion Team April 11, 2014 05:33 AM UTC

Hi LEO LI,

We are able to reproduce the reported issue , in order for you to get a solution for this behavior, please contact us at Syncfusion Support or you may also open a support ticket by login in to direct trac account and mention this forum link for reference.

Regards,

Anandakumar S


Loader.
Up arrow icon