Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: I have an invoice report with colors on a couple of the bands. How do I switch the color on/off ?



Permlink Replies: 1 - Last Post: Oct 4, 2017 7:57 PM Last Post By: Charles Tyson
Kai Inge Buseth

Posts: 81
Registered: 6/5/08
I have an invoice report with colors on a couple of the bands. How do I switch the color on/off ?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 3, 2017 1:41 PM
When the invoices are printed for the customers it shall have colors.
The colors are not needed when printing the copies for my own storage.
What is the syntax for making the report colorless and back again?

Thanks in advance.

:)
Kai Inge

My Environment is as follows:

Win10 Anniversary
Delphi XE7 Enterprise, Embarcadero. Version 21.0.17707.5020
Character Set: UTF8
Raize components 6.1.12.0
Dewart UniDac Professional (unidac70d21pro.exe) components 7.0.2 like:
TInterbaseUniProvider->TUniConnection->TUniQuery->TUniDataSource->TRzDBG
rid(Raize).
Firebird 2.5.0.26074
Database Workbench 5.16 pro File version 5.1.12.62
Fast Report Standard edition 5.4.3
Charles Tyson

Posts: 3
Registered: 2/4/05
Re: I have an invoice report with colors on a couple of the bands. How do I switch the color on/off ?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 4, 2017 7:57 PM   in response to: Kai Inge Buseth in response to: Kai Inge Buseth
Kai Inge Buseth wrote:
When the invoices are printed for the customers it shall have colors.
The colors are not needed when printing the copies for my own storage.
What is the syntax for making the report colorless and back again?

This is how I did it with FastReport 4:

On the dialog page for the report, create a CheckBox named cbUseColors
For each item on the report Page which has a color option, create an OnBeforePrint handler. The code for the handler looks like this (adjust for the name of your item):
Memo15.Color := iif( cbUseColors.Checked, clYellow, clNone );

There may be more elegant solutions, but I hope that'll get you started.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02