Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bold Font of Some Records
Message
From
11/03/2022 13:05:45
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
11/03/2022 12:41:19
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
01683804
Message ID:
01683821
Views:
30
>>>>>The second texbox value is:
>>>>>
>>>>>iif( COLUMN3, "", COLUMN1)
>>>>>
>>>>>
>>>>>Depending on the value in COLUMN3, only one textbox is printed.
>>>>
>>>>Acually, they are both printed, except one has "". But with PrintWhen you can control other things too - not just textboxes: lines, images etc.
>>>>Imagine that instead of one being bold, it had a border. You'd still see the border, as both would be printed, one empty (with border) and the other with column1 and no border. I'm not even sure how this would look, would one of them cause a newline or not.
>>>>
>>>>To me it looks simpler to have a simple field value in each, then in one's PrintWhen you have "column3", in the other's "not column3".
>>>>
>>>>Disclaimer: between 2006 and now I used fox reports maybe 20 times.
>>>
>>>I do have Not to Print when empty in PrintWhen. So, both are not printed. Just the one which has some entry.
>>
>>No. Both fields are printed. There space is used. Only they print the empty string. Only the Print When expression can turn printing a field off or on.
>>(Ok, I know different ways, but I guess dealing with Report Listeners is not something you do)
>>
>>As soon as you do small mistakes you will see the difference.
>
>He meant "do not print when blank" checkbox, which I actually don't remember as a property of a control (but then I've already developed a deja vu amnesia - there are things I forgot multiple times) but perhaps as a setting on whole bands... Never mind, that would also work. Except now it's becoming complicated - there's a conditional expression in both values, there's this "skip when blank" applied to two controls... just having proper PrintWhen makes it far simpler, IMO.

citing Help:
Remove line if blank
Specifies that the report engine may contract the report band vertically if the evaluation of the report control results in no renderable content, and no other renderable controls occupy the empty space on either side of the control.

For all I think only if Print only when expression is true returns false (not: expression is empty)

As I said, most simple is using dynamics, it just renders the output in different style, if a expression is true. No double fuzz
It's max annoying if you change such a report a year later and forgot about the second layer.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform