DataSet keine support-System.Nullable<>

habe ich eine app, die hat btn Vorschau Bericht in crystal report. Ich fügte hinzu, Dataset als Datenquelle für den Bericht und zog datatable aus der toolbox Hinzugefügt und die Felder die ich brauche als Spalten. Ich habe die Anleitung aus diesem link http://aspalliance.com/2049_Use_LINQ_to_Retrieve_Data_for_Your_Crystal_Reports.2. Dies ist mein 2. Bericht die erste funktioniert und nicht auftreten prob an alle, dass ist, warum ich bin verwirrt, nicht zu erwähnen, es hat auch null-Spalte hat. die Fehlermeldung lautet: DataSet keine support-System.Nullable<>.

  private void ShowReportView()
    {

        string reportFile = "JudgeInfoFMReport.rpt";
        ObservableCollection<tblJudgeFileMaint> judgeFileMaintList;

        judgeFileMaintList = GenerateReport();

        if (judgeFileMaintList.Count > 0)
        {
            CrystalReportViewerUC crview2 = new CrystalReportViewerUC();
            crview2.SetReportPathFile(reportFile, judgeFileMaintList);
            crview2.ShowDialog();
        }
        else
        {
            System.Windows.MessageBox.Show("No record found.", module, MessageBoxButton.OK, MessageBoxImage.Information);
        }
    }

private ObservableCollection<tblJudgeFileMaint> GenerateReport()
    {
        var result = FileMaintenanceBusiness.Instance.GetAllJudgeInfoList();
        return new ObservableCollection<tblJudgeFileMaint>(result);
    }

Der Fehler ist in dem Teil, wo ich datasource Bericht."SetDataSource"

 public bool SetReportPathFile(string reportPathFile, IEnumerable enumerable)
    {

            string reportFolder = @"\CrystalReportViewer\Reports\";
            string filename = System.Windows.Forms.Application.StartupPath + reportFolder + reportPathFile;  //"\\Reports\\CrystalReports\\DateWiseEmployeeInfoReport.rpt";
            ReportPathFile = filename;
            report.Load(ReportPathFile);
            report.SetDataSource(enumerable);
            report.SetDatabaseLogon("sa", "admin007");
            bRet = true;
       }

        _IsLoaded = bRet;

        return bRet;
    }

Ich lese einige Antworten und sagt, ich sollte den null-Wert DBNUll, die ich habe in den Eigenschaften-Fenster der jeweiligen Spalte, wenn es null-Werte zulässt. Kann jemand mir bitte helfen? Dank

InformationsquelleAutor user742102 | 2011-06-06

Schreibe einen Kommentar