|
-
May 29th, 2004, 03:54 PM
#16
I think you need both carriage return and linefeed which is chr(10) + char(13). Here is an example
CRXReport.FormulaFields.Item(1).text = chr(10)+chr(13) & Text1.text & chr(10)+chr(13)
There are two ways to deal with it.
1. Have your sql take care of this concatenation with carriage return and line feed. Have sql return address as one field and remaining all as second with carriage return and line feed.
2. Once done just display address field first and then second field. Check in 4.5 is there a property called can grow. Try disabling it if you could. As these two fields are going to be indendent CR wouldn't have any problem displaying it.
Thanks
-
May 31st, 2004, 04:13 AM
#17
Originally posted by dilemma
I think you need both carriage return and linefeed which is chr(10) + char(13). Here is an example
CRXReport.FormulaFields.Item(1).text = chr(10)+chr(13) & Text1.text & chr(10)+chr(13)
There are two ways to deal with it.
1. Have your sql take care of this concatenation with carriage return and line feed. Have sql return address as one field and remaining all as second with carriage return and line feed.
2. Once done just display address field first and then second field. Check in 4.5 is there a property called can grow. Try disabling it if you could. As these two fields are going to be indendent CR wouldn't have any problem displaying it.
Thanks
I have tried passing the concatenated fields to the formula field in CR 4.5 but to no avail. The CR doesn't recognizes carriage return and line feed. There are also no chr functions the function list in the formula editor. After passing the concatenated to the CR the details come as a single line field.
CRXReport.FormulaFields.Item(1).text = chr(10)+chr(13) & Text1.text & chr(10)+chr(13).
The above syntax also doesn't works as there is no FormulaFields property in the CR control i use in my application.
Help
-
June 1st, 2004, 06:21 PM
#18
What if your backend deals with this scenario ? What backend you are using ?
Thanks
-
June 1st, 2004, 11:42 PM
#19
I am using MSAccess as my backend. How can we handle this through the backend? I cannot make major changes to the database as i am in my last leg of the project. Because of the change to the database it should not be that i would have to change a lot in my code.
Thanks
-
June 4th, 2004, 09:51 PM
#20
Is this a table based report or SQL based ? If it's a SQL based report then in sql itself concatenate char(10)+char(13).
eg. select name, code + char(10)+char(13) from table where ..
Thanks
-
June 10th, 2004, 10:22 AM
#21
Originally posted by dilemma
Is this a table based report or SQL based ? If it's a SQL based report then in sql itself concatenate char(10)+char(13).
eg. select name, code + char(10)+char(13) from table where ..
Thanks
It is a table based report and not a sql based report. There are three different fields to be placed one below the other in the last column where as in the column previous to this column there is only one field which is the address field which is mutiline.
-
June 14th, 2004, 11:39 PM
#22
I think the problem faced by me is solved. Instead of taking the fields directly from the table i have created a query where in i have joined all the fields in the last column with line feed and carriage return. when i place this field in the report i get the desired result.
Thanks for helping me out and for all the valuable
suggestion
-
July 6th, 2004, 04:29 AM
#23
Formula Field
Hello
As far as i understand your problem. Here is the solution: (Try it and do tell me) I have not VS.Net at this time thats why check the syntax urself
' First take global variable and place it in the report header
' and suppress it (so that it would not display at run time)
global var as integer
var = 0
dim store as integer
'''''''''''''''''''''''''''''''''''''''''
' Then in your formula Field check this variable equal to zero
if var==0 then
store = field1 + field2 + field3
var=1
else if var==1 then
store = store + field1 + field2 + field3
end if
Best of Luck
May Allah keep this world Peaceful. (Aameen)
-
November 10th, 2004, 12:16 PM
#24
Re: How to enter a line feed in a formula field
Hi, I´m not sure it will work but i try...
I was thinking and maybe you can separate the address by formulas in order to try the other sugestion.
You can know the size of the address string by "Length" function. It appears in the Strings' functions. Then if you know how many numbers have the fax and the telephone you substract the quantity and with te "Mid" function you can extract the information.
Obviously you have to do a formula for each elemento of the address.
I hope it helps you
-
August 9th, 2005, 08:07 PM
#25
Re: How to enter a line feed in a formula field
 Originally Posted by srinath_b
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 
Make sure you have Crystal Syntax turned on if you are using "+" to concatenate strings, otherwise you will need to use "&".
101010
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|