Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to suppress background color at print time 1

Status
Not open for further replies.

davefm1

Programmer
Apr 18, 2001
78
US
Does anyone know how to suppress a section or a field background only on a report when printing using the X-2 backgound formula box know matter what its value.

I looking for some type of fuction or way of doing this, Your help is appreciated.

Thanks;
Dave
 
I assume you want the preview to look one way, and the printout to look another?
I don't think this is available, since preview is WYSIWYG. Can you give an example. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Hi Ken;
Your right I do want to display my report on the web with background color but at print time to print without back ground color, because some reports are 200 to 300 pages
long. One type of backgound color is ever other detail line.

(example of x-2 section forumla, if RecordNumber mod 2>0 then Color (200,242,253)else crNoColor) or instead of whole detail just set backgound color of a field at borders ,background may be with x-2of a individual field.

You may be right Ken I haven't heard of this type of functionality in crystal report version 8. Thank's for checking it out.

Dave
 
You could create a formula field that controls the condition, and override the formula in the Web report.

Write a formula called @web with the formula of 0.

Use the condition:

if {@web} = 1
then Aqua
else NoColor

to control your color

Now pass the 1 to the formula from the web page, but not when printing. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
I am not using any web app. I just want to print without the background colors when I print the reports.

Is this possible?
 
This can't be automated within the report because the report uses the same logic for printing and displaying. There is no "If Printing" condition.

You can have the report prompt you for a choice (colors or no colors) and use the result of that prompt, but otherwise you would need two reports. Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
How would I get the report to prompt me?

Further more would this prompt work if I am launching these reports from inside a database?
 
You get a prompt by adding a parameter field. You use the parameter field like a formula field in other formulas or conditions in the report.

It should work anytime the report is run, although I don't know what you mean by running from a database, do you mean from a computer application? Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
an application like Goldmine. If you install the report into the Goldmine folder on the network and also on the local Goldmine folder, you do not need to have Crystal Reports on your machine, it users a viewer to run the report.

How do I specify the color parameter? Is it just like specifying a date parameter? if so, which field am I assigning the parameter to>?
 
You are running it from Goldmine (an application), and the parameters should work.

To add the parameter use "Insert-Parameter Field". Make it a character parameter with 2 default values (Color/No Color) and call it "colorprompt".

No go to where you specified the background color and click the X+2 button next to the color attribute. Put in a formula like:

if {?ColorPrompt} = "Color"
then Aqua
else NoColor

The available colors will be at the top of the function list.
Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top