Print Page | Close Window

Crystal Report textbox combination

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=14050
Printed Date: 19 Apr 2025 at 9:35pm


Topic: Crystal Report textbox combination
Posted By: Bouki
Subject: Crystal Report textbox combination
Date Posted: 12 Aug 2011 at 6:49am
Hello.
Im new to C# and crystal report and i was wondering if i could get some help with this.
i create a crystal report form. in this code i have four textboxes. i want show this textboxes between another text which write in crystal report form. but i want this text show without any space.
my text shown like it: my name is Tom - - - - - - Block - - - - - -  from .....
but i want it show like this: my name is Tom Block from......
the textboxes size is variable.
(-) means space
i use vs 2008.net



Replies:
Posted By: lockwelle
Date Posted: 12 Aug 2011 at 8:38am
"my name is " + trim({table.field1}) + " " + trim({table.field2} + " from "....
 
create a formula with the above and only populate 1 text box.
 
There is basically no way to resize and move a textbox...just not that dynamic.
 
The spaces are the extra room in the textbox, isn't?  If so, yeah, you can't move it....well you could move, but you don't know how 'big' to make it as there are no facilities to determine the width of the word.
 
Sorry couldn't be more help


Posted By: Bouki
Date Posted: 12 Aug 2011 at 9:00am
Thanks for your attention.
Where i can do this:
 "my name is " + trim({table.field1}) + " " + trim({table.field2} + " from "....


Posted By: Logle0917
Date Posted: 12 Aug 2011 at 9:50am
Triming the Field did the Trick Thank you so much!!!!!


Posted By: lockwelle
Date Posted: 12 Aug 2011 at 11:19am
you can create a formula, place the code in it.
 
then you can drag the formula onto the report and have it replace your 4 textboxes.
 
HTH


Posted By: Bouki
Date Posted: 12 Aug 2011 at 6:49pm
Thanks.
its work perfect.
one more question how can bold part of the formula?
if i want display name bold.
"my name is " + trim({table.field1}) + " " + trim({table.field2} + " from "....



Posted By: lockwelle
Date Posted: 15 Aug 2011 at 7:38am
while you can do that in a textbox, you can' t do that via a formula (at least not that I have seen...or been able to accomplish)
 
you could split it up into separate textboxes, but then you are back where you started :(


Posted By: hilfy
Date Posted: 15 Aug 2011 at 11:36am
Put a text box on the report.  Start typing the first part.  Drag the field that you need for the first block into the text box, typed the next set of text, drag the next field into the box, etc. until you have your whole text block built.  Now select the first field in the text box and click on the Bold button.  Do the same for anything else that needs to be bold.
 
-Dell
 
Note: Crystal should automatically trim the fields that you drag into the text box.


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: Bouki
Date Posted: 17 Aug 2011 at 7:39am
text box means text object?
if yes: i do it but text object dont trim the fields which i put in to it.



Print Page | Close Window