-1
VB.NetでCR 13を使用してレポートを作成しています。Crystal Report - レポートにデータが表示されないが、データセットにデータがある
テストすると、データセットにデータがあるにもかかわらず、レポートにデータが表示されません。
エラーがスローされず、データのない空のテンプレートが表示されます。
ありがとうございました。
更新済み
ここにコードがあります。
Dim dt As New DataTable
m_ReportClass = New CustomReports
With ctrlRptViewer
dt = m_ReportClass.GetDOSRI(entityID, reportDate, isConsolidated)
Dim isHeadOffice As Boolean = False
isHeadOffice = (Current.Entity.Code.Count = 4)
.ReportTitle = "xxxx"
.ReportParams = {
"report_header1=" & IIf(Not isHeadOffice, Current.Entity.Name, ctrlEntity.NameEntity) & " - DOSRI REPORT",
"report_header2=FOR THE MONTH OF " & MonthName(Month(dtpDate.Value)) & " " & Year(dtpDate.Value)
}
.ReportData = dt
If isConsolidated Then
.ReportFile = REPORTS_PATH & "\x\y.rpt"
Else
.ReportFile = REPORTS_PATH & "\x\y.rpt"
End If
.ShowReport()
End With
ShowReportメソッドの場合。
DisposeReportSource()
If ReportFile <> "" Then
ReportSource = New ReportDocument
ReportSource.Load(ReportFile, CrystalDecisions.Shared.OpenReportMethod.OpenReportByDefault)
SetDataSource(ReportSource, ReportData, ReportTitle, ReportParams)
Else
SetDataSource(ReportSource, ReportTitle, ReportParams)
End If
crvViewer.ReportSource = ReportSource
crvViewer.Refresh()
申し訳ありません、コードを入力するのを忘れて、私はそれを更新しました。ありがとうございました。 –