Hi,All
I have a problem when i pressed print button. The value could not passed to parameter in crystal report and the prompt wait for user input data in crystal report screen. Advice me please me.
Private Sub cmdPrint_Click()
RptPrint.Connect = "Provider=Microsoft.Jet.OLEDB.4.0;" & "DATA SOURCE=C:\centerS\Material_Receipt.MDB"
RptPrint.ReportFileName = App.Path & "\Report\Mat_Recei.rpt"
RptPrint.ParameterFields(0) = "comp;" & Trim(Aft_extract_id(cmbCompany.Text)) & ";True"
RptPrint.ParameterFields(1) = "docno;" & Trim(txtNumber.Text) & ";True"
RptPrint.WindowState = crptMaximized
RptPrint.WindowShowGroupTree = False
RptPrint.WindowShowExportBtn = True
RptPrint.WindowAllowDrillDown = True
RptPrint.WindowShowPrintBtn = True
RptPrint.WindowShowPrintSetupBtn = True
RptPrint.WindowShowRefreshBtn = True
RptPrint.DiscardSavedData = True
RptPrint.Action = 1
END sub
In crystal report I created 2 parameter are (?comp,?Docno)and have a select formula record as
{Trans_MatRecei.Comp_code} = {?comp} and
{Trans_MatRecei.Doc_NO} = {?docno}
Remarks : using vb6 and crystal report 7
Thanks advance
Ndaa
I have a problem when i pressed print button. The value could not passed to parameter in crystal report and the prompt wait for user input data in crystal report screen. Advice me please me.
Private Sub cmdPrint_Click()
RptPrint.Connect = "Provider=Microsoft.Jet.OLEDB.4.0;" & "DATA SOURCE=C:\centerS\Material_Receipt.MDB"
RptPrint.ReportFileName = App.Path & "\Report\Mat_Recei.rpt"
RptPrint.ParameterFields(0) = "comp;" & Trim(Aft_extract_id(cmbCompany.Text)) & ";True"
RptPrint.ParameterFields(1) = "docno;" & Trim(txtNumber.Text) & ";True"
RptPrint.WindowState = crptMaximized
RptPrint.WindowShowGroupTree = False
RptPrint.WindowShowExportBtn = True
RptPrint.WindowAllowDrillDown = True
RptPrint.WindowShowPrintBtn = True
RptPrint.WindowShowPrintSetupBtn = True
RptPrint.WindowShowRefreshBtn = True
RptPrint.DiscardSavedData = True
RptPrint.Action = 1
END sub
In crystal report I created 2 parameter are (?comp,?Docno)and have a select formula record as
{Trans_MatRecei.Comp_code} = {?comp} and
{Trans_MatRecei.Doc_NO} = {?docno}
Remarks : using vb6 and crystal report 7
Thanks advance
Ndaa