cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal reportsError in output window Visual Studio 2013

Former Member
0 Kudos

Hi, I am using Crystal Reports in Visual Studio 2013 (WPF MVVM pattern).

In my report viewer, the code that binds to the report viewer is -

<ContentControl Grid.Row ="1" Content="{Binding Path=ReportViewer}" >

In the view model, this is the code that creates the Report Viewer -

       
    public ReportViewerModel(ReportDocument report, string reportName)
    {
        ReportViewer = new CrystalReportsViewer();
        myReport = report;
        _reportName = reportName;      
        ReportViewer.ViewerCore.ReportSource = report;      
    }
       
               

I get the following errors in my output window every time the report viewer is loaded

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=ToolTip; DataItem='Button' (Name='btnOpen'); target element is 'Button' (Name='btnOpen'); target property is 'Name' (type 'String')

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=ToolTip; DataItem='Button' (Name='btnPrint'); target element is 'Button' (Name='btnPrint'); target property is 'Name' (type 'String')

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=ToolTip; DataItem='Button' (Name='btnRefresh'); target element is 'Button' (Name='btnRefresh'); target property is 'Name' (type 'String')

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=ToolTip; DataItem='Button' (Name='btnExport'); target element is 'Button' (Name='btnExport'); target property is 'Name' (type 'String')

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=ToolTip; DataItem='Button' (Name='btnCopy'); target element is 'Button' (Name='btnCopy'); target property is 'Name' (type 'String')

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=ToolTip; DataItem='ToggleButton' (Name='btnToggleSidePanel'); target element is 'ToggleButton' (Name='btnToggleSidePanel'); target property is 'Name' (type 'String')

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=ToolTip; DataItem='Button' (Name='btnPrevPage'); target element is 'Button' (Name='btnPrevPage'); target property is 'Name' (type 'String')

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=ToolTip; DataItem='Button' (Name='btnNextPage'); target element is 'Button' (Name='btnNextPage'); target property is 'Name' (type 'String')

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=ToolTip; DataItem='Button' (Name=''); target element is 'Button' (Name=''); target property is 'Name' (type 'String')

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=ToolTip; DataItem='Button' (Name=''); target element is 'Button' (Name=''); target property is 'Name' (type 'String')

What am I doing wrong? Appreciate any tips!

Thanks,
Sharon

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Hi Sharon

Can you please attach a simple app that demos the issue? Use a saved data report. To attach, zip up the app folder. Then rename the zip to .txt. And finally to attach here, create a reply and click on the "Use advanced editor" link. Upload the .txt file.

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Former Member
0 Kudos

Sorry this took me a while, I have attached a sample.

Any help appreciated!

Thanks,

Sharon

former_member183750
Active Contributor
0 Kudos

Hi Sharon

Many thanks. I'll look at the sample next week.

Have a great weekend,

- Ludek

Former Member
0 Kudos

Hi Ludek,

Did you have any update on this issue for me?

Thanks,

Sharon

former_member183750
Active Contributor
0 Kudos

Hi Sharon

I get no errors and this is what I see when I run your project:

So. I'd like you to remove anything CRVS (SAP Crystal Reports, Developer Version for Visual Studio .NET) from the computer. E.g.; in Add | remove you shold see:

Then go here:

and download the install exe, Service Pack 9. Install that and see if that helps.

- Ludek

Answers (0)