Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Field is too short and need an smart trim
Message
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00521049
Message ID:
00521105
Views:
18
>>I have never done a UDF in a report before. In the reportfield expression I would
>>
>>DO smarttrim_it in smarttrim.prg with subdivsn, phase_unit, lot, block
>>
>>Does that seem correct?
>>
>>Brenda
>>
>
>No, just place SmartTrim_IT() in the field expression.
>
>In the UDF put something like:
>
>Function SmartTrim_IT
>* Creates a mailing address
>local lcAddress
>lcAddress=''
>if ....
>
>endif
>return m.lcAddress
>

Forgot to add: if the report is based on one table, you can use field names in the function. You don't need to preceed them with alias, since this table would be opened in the report. Your function doesn't need any parameters (it would go from record to record and use current record data at each pass).

HTH

>You should write the code of this function by yourself.
>
>>>Hi Brenda,
>>>
>>>In this situation I would create a little UDF to give me, what I want. You can >place UDF at the same directory with the report, so it would be always visible.
>>>
>>>Take a look at txtwidth function, it seems to be handy here.
>>>
>>>Good luck!
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform