Reputation: 1
My application is based on Windows Forms. I am creating a report using RDLC (version 15.3.1). This report should have a table that is filled with the data I take from DataGridView.
Transferring data from DataGridView to the report is as follows.
List<OriginalPredicted> op = new List<OriginalPredicted>();
op.Clear();
for (int i = 0 ; i < mp.predResultsGridView.Rows.Count; i++)
{
op.Add(new OriginalPredicted { Original = (double)mp.predResultsGridView.Rows[i].Cells[0].Value, Predicted = (double)mp.predResultsGridView.Rows[i].Cells[1].Value });
}
ReportDataSource rds = new ReportDataSource("Dataset_Orig_Pred", op);
reportViewer.LocalReport.DataSources.Clear();
reportViewer.LocalReport.DataSources.Add(rds);
reportViewer.LocalReport.Refresh();
Before that I create a list consisting of class instances. Class is implemented as follows:
public class OriginalPredicted
{
public double Original { get; set; }
public double Predicted { get; set; }
}
The problem is that when I want to add a data set and select an object as a data source, I cannot find any class (business object) to use in "Select the data objects" window. There is only "Properties" item under the project tree but I expect to see also the classes which I created. Image of "Select the data objects" window
What have I tried:
Can the presence of dependencies in a project strictly for the x64 architecture affect the behavior of the Data Source Configuration Wizard?
My project uses a version control system. Could it also have an impact?
Also, I tried to reproduce the issue on clean project. In this case, everything works. Unfortunately, I can't redo the project elsewhere as it's very time consuming. Image of "Select the Data Objects" window after reproducing issue
Thanks.
Upvotes: 0
Views: 1207
Reputation: 1
The first solution I have tried isnt what just it look like. I was just messing around with Configuration Manager which is not right. The answer was hiding very well. So its more related to RDLC's bitness. In general the real solution is to set in Project Properties "Target Platform" to "Any CPU" or "x86" if its set to "x64" and check that "Prefer 32-bit" is checked. Image of "Project Properties"
Upvotes: 0