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

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

在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: