Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change background color/shade of each line
Message
From
21/08/2018 14:57:06
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
01661688
Message ID:
01661696
Views:
62
This message has been marked as a message which has helped to the initial question of the thread.
Likes (1)
>>>>>Hi,
>>>>>
>>>>>Is there an option in VFP 9 report to show each line of a report with a background of a different shade of gray (or color)?
>>>>
>>>>Have you tried using a shape that has a filled interior and a Print When condition? Of course, you probably also want to remember to put it at the back in terms of Z-order.
>>>
>>>No, I have not tried this approach. I think I will try Tamar's suggestion first.
>>>Thank you.
>>
>>Dmitry, this is how things look like by following Naoto's suggestion.
>
>Antonio, it looks very nice. Thank you for illustrating.
>
>But, honestly, I don't understand how to implement it. That is, I can put the shape and move it back. But what does he mean by "filled interior"? And what would be the Print When condition?

Don't worry, Dimity, it's quite simple, actually.

Starting with an empty detail band, put a shape on it that covers all the band. Set the shape pen and fill colors to the color you desire (pic#1).

Make the shape stretchable, to make sure it covers all of the detail band, even if it grows (pic#2 - the only relevant info is under the "Stretch downwards" section, the rest depends on your particular report).

Finally, make sure that the shape gets printed in alternate records (but you can change this behavior, of course). If the records are to be printed in "natural" order, that means print only when the record number is odd, or even (pic#3). For other cases, the simpler method is to use a switch logical variable that is negated for each printed record.

Finally, you can put whatever objects you need over the band (that is, over the shape). They will be printed like I demoed.
----------------------------------
António Tavares Lopes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform