Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Crystal Reports Change Font Size if length of field is certain length

Posted on 2012-03-28
3
Medium Priority
?
2,606 Views
Last Modified: 2012-03-28
I am using Crystal X1. I have a field that I want the font to be as big as possible depending on the length of that field.

So, if the value of the field is 20 characters long I want the font to be a size 24 because it will fit but if it is 40 characters long it needs to be a font of size 12 (for example) because otherwise it won't fit.

WHen I look at the font tab I see that I can put a formula behind the size but I do not know how to tell it which size to use and I cannot find it in the help.
0
Comment
Question by:bmorriso99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 1600 total points
ID: 37777336
I'm afraid there are no set rules.  Different fonts have different characteristics even if notionally the same size.
You'll have to work out your own rules based on testing various strings  and then set the value accordingly.  For example...

if length({table.field}) >40 then
12
elseif length({table.field})>30 then
14
elseif length({table.field}) >20 then
16
else
24
0
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 400 total points
ID: 37777629
Another thing to consider is that the display is controlled by the printer driver so if the user of the report has a different printer, you may have to adjust the formula.

I find that it is a good idea to have the same printer driver installed on my machine (don't need the printer actually available) that the users of the report will have.  In that way the report will render on your machine the same as it does for the user.

mlmcc
0
 

Author Comment

by:bmorriso99
ID: 37777818
The first comment is the solution and the second is additional information that is extremely helpful. Thanks
0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

664 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question