|
-
Oct 25th, 2002, 03:01 PM
#1
Thread Starter
Junior Member
Using a "/" in a Address Field....Keep getting an error.
I have a VB app that has a address field that allows / in the address. I also know that Crystal uses / in its formulas. How could I pass crystal a / in an address field and not have it error out?
Thanks for the help.
Frank
-
Oct 25th, 2002, 03:28 PM
#2
You shouldn't have any problems passing a /. Is the / coming directly from the database or is it being passed as a formula? I tried both methods and had no problems.
Can you be a bit more specific about what you're actually doing and what error occurs.
-
Oct 25th, 2002, 06:16 PM
#3
Perhaps the "/" is OK for Crystal to use, but not to have it as a passed character.
Try Chr(47) instead.
-
Oct 25th, 2002, 06:48 PM
#4
Thread Starter
Junior Member
The address is a default company value. It is stored in the database. What happens is this. If a default company address of......
ABC Company
25 1/2 Main Street
Charlotte, NC. 28075
The address would cause this to error when i print an invoice(crystal) remove the / and it prints just fine.
I guess what i need is to check the address field for /, but how would i pass the address field to crystal so that it will print... 25 1/2 Main Street?
Thanks
Frank
-
Oct 25th, 2002, 06:53 PM
#5
Try
Code:
"25 1 " & chr(47) & "2 main street"
-
Oct 26th, 2002, 07:52 AM
#6
Thread Starter
Junior Member
If 25 1/2 Main Street is actually stored in ADDRESS1 how would i apply the chr(47) to ADDRESS1?
Thanks
Frank
-
Oct 27th, 2002, 09:41 AM
#7
Thread Starter
Junior Member
Anyone.....? If i did a search for "/" and replace with Chr(47) wouldn't that be the same a searhing for "/" and replacing with "/" ?
This post is in regards to my previous post.
Thanks
-
Oct 30th, 2002, 11:17 AM
#8
Thread Starter
Junior Member
If i remove any of the '/' and run the project, i get an error that
says -2147191854 = The remaining text does not seem to be part of the formula. Let me explain, and please correct me if i'm wrong, i have been told that in this example @CompanyAddress is the field on the report and strCompanyAddress is the field to populate @CompanyAddress. Being new to all of this, and this is what i have, what would have been a better way to have written this fomula?
Thanks
Below is the formula:
'Formula string
strFormula = "{@CompanyName}" & Chr$(34) & strCompanyName
strFormula = strFormula & Chr$(34) & "/{@CompanyAddress}" & Chr$(34) & strCompanyAddress
strFormula = strFormula & Chr$(34) & "/{@CompanyCSZ}" & Chr$(34) & strCompanyCSZ
strFormula = strFormula & Chr$(34) & "/{@CompanyPhone}" & Chr$(34) & strCompanyPhone
strFormula = strFormula & Chr$(34) & "/{@DateRange}" & Chr$(34) & strDateRange
strFormula = strFormula & Chr$(34) & "/{@EmployeeType}" & Chr$(34) & strEmployeeType & Chr$(34)
Last edited by fvlmasl2; Oct 30th, 2002 at 03:58 PM.
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
|