| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to enter a line feed in a formula field
I want to concatenate 3-4 fields in a formula field. The problem is i want each and every field in the next line. How can you insert a line feed in a formula field?
Thanks |
|
#2
|
|||
|
|||
|
Don't know if this will help, but I'll try...
I'm using Crystal Reports 8.5. If I have a text field and a Database Field, all I have to is drag and drop the Database field onto the Text Field and they will be merged into one. You have to get it at the exact location in order for it to place one field inside another, otherwise it will just be placed on top of the other field. Keep playing around with it and you'll get it eventually.
__________________
I'd rather be wakeboarding... |
|
#3
|
|||
|
|||
|
Quote:
I am using Crystal Reports 4.5, Every field is a database field. I want to concatenate every field into a formula field such that every field starts at a new line. If i place each field one below the other what happens is if the previous column in the report is multiline the placing of the fields in the last column where i have placed the fields one below the other becomes disturbed, with the first line taking the same number of lines as the previous column and then the other details are placed. I want the last column to be printed in the way I have placed the fields without bothering about the number of lines being taken by the previous column. Thanks |
|
#4
|
|||
|
|||
|
Please some one help me out with this problem. My project is being held up for implementation just for this problem
Help
|
|
#5
|
|||
|
|||
|
U can insert a line feed/carriage return by inserting chr(13) in your selection formula
ex: StringVar x:= "Title for the Cross-Tab" + Chr(13) + "Period from Year X to Year Y" Hope this will work |
|
#6
|
|||
|
|||
|
my problem is in the second column i have an address field and it is a multiline field. in the third column i have set the tel fax email fields one below the other so that for one record the details of the address and the tel details etc fall on the same line. But the problem is since the address field is a multi line field the telephone field takes the the same size as the address field and the remaining fields come below that. I want the tel, email fax details one below the other irrespective of the size the address field takes.
Please help me . |
|
#7
|
|||
|
|||
|
Can the address field be broken down into it's separate parts? For example, when I store an address, I store the Street Name and Number in one column, the City in another column, the State in a third column, and the ZipCode in a fourth column. Then I make a multiline text object and drop the fields into the text object in the order that I need them. See the attached image. I also don't know if 4.5 supports the drag and drop like 8.5 does.
Hope that helps!
__________________
I'd rather be wakeboarding... |
|
#8
|
|||
|
|||
|
Thanks I got your point. But the address field cannot be broken in to smaller fields. Is there any other way. the formula editor doesn't supports chr function. Even if i pass it through a string function it comes in the same line and then after the field size is met moves to the next line. Is there any way we can call th CHR function in the formula editor
Thanks |
|
#9
|
|||
|
|||
|
Chr(13) works fine when inserting within a formula.
ex left({?inp string},3) & chr(13) & mid({?inp string},4,3) Try to figure out how many chars are taken for telephone, fax, email (use some string functions to know where they are in a lengthier string) and then use chr(13) in between them. |
|
#10
|
|||
|
|||
|
I am sorry to say but i tried using chr(13) in the formula editor but it doesn't works. when i check the formula it says string,numeric,currency or boolean required at the point where i have entered chr(13). Folllowing is the code entered in the formula editor.
"Tel No : " + {Supplier.TelNo} + chr(13) + " Fax No :" + {Supplier.Fax} If chr(13) is accepted in the formula editor then there will be no problem. I can directly concatenate the database fields and where ever the field should be in the next line i can enter a line feed. Help
|
|
#11
|
|||
|
|||
|
Strange!!!!
The same thing works for me. Are Tel ph, fax no fields are string / numeric. Sorry, these may be idiotic ideas, If they are numeric (hope it's not), try to convert them as string and try to use & instead + (not must, both will work) Otherwise try to select the chr function from the function tree instead of typing it. Last edited by harmonycitra; April 8th, 2004 at 11:44 AM. |
|
#12
|
|||
|
|||
|
Are u using CR 10?
If it is, chr, asc functions are changed and the functions are now chrW, ascW. Try them. |
|
#13
|
|||
|
|||
|
I will try them out . But these functions are not there in the function list. thanks i will try and let you know
Thanks |
|
#14
|
|||
|
|||
|
Quote:
The above functions doesn't exists in the function box in the formula editor. I have tried to post the data from the application but the details are shown one after the other without linefeed. Help
|
|
#15
|
|||
|
|||
|
I am using CR 4.5. There are not any CHR or ASC functions in CR4.5. How can i solve this problem
|
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|