|
-
Jul 2nd, 2002, 03:32 PM
#1
Thread Starter
Hyperactive Member
***RESOLVED***Crystal Reports problem
I have just installed Crystal Reports Dev edition with VB6 Enterprise.
the company that originally did a number of reports was in an ASP situation. I'm trying to use those reports for a VB app. All the reports have a parameter wanting an ID number which references the SQL table to the record the user is viewing. What I need to know is how to pass the parameter information to the Crystal Report when the user clicks a command button. Here is what I need to pass to the Crystal report parameter
SELECT * from tblClaim WHERE ID = '" & frmAdminInfo.txtIDref.Text & "'"
That way the report will be generated based on that record only.
Any help would be appreciated. There are bunches of reports to be modified so if I can get an answer to this I'm well on my way to converting the reports to work in the windows app.
Thanks for any and all help
Last edited by Tailgun; Jul 3rd, 2002 at 05:15 AM.
-
Jul 2nd, 2002, 06:53 PM
#2
Thread Starter
Hyperactive Member
ok I at least got this far
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
Report.ParameterFields(1).AddCurrentValue frmAdminInfo.txtIDref.Text
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
End Sub
Now I have a type mismatch
The ID field is numeric and the txtIDref.Text field is also numeric
but I get a type mismatch any suggestions ??
-
Jul 3rd, 2002, 04:41 AM
#3
Frenzied Member
Check Report.ParameterFields(1)
It should be Report.ParameterFields(0).
oh1mie/Vic

-
Jul 3rd, 2002, 05:15 AM
#4
Thread Starter
Hyperactive Member
Thanks for your help. I finally got it resolved using this.
Report.ParameterFields(1).AddCurrentValue
CDbl(frmAdminInfo.txtIDref.Text)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|