|
-
Sep 1st, 2000, 09:56 AM
#1
Thread Starter
Lively Member
Do any of the Crystal Report gurus know why this works with an Integer but NOT when it's a String?
Dim TestNum As Integer
SurNum = 1
Dim TestName As String
SurName = "This is Report Style # 2!"
With Report1
.CrystalReport1.DataFiles(0) = App.Path & "\test.mdb"
.CrystalReport1.ReportFileName = "\latest.rpt"
.CrystalReport1.Formulas(0) = "startcode = " & TestNum
.CrystalReport1.Action = 1
End With
This will work with TestNum but I get "Error in Formula" if I try it with TestName(a string). Any ideas why? What I'm trying to do is pass the Test Name as a Page Header to the Crystal Report report? ANY help would be greatly appreciated!
-
Sep 1st, 2000, 02:37 PM
#2
When you want to use report style #2, try this syntax:
Code:
.CrystalReport1.Formulas(0) = "startcode = '" & SurName & "'"
"It's cold gin time again ..."
Check out my website here.
-
Sep 1st, 2000, 08:00 PM
#3
Thread Starter
Lively Member
Wow! Thank you both! Scott, I'll remember your advice, BruceG your code worked like a charm! Thanks guys!
-
Sep 1st, 2000, 08:21 PM
#4
What's Crystal Reprts used for?
-
Sep 2nd, 2000, 12:33 AM
#5
Thom: Glad to be of service.
Sc0rp: CR is used mostly to give VB reporting capabilities for VB database apps (similar to the report-writing feature of Access).
"It's cold gin time again ..."
Check out my website here.
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
|