Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bold Font of Some Records
Message
From
11/03/2022 12:17:26
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
01683804
Message ID:
01683817
Views:
28
>>>>>>>Hi,
>>>>>>>
>>>>>>>I have a report that simply prints records in a cursor. For example, the cursor has two column COLUMN1 and COLUMN2. And a sample report looks like this:
>>>>>>>
>>>>>>>COLUMN1     COLUMN2
>>>>>>>ABC                123
>>>>>>>XYZ                 766
>>>>>>>GUB                111
>>>>>>>
>>>>>>>and so on.
>>>>>>>
>>>>>>>I want some records of this cursor to be printed in Bold Font. For example, the line:
>>>>>>>
>>>>>>>ABC              123
>>>>>>>
>>>>>>>
>>>>>>>I can add a column COLUMN3 to this cursor and set the value of these rows/records to value True (in the COLUMN3).
>>>>>>>But I don't know how to use this value, True, to change the font of the values in COLUMN1 and COLUMN2 to Bold.
>>>>>>>
>>>>>>>Any suggestions?
>>>>>>>
>>>>>>>TIA
>>>>>>
>>>>>>In VFP9, SET REPORTBEHAVIOUR 90, get properties of your report-textbox, find page Dynamic or so. Add a rule (how ever it is named in English), within the rule set an expression and pick a FONT. The font holds bold. It's a bit obscure since underline is not in the font, but this is the way it goes.
>>>>>>
>>>>>>See crappy picture
>>>>>>HTH
>>>>>
>>>>>I will need to find if I have REPORTBEHAVIOUR set to 80 or 90. And will check your suggestion.
>>>>>
>>>>>I also thought of another approach, after I posted the question. I can create another set of fields, exactly the same as the regular. But using the font Bold. Then place them over the existing. And create an IIF() in the field expressions to print only those that meet some COLUMN3 value. I have done it before when needed to show some values in the column red and some others in regular, black color.
>>>>>
>>>>>I will try both approaches.
>>>>>
>>>>>Thank you.
>>>>>
>>>>>UPDATE. The second approach, creating a set of fields with font set to Bold and adding IIF() to the expression works.
>>>>
>>>>Don't need an iff, there is PRINT WHEN. But it's awkward and error prone to have a double set of records. Don't do this.
>>>
>>>I did not say that I would have a "double set of records"
>>>Secondly, the report is already delivered to the customer. If it works, I will never hear from them; the customer never notifies me when things work well :). But if it does not work, I will be the one to hear about it :)
>>
>>Then, please be so kind to go more into detail what and where you have done. It looks like I read you wrong.
>
>In the report I have two textboxes, one for COLUMN1 and COLUMN2. The value in, for example, COLUMN1 textbox is:
>
>iif( COLUMN3, COLUMN1, "")
>
>
>And then I created exactly the same textboxes, as above. The difference is that they set the value as Bold Font.
>And I placed these two textboxes in the same place as the initial textboxes.
>The second texbox value is:
>
>iif( COLUMN3, "", COLUMN1)
>
>
>Depending on the value in COLUMN3, only one textbox is printed.
>
>Hope it explains how it works.

Ah, there is the failure
>>>>Don't need an iff, there is PRINT WHEN. But it's awkward and error prone to have a double set of records. Don't do this.

Clearly I mean fields. At least give it a try and learn dynamics. It's simple enough.
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