Add top of form reference
1-Imports CrystalDecisions.CrystalReports.Engine
NEW FORM ADD
Dim RV = New CRV()
2- CRV FORM AS A VIEW FORM ON THE CRYSTAL REPORT WITH NEW CRYSTAL REPORT
VIWER
Button Click Events
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Me.Cursor = Cursors.WaitCursor
PrintReq()
Me.Cursor = Cursors.Default
End Sub
Private Sub PrintReq()
Try
Dim strCriteria As String = ""
Dim RV = New CRV()
Dim DOC = New ReportDocument()
Dim rpt As New COA
DOC = DirectCast(rpt, ReportDocument)
CrystalReportLogin(DOC)
Dim PRE_BY, APPROVED_BY, BATCH_NO As String
With rpt
DOC.RecordSelectionFormula = "{PHQCHDR.qc_id} =" & (Val(HID_QC_ID.Text)) & ""
.DataDefinition.FormulaFields("PRE_BY").Text = "'" & MPREPARED_BY.Text & "'"
.DataDefinition.FormulaFields("APPROVED_BY").Text = "'" & MAPPROVED_BY.Text & "'"
.DataDefinition.FormulaFields("BATCH_NO").Text = "'" & MBATCH_ID.Text & "'"
End With
'----selection criteria------
strCriteria = ""
strCriteria = True
CRV.CrystalReportViewer1.SelectionFormula = strCriteria
RV.CrystalReportViewer1.ReportSource = DOC
RV.CrystalReportViewer1.Refresh()
RV.WindowState = FormWindowState.Maximized
RV.Show()
Catch ex As Exception
End Try
End Sub
AND REPORT ALL TABLES USED THE RELATION ON THE ADD REPORT TABLE SON THE CRYSTAL REPORT ADD ON THE ADD OR LINK OF ALL TABLE IN ADD SERVER REFERENCE
.
YOU NEED ONLY LINK OF YOUR DATE TABLE OR SEND THE FORMULA
AND YOUR REPORT RUINING ANY PC OR ANY SERVER WITH SAME DATA BASE .
OR PASS THE NY FORMULA ON THE CRYSTAL REPORT WITH GIVEN THE ABOVE CODE
IF ANY PROBLEM SO MAIL ME.
THANKS