Can I control the sub report(s) if I got more than 1 records view?
eg.
ID = 123
Name = WW
subreport1
subreport2
-----------
ID = 124
Name = QQ
subreport1
subreport2
----------------
.
.
.
vb code behind:
Dim vNric As String
Dim objReport As New crProfile_IC()
Dim myDataSet As New DS_Profile() 'the xml Connection
Dim SqlName As String
Dim vTest As ReportDocument
Dim vTest1 As ReportDocument
vNric = ('123', '124')
If Left$(vNric, 1) = "'" And Right$(vNric, 1) = "'" Then
vNric = Right$(vNric, Len(vNric) - 1)
vNric = Left$(vNric, Len(vNric) - 1)
End If
SqlStmt = "SELECT * from IND_vPROFILE1 where nric_fin in ('" & vNric & "')"
Dim mySqlAdapter = New SqlDataAdapter(SqlStmt, sqlConn)
mySqlAdapter.Fill(myDataSet, "IND_vPROFILE1"
objReport.SetDataSource(myDataSet)
objReport.ReportOptions.EnableSaveDataWithReport = True
vTest = objReport.OpenSubreport("Suit_WOS"
vTest.RecordSelectionFormula = "{Ind_vProfile1.NRIC_FIN}='" & vNric & "'"
vTest1 = objReport.OpenSubreport("Case_B"
vTest1.RecordSelectionFormula = "{Ind_vProfile1.NRIC_FIN}='" & vNric & "'"
CrystalReportViewer1.ReportSource = objReport
How can I control the subreport to view multiple records?
the subreport will depend on the nric_fin
Thanks.
eg.
ID = 123
Name = WW
subreport1
subreport2
-----------
ID = 124
Name = QQ
subreport1
subreport2
----------------
.
.
.
vb code behind:
Dim vNric As String
Dim objReport As New crProfile_IC()
Dim myDataSet As New DS_Profile() 'the xml Connection
Dim SqlName As String
Dim vTest As ReportDocument
Dim vTest1 As ReportDocument
vNric = ('123', '124')
If Left$(vNric, 1) = "'" And Right$(vNric, 1) = "'" Then
vNric = Right$(vNric, Len(vNric) - 1)
vNric = Left$(vNric, Len(vNric) - 1)
End If
SqlStmt = "SELECT * from IND_vPROFILE1 where nric_fin in ('" & vNric & "')"
Dim mySqlAdapter = New SqlDataAdapter(SqlStmt, sqlConn)
mySqlAdapter.Fill(myDataSet, "IND_vPROFILE1"
objReport.SetDataSource(myDataSet)
objReport.ReportOptions.EnableSaveDataWithReport = True
vTest = objReport.OpenSubreport("Suit_WOS"
vTest.RecordSelectionFormula = "{Ind_vProfile1.NRIC_FIN}='" & vNric & "'"
vTest1 = objReport.OpenSubreport("Case_B"
vTest1.RecordSelectionFormula = "{Ind_vProfile1.NRIC_FIN}='" & vNric & "'"
CrystalReportViewer1.ReportSource = objReport
How can I control the subreport to view multiple records?
the subreport will depend on the nric_fin
Thanks.