是不是需要
set report=createobject(crystalreportl)?

解决方案 »

  1.   

    现在显示大小写问题解决了,问题又来了,是
    调用 zhuan (str(field4.value))  时候,传入进去的值老是空!
    请问如何提取绑定了的字段的值(在这里是销售单价)
      

  2.   

    现在我想将MSFLEXGRID中显示的结果集中的每条记录都一式两份地
    在打印,用以下代码,但发现不行,还是一式一份,请帮下忙Data1.RecordSource = "select * from main where 流水号='" &search.myflexgrid.TextMatrix(search.myflexgrid.Row, 0) & "' and " & search.sel1.Text & "order by 流水号"
    Data1.Refresh
     Report.Database.SetDataSource Data1.Recordset
    While Not Data1.Recordset.EOF
     For i = 1 To 2
       xiaoshouprice1 = Data1.Recordset("销售单价")
      With Report
      .cailiao.SetUnboundFieldSource "{ado.材料名称}"
      .xinghao.SetUnboundFieldSource "{ado.型号}"
      .xiaoshouprice.SetUnboundFieldSource "{ado.销售单价}"
        End With
       zhuan (xiaoshouprice1)
        Next
      Data1.Recordset.MoveNext
    Wend
      CRViewer1.ReportSource = Report
     CRViewer1.ViewReport