Crystal Reports & SQL Reporting Services Training Consultants
Account Log in:
Username:
Password:
Computers are useless. They can only give you answers
 
Pablo Picasso
Institute of IT Trainers - Freelance Trainer of the Year 2006 & 2009
Liverpool Business Connect Member
  Maximum Impact Solutions Limited - Reporting Solutions, Creating Answers
Reporting Solutions - Creating Answers, Crystal Reports, Dashboarding (Xcelsius) & SQL Reporting Services

The Maximum Impact Solutions Blog Feed ME!!!!

01
May

How Do I Dynamically Change the Font Size of a Field in Crystal Reports?

During a recent Crystal Reports 2008 training session a delegate explained that due to the fields having varying sizes there was a need to change the font size based on the length of the data of the field.


Solution:

The only way to change the font size of the field, is to apply a conditional format to the field based on the length of the data of the field.

To change dymically the font size of a field:
  1. Select the required field(s)
  2. From the Format menu select the Format Field option
  3. Click on the Font Tab
  4. Press the [x+2] button to the right of the Size drop down
  5. Enter the following formula:

    IF Len({Customer.Customer Name})>15 Then 8 else
    IF Len({Customer.Customer Name}) in 10 to 15 Then 9 else 10

  6. Press the Save and Close button

If you have any questions, leave us a comment below, or need any assistance, please do not hesitate to Contact Us
1

Ted Wade

25
July
i am trying to print bar code labels but on the blank labels at top of sheet i want to skip, the bar code field insists upon printing a small bar code, when i st to blank or '' or whatever. skips all fields and proper number of labels except problem with the one field. trying maybe to change dynamically to times new roman or something other than bar code and then print a blank. Any ideas?
2

Julia

30
July
Hi Ted

You may want to use a conditional suppression formula, that suppresses the field, when it is blank.

Hope this helps

Julia
3

Ajay

30
August
can i give font size in decimal like IF Len({Customer.Customer Name})>15 Then 8.5 else IF Len({Customer.Customer Name}) in 10 to 15 Then 9.4 else 10.6
4

Julia

30
August
Hi Ajay The font size has to be an integer, it does not see decimals within the programming of Crystal Reports. Julia

MAKE A COMMENT

Name *

Email Address *

Comment *