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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically change the font of the entire report 1

Status
Not open for further replies.

samson123

Programmer
Jun 17, 2005
79
US
I have CR XI, Access 2000.

We want to pass the Font Name to Crystal Report as a parameter. That font should be applied to all the fields.
Is there a way in Crystal reports to dynamically change the font for the entire report ?

I do not want to write code for EACH individual fields on the report.

I know I can go and write code in x+2 -->

if {?Param} = Arial then
Arial
else
TimesNewRoman. (Ignore the syntax, i do not know the constant values for each font).

My requirement is to change the font for the entire report..boom

Any help will be appreciated



 
What you could do is duplicate each section, using the two alternate fonts. Then suppress one section or the other, using the parameter.

You could also do it by having one version as a subreport of the other, put in the report header or footer. But I think a subreport gets re-run for every little change, so it would be less efficient.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
If you're calling up the reports from an application, you can loop through all of the report objects to change the fonts. Otherwise, you'd need to go with the multiple formulas.

If you happen to be using the VB with the RDC, here's a sample application that demonstrates how you can change the font at runtime:

-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top