Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Pack the Optional Print Label?!
Message
From
04/04/1998 21:37:15
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00089163
Message ID:
00089587
Views:
28
>>>>In an Order, there are some terms and condition of static words
>>>>to show or not in Label.
>>>>
>>>>Some of them surely cannot add 'NOT' cause!!
>>>>
>>>>e.g. Some condition Label on print and select in form!
>>>>
>>>>'- Need Throw-Test on Package' == Print when 'ThrowTest' Field is .T.
>>>>
>>>>* Unique as Adding '- No need Throw-Test...' make dirty on report!
>>>>
>>>>'- Special Wooden Pack' == Print when 'SpWooden' Field is .T.
>>>>'- Normal Paper Pack' == Print when 'SpWooden' Field is .F.
>>>>
>>>>Of course as there are many static terms, the report will very ugly!
>>>>So, at the end of Planning.frx Report, it will like below:
>>>>
>>>>XXXXXXXXX
>>>>
>>>>
>>>>XXXXXXXXX
>>>>XXXXXXXXX
>>>>
>>>>XXXXXXXXX
>>>>
>>>>XXXXXXXXX
>>>>XXXXXXXXX
>>>>....
>>>>
>>>>
>>>>Any method to avoid it?! Of cos, I can't make 1024 reports
>>>>for 10 different reports to pack them nor adding 1024 Labels with
>>>>well packed in Report... >_<"
>>>
>>>Justok,
>>>Try using IIF(logicalfield,"Need Throw-Test","No Need Throw Test"). If the logical field is true, the first item will print, else the second item. Also, if one item will not print if another item does print, put one on top of the other on the report.
>>
>>
>>I know it, But My boss request:
>>Don't show any 'No need' wording!!!
>>and therefore many blank lines come up!!
>>If allow to show 'No need', Of cos no problem!!
>>So, This Thread heading is to: Pack the Optional Print!
>>>.<'
>
>Justok,
>How about putting all the options in one string with CHR(13) at the end of each option. These will then print in one block only the options needed to print.

is it:

IIF(Flag1, Label1Text+chr(13), "")+IIF.....

Well, it will be ok but may over 255 character!! Too long....




Previously, I got an Interesting Idea:

IIF(Flag1, 1, 0)+IIF(Flag2, 1, 0)=2 for Print Label2 on Line1
....

But I need to make 10 * 9 / 2 == 45 Labels... much less than 1024!
[ 1 + 2 + 3 .... + 10]




I think I will put the Labeltext as variable value to store in report...
then your method can done well:

IIF(Flag1, C1, "")+IIF(Flag2, C2, "")+....
where C1 is variable for 'Original text' + Chr(13)!!

If found more better method, Tell me! ^_^;
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Previous
Reply
Map
View

Click here to load this message in the networking platform