Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report Field Trimming
Message
From
04/12/2006 10:52:52
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01174565
Message ID:
01174619
Views:
7
You're right about it being a neat trick. I remember being shocked when I saw the message the first time that I had never heard of it before.

>>Hi Naomi,
>>
>>I don't see how that applies in this case. Could you explain, please?
>
>You're actually right, it would not help to put the comma. In any case, it's a nice trick. <g>
>
>>
>>>See this neat old trick for the alternative solution.
>>>
>>>Re: Blank address lines Thread #959791 Message #959963
>>>
>>>>Hi Tariq,
>>>>
>>>>use the IIF() function to determine if to add the comma or not.
>>>>
>>>>Something like this (off the top of my head):
>>>>
>>>>alltrim(fld1) + IIF(EMPTY(fld1), "", ",") ;
>>>>+ alltrim(fld2) + IIF(EMPTY(fld2), "", ",") ;
>>>>+ alltrim(fld3) + IIF(EMPTY(fld3), "", ",") ;
>>>>+ alltrim(fld4) + IIF(EMPTY(fld4), "", ",") ;
>>>>+ alltrim(fld5)
>>>>
>>>>
>>>>>Dear Experts
>>>>>
>>>>>Table1 has 5 fields as
>>>>>
>>>>>fld1--c(10)
>>>>>fld2--c(10)
>>>>>fld3--c(10)
>>>>>fld4--c(10)
>>>>>fld5--c(10)
>>>>>
>>>>>There is only one record in dbf as
>>>>>fld1="a"
>>>>>fld2="b"
>>>>>fld3=""
>>>>>fld4=""
>>>>>fld5="e"
>>>>>
>>>>>The data may be vary type,for example
>>>>>sometimes all fields are filled
>>>>>sometimes some fields are filled
>>>>>sometimes all fields are empty
>>>>>
>>>>>When I use as
>>>>>alltrim(fld1)+alltrim(",")+alltrim(fld2)+alltrim(",")+alltrim(fld3)+;
>>>>>alltrim(",")+alltrim(fld4)+alltrim(",")+alltrim(fld5)
>>>>>
>>>>>then It show extra comma when some field is empty as
>>>>>a,b,,,e
>>>>>
>>>>>In report, I want to show data in only one field as
>>>>>a,b,e
>>>>>
>>>>>The filled data should print side by side with comma separation.
>>>>>
>>>>>Please help
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Reply
Map
View

Click here to load this message in the networking platform