Global crApp As New CRAXDRT.Application
Global crRpt As New CRAXDRT.reportsSql = " SELECT * "
    sSql = sSql & " From porecwithcost,it_item,id_itemdtl  where it_code=id_itemdtl.id_itcode_it and id_itemdtl.id_sku=porecwithcost.id_sku and   po_code = '" & PoCode & "' and po_lccode_lc='" & lccode & "'"
    sSql = sSql & Condition.sSQLCondition & "     Order By    ri_code ASC,porecwithcost.id_sku  Asc"    Set crRpt = crApp.OpenReport(gsReportPath & "\RPT402B.rpt")
    crRpt.DiscardSavedData
    crRpt.SQLQueryString = sSql
          
    frmCrystal.CRV1.ReportSource = crRpt
 
    
    Dim r As Integer
 
 
 For r = 1 To crRpt.FormulaFields.Count     If crRpt.FormulaFields(r).FormulaFieldName = "ShowCost" Then
     
         crRpt.FormulaFields(r).Text = " '" & IIf(Condition.bReportCost, "1", "0") & "'"
       Exit For
    End If
 Next r 
     frmCrystal.CRV1.ViewReport      
       frmCrystal.CRV1.PrintReport
当程序运行到      frmCrystal.CRV1.ViewReport 这句时,它下面的这句话却执行不出我想要的效果,这是为什么?(CRV1是水晶报表控件)还有 crrpt.PrintOut 的这个属性怎么用啊!