Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Font consistency Post Reply Post New Topic
Author Message
sandy
Groupie
Groupie


Joined: 10 Jan 2007
Location: United States
Online Status: Offline
Posts: 45
Quote sandy Replybullet Topic: Font consistency
    Posted: 20 Jun 2007 at 10:54am

Let's say you have a comments field that you are pulling into a report.  User A when entering the comments in the application uses all caps but user B uses Arial Black 10.  When you run the report you want to make the comments field that prints to be consistent in which font is being used.   You way everything to be Arial Black 10 regardless of what the user used upon entering the data into the application.  Is there a way to do this?  I figure there must be something like a CR function but have not found anything yet.    Thank you in advance!

IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 20 Jun 2007 at 1:53pm
I don't get what is going on here. The font doesn't get saved with the data unless you are using RTF format. How is your font being saved with the data?
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 20 Jun 2007 at 2:19pm
Sandy:
 
Perhaps I am missing something in the question. If so my apologies.
 
 If you are pulling the comments into a report you should be able to format the field on the report to Arial Black 10. Select the comment field, right click and select text formatting. You could also pass the comment field into a formula and apply CR text functions to the string. There are also places for formulas in text formatting.  I dont recall the CR function names offhand but I seem to recall functions that capitalize the first letter of each word with the other letters be lowercase, all uppercase, all lowercase, etc.  Another way would be to put the field in a text box and then format the text box.
 
I just tried it one of my comment fields and it worked...
 
Regards,
 
John W.
Regards,

John W.
www.CustomReportWriters.net
IP IP Logged
sandy
Groupie
Groupie


Joined: 10 Jan 2007
Location: United States
Online Status: Offline
Posts: 45
Quote sandy Replybullet Posted: 21 Jun 2007 at 8:31am
Let you retype an example of my report:
comment field in report is set to Arial 10 black
 
record 1, record 2 and 3 of report:  Record 2 is of a smaller font and I want all the fields to be of the same font and size. In this case the user entered the comments in smaller font in the application.   The other concern is record 3 where the user entered comments in all caps.  Changing all caps to initial caps I should be able to research this myself. 
 
 
IT MASTER PROJECT PLAN - test builds
 
add footage
 
PLANT MISC TAB - CHANGE LOG DOES NOT APPEAR
 
Thank you!
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 21 Jun 2007 at 10:56am

Here is from the CR help file under ' functions - string functions', the function is called ProperCase. There are a lot of string functions so look at the choices you may find something you like better. Here is the one for Capitalization of the first letter

------------------------------------------------
ProperCase ("LINDA FONG")

This example will return "Linda Fong".

ProperCase ("123Michael's")

This example will return "123Michael'S".

--------------------------------
To use this I would suggest creating a simple formula.
 
stringVar x ;
x:= ProperCase({NameOfCommentField});
x;
 
Place the formula on the report where you want the comment field to be and that should sort out your issue.
 
 
 
Regards,
 
John  W.
IP IP Logged
sandy
Groupie
Groupie


Joined: 10 Jan 2007
Location: United States
Online Status: Offline
Posts: 45
Quote sandy Replybullet Posted: 21 Jun 2007 at 11:24am
Thanks John
  The only remaining issue is that &Nbsp prints several times within the text.  I changed the Format edit to HTML Text and it worked in the past but of course I never used ProperCase
 
The Plant Miscellaneous Has A Miscellaneous Info Tab.&Nbsp; On This Tab, The Misc Change Log Does Not Appear To Be Working.&Nbsp; For Ex. Trash049608871 Was Modified On 4/5/07 But This Was Not Recorded In The Change Log.&Nbsp; I Need To Know What Address This Cart Id Was Before The Edit.  --Thanks
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 21 Jun 2007 at 12:38pm

Sandy:

You might try adding another string function to the formula. The function is called 'Replace'. The way this works (assuming it does) is to take the string you have changed to proper case, read through it and then replace the characters ""&Nbsp" with a single empty space.
 
Again from the CR help file
----------------------------------------------------

The following examples are applicable to both Basic and Crystal syntax. They assume that inputString is the text String "Monday is my day off. Can we meet next Monday?".

Replace (inputString, "Monday", "Wednesday")

Returns "Wednesday is my day off. Can we meet next Wednesday?".

------------------------------------------------------------------------
Your formula would now look something like this.
 
stringVar x;
x := ProperCase({CommentFieldName});
x:= Replace (x,"&Nbsp", " ");
x;
 
Hopefully that will get pointed towards something that will work for you.
 
Regards,
 
John W.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.