I am trying to use reporting tool. I have created sample project.
I need to know how to assign datasource in WPF file for report1.igr in below tag.
<
Thanks for help,
Jaydeep
Hi,
It's working fine. Thanks a lot for all your help.
Thanks,
I take a look at the solution you sent me. The problem is that the “app.config” file is not included in the project. The file is present in the project folder (with the connection string) but somehow it has been excluded from the project itself. You should add it back. At runtime NA Reporting will look for that file in order to get the connection string. At design time it is getting the connection string from the Settigs. That is why it’s working.
Also you should remove the following lines from your xaml.
<ig:ClientRenderSettings.DataSources>
<ig:DataSource TargetDataSource="sqlDataSource1" />
</ig:ClientRenderSettings.DataSources>
Specifying a data source through the viewer API is meant for scenarios where you want to swap the data source at runtime, which I think is not the case. Also notice that if you would want to swap the data source you would need to specify the ItemsSource property of the ig:DataSource, in addition to the TargetDataSource.
Once you add the “app.config” back, remove the xaml I mentioned and rebuild the project the problem should be fixed.
Please note that the DataContext={Binding} that you specified in several places are not needed.
Please tell me if you need any more.
Leo
My question was regarding the “App.Config” file, not the “App.xaml” file. The app.config file is a configuration file where the connection string should have been stored when you first create the data source using the Wizard. Do you have that file? Does it contains the connection string you are using?
Can you send me the solution so I can analyze what is happening? (lrodriguez at infragistics.com)
I have WpfApplication so I have App.xaml. I am using connection defined in server explorer.
I haven't code anyhting yet. Just created connection using server explorer and drag fields from there.
Want to show in WPF file using XamReportViewer.
Thanks for guidance.
When you create a new data source the Data Source Creation Wizard by default will store the connection string in the App.config file. You should have an App.config file in your project containing the connection string. Do you have it?
Are you using a connection defined in the Server Explorer?