• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1269
  • Last Modified:

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
0
phiadmin
Asked:
phiadmin
  • 4
  • 3
  • 3
1 Solution
 
LinInDenverCommented:
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.
0
 
mlmccCommented:
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
0
 
phiadminAuthor Commented:
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.
0
Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

 
LinInDenverCommented:
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.
0
 
phiadminAuthor Commented:
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.
0
 
LinInDenverCommented:
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
0
 
mlmccCommented:
You could do the sme thing with the font size formulas

mlmcc
0
 
phiadminAuthor Commented:
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 ?
0
 
mlmccCommented:
RIght click the field
Click FORMAT FIELD
Click the FONT Tab
Click the formula button to the right of size
If {?param} = "Print} then
    9
ELse
   10

mlmcc
0
 
phiadminAuthor Commented:
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
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 4
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now