# 如何在crystal reports将在form输入之列印区间条件列印出来?

Posted by inger on April 23, 1999 at 09:45:55:

在form写text1,text2为资料列印区间,如下:

Private Sub Command2_Click()
s = Text1.Text
s1 = Text2.Text
CrystalReport1.ReportFileName = report1_path
CrystalReport1.Destination = 0
CrystalReport1.SelectionFormula = "{a03f4.finanum} in '" + Trim(s) + "' to '" + Trim(s1) + "' and {a03f4.tdepart}<>'0'"
CrystalReport1.DataFiles(0) = "c:\a03f4\data\a03f4.mdb"
On Error GoTo ERRORHANDLER
CrystalReport1.Action = 1
Exit Sub
ERRORHANDLER:
MsgBox Error$
Exit Sub
End Sub

但如何在报表中将user输入之text1,text2资料印出?

Follow Ups:

- 无法在执行期加入设计时期所设计的 formula 内容吧 ? 安宝 16:11:17 4/23/99 (2)
  - Re: 无法在执行期加入设计时期所设计的 formula 内容吧 ? inger 17:20:19 4/23/99 (1)
    - 不好意思, 占用一下小吴网站空间 .... 安宝 17:43:12 4/23/99 (0)
- How about .formula properity ? 安宝 14:54:05 4/23/99 (4)
  - Re: How about .formula properity ? inger 15:18:55 4/23/99 (3)
    - Sorry ! 更正为 SelectionFormula 安宝 15:57:37 4/23/99 (2)
      - Re: Sorry ! 更正为 SelectionFormula inger 16:09:38 4/23/99 (1)
        - 谢谢!我找到问题所在. inger 16:12:31 4/23/99 (0)