I have a problem in my RDLC Report. The report header is displaying whilst the report details are not.
Report Layout:
Report Output:
As you can see I've already called the SQL fields in the report layout and the report output does not display any data.
I use 2 forms: Form 1 is the generation of data whilst Form 2 is the Report Viewer.
This is a part of my code in Form 1 (Generation of Data):
Code:
Private Sub btnGenerate_Click(sender As Object, e As EventArgs) Handles btnGenerate.Click
Dim rprtName As String
If lstReports.SelectedIndex = 0 Then
rprtName = "rprtIS"
Else
rprtName = ""
End If
Dim frmrpt As New frmReportViewer
frmrpt.ismo = cbMonth.Text
frmrpt.isye = cbYear.Text
frmrpt.strReport = rprtName
frmrpt.ShowDialog()
End Sub
This is the sample code for the Report Viewer form:
Code:
Private Sub frmReportViewer_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim rprtDataSource As ReportDataSource
Try
With Me.rprtViewer.LocalReport
.Refresh()
.ReportEmbeddedResource = "REPORTTESTING1." + strReport + ".rdlc"
End With
Select Case strReport
Case "rprtIS"
Dim ds As New REPORTTESTING1.ds_spIS
Dim da As New REPORTTESTING1.ds_spISTableAdapters.SP_Select_Invoice_SummaryTableAdapter
ds.Clear()
rprtDataSource = New ReportDataSource("dsIS", ds.Tables("SP_Select_Invoice_Summary"))
Me.rprtViewer.LocalReport.DataSources.Add(rprtDataSource)
da.Fill(ds.SP_Select_Invoice_Summary, ismo, isye)
End Select
Me.rprtViewer.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.Normal)
Catch ex As Exception
MessageBox.Show(ex.Message, My.Application.Info.Title, MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Thanks in advance,