|
-
Feb 17th, 2006, 05:58 PM
#1
Thread Starter
PowerPoster
Crystal Report?
Hi,
I didn't know where else to post this question so I thought I'd try here. I have a formula that is giving me an error that I don't know how to resolve. Here is my code
VB Code:
If Length ({tblVendor.venAddr2}) > 0 Then
Trim ({tblVendor.venAddr2})
Trim ({tblVendor.venCity}+", "+{tblVendor.venState}+" "+{tblVendor.venZipCode})
Else
Trim ({tblVendor.venCity}+", "+{tblVendor.venState}+" "+{tblVendor.venZipCode})
The error message is:
"The remaining text does not appear to be part of the forumula"
It bombs at the beginning of the 2nd Trim statement in the If branch. I tried using the continuation character "_" and the end of the Then and also using an End If statement and neither of those worked.
Anyone have any ideas?
Thanks,
Blake
-
Feb 17th, 2006, 07:57 PM
#2
Re: Crystal Report?
The problem is in the line:
Trim ({tblVendor.venAddr2})
Trim ({tblVendor.venCity}+", "+{tblVendor.venState}+" "+{tblVendor.venZipCode})
It should be:
Trim ({tblVendor.venAddr2}) + " " +
Trim ({tblVendor.venCity}+", "+{tblVendor.venState}+" "+{tblVendor.venZipCode})
You are missing a plus sign (+) after venAddr2 and before venCity
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Feb 17th, 2006, 10:33 PM
#3
Thread Starter
PowerPoster
Re: Crystal Report?
Gary,
If I use that method...both lines end up coming out as 1 line and I want 2 separate address lines.
-
Feb 17th, 2006, 11:28 PM
#4
Re: Crystal Report?
Moved from Classic VB
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 19th, 2006, 10:08 PM
#5
Junior Member
Re: Crystal Report?
If you want 2 separate address lines you could try using chr(13)
Regards,
Tribo
-
Feb 21st, 2006, 09:05 AM
#6
Re: Crystal Report?
I wrote that the way you had it only. I do the same thing in my reports also but Name the functions Line 3 and line 4. If the second address line is empty the line line 3 becomes the city,state and zip and line 4 is empty. If the second address line is not empty then line 3 is the second address line and line 4 is city state and zip. Both funcitons are placed on the report.
Sometimes the Programmer
Sometimes the DBA
Mazz1
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
|