|
-
Feb 6th, 2000, 06:33 PM
#1
Thread Starter
New Member
I'm having some difficulty in passing a parameter from my vb application to the crytal report I made. I want my report to include only data that would satisfy my criteria. The problem is that I don't know how to pass a parameter from my vb application to the crystal report I made. Can any body help me how to do it.I'm using a vb6 and my crystal report is 4.6.
-
Feb 6th, 2000, 06:37 PM
#2
Frenzied Member
You use the SelectionFormula property of the Crystal Reports OCX control...
1. Include the Crystal Reports OCX control on the form.
2. In code;
CrystalReport1.ReportFilename=[filename]
CrystalReport1.SelectionFormula=[formula]
CrystalReport1.Destination=[destination]
CrystalReport1.Action=1 (to run the report)
The selection formula has to be in the same format as Crystal Report's formula editor - the easiest way is to build the formula in Crystal Reports then copy and paste it to VB.
Eg;
.SelectionFormula="{tbl_Loans.LoanID} = "+cstr(MyLoanID)
------------------
Mark "Buzby" Beeton
VB Developer
[email protected]
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
|