Guest_imported
New member
- Jan 1, 1970
- 0
Hello,
I got trouble in this topic. So I hope all of you could have greatly help.
In my VB Project, there is a textbox(txt1) and a command button(cmd1) in a form(form1).
Also, I add a CrystalReport into my project so that there are another form(form2) and
a report(crystal1.dsr) which the database is ready in my project.
Now,form2 have the following code:
Dim Report As New Crystal1
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
End Sub
Private Sub Form_Resize()
CRViewer1.Top = 0
CRViewer1.Left = 0
CRViewer1.Height = ScaleHeight
CRViewer1.Width = ScaleWidth
End Sub
for the crystal.dsr, I've made a parameter "CUSTID" for asking user to imput customer's id.
I want the program is that, when user imput the customer's id in txt1 and click cmd1, the value in
txt1 will pass to parameter so that the reprt will only show this customer information.
i saw alot newsgroup said that report1.ParameterFields(0) = "CUSTID;" & Txt1.Text & ";true",
but i can't work with this code.
how can i do this?
Thanks you,
Calvin
I got trouble in this topic. So I hope all of you could have greatly help.
In my VB Project, there is a textbox(txt1) and a command button(cmd1) in a form(form1).
Also, I add a CrystalReport into my project so that there are another form(form2) and
a report(crystal1.dsr) which the database is ready in my project.
Now,form2 have the following code:
Dim Report As New Crystal1
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
End Sub
Private Sub Form_Resize()
CRViewer1.Top = 0
CRViewer1.Left = 0
CRViewer1.Height = ScaleHeight
CRViewer1.Width = ScaleWidth
End Sub
for the crystal.dsr, I've made a parameter "CUSTID" for asking user to imput customer's id.
I want the program is that, when user imput the customer's id in txt1 and click cmd1, the value in
txt1 will pass to parameter so that the reprt will only show this customer information.
i saw alot newsgroup said that report1.ParameterFields(0) = "CUSTID;" & Txt1.Text & ";true",
but i can't work with this code.
how can i do this?
Thanks you,
Calvin