Link to home
Start Free TrialLog in
Avatar of phiadmin
phiadmin

asked on

change crystal reports font size programatically

I saw similar questions asked and answered I need more detail info on how it is done.

I'm working with CR7.5 but hopefully newer versions work the same.

I need to change the font sizes on crystal reports when it is printed / exported.

Seems like I need to create a formula but not sure
1.  how to reference the text field objects in the formula
2.  where to put the formula in the report so it will run when printed  / exported ?

thanks
Avatar of LinInDenver
LinInDenver
Flag of United States of America image

Hello - what is the reason you need a different font displayed vs. exported/printed?

I'm not aware of a way to tell Crystal I am exporting, but you can do a of conditional formatting by right clicking on the field on the screen and choosing format field.
Avatar of Mike McCracken
Mike McCracken

I don't have CR7 here so I don't know if you can conditionally control the font size.

I agree you can't determine in the report what the destination is.

What is the issue you are trying to resolve?

What format are you exporting to?

mlmcc
Avatar of phiadmin

ASKER

We are using ReportViewPro to print Crystal Report and the fonts will print out smaller than normal.   The question is that is there a way to change the font size when printing to make larger.  I looked at the conditional format on the field level and did not see how it applys to this situation.
That may well have something to do with a print driver or something else unrelated to Crystal Reports.

If you never really view the report within Crystal Reports (and just look at it through your other tool when exported), I would just increase the font size in the RPT file until you like how it looks when exported.
We consider that but some users are still using CR to view the reports and prefer not to have 2 versions.  We were hoping to use the parameters to trigger the formula to increase the font size.
What you could do is have two sections that are identical, but one with small font, one with big font.

Right click on the left hand side and choose "Insert Section below"

Based on the parameter selection, you can conditionally suppress the sections.
Right click on the left hand side and choose Section Expert. Click the X2 next to SUPPRESS and your formulas would look something like:

//this would go on your BIG FONT section
IF {?ParameterName} = 'Small' then YES else NO

//this would go on your SMALL FONT section
IF {?ParameterName} = 'Small' then NO else YES
You could do the sme thing with the font size formulas

mlmcc
The duplicate sections is similar in concept of having 2 identical reports.
I will try it if I can not get anything else to work.

what are font size formulas ?
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
this should fix the font size problem.

Was hoping to find out why the font size would change when using another product to
view / print crystal report but this should be a work around