Solved

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

Posted on 2012-03-28
3
2,038 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
3 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 400 total points
Comment Utility
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 100

Assisted Solution

by:mlmcc
mlmcc earned 100 total points
Comment Utility
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
Comment Utility
The first comment is the solution and the second is additional information that is extremely helpful. Thanks
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

771 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now