Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: New Line Post Reply Post New Topic
Author Message
sumu
Newbie
Newbie
Avatar

Joined: 22 Dec 2009
Location: India
Online Status: Offline
Posts: 6
Quote sumu Replybullet Topic: New Line
     Posted: 22 Dec 2009 at 1:36am
Hi every body

I am new in crystal report. in my application i need a report of Customer
Address. i pass datatable to crystalreport. in Database for Address can have only 1 field Address ,house,place,district are seperated by comma.

in my report i want to thease three part of address in 3 lines

How can it possible in Crystal report? plz help me
1234
IP IP Logged
ishan
Newbie
Newbie
Avatar

Joined: 16 Dec 2008
Location: Nepal
Online Status: Offline
Posts: 19
Quote ishan Replybullet Posted: 22 Dec 2009 at 3:35am
create a formula field and place the formula given below inside it.
Here {ADDRESS} is the field name of your address fields. Hope you know basic about crystal report. Don't you?


local stringvar array arr;
local stringvar str;

arr:=split({ADDRESS},",");

numbervar num;
for num:=1 to ubound(arr) do
(
    str:=str+ arr[num] + chr(10);


);

str;


Here you declare an array called arr and split the field address by delimeter "," and place it in array variable.


Ishwor
IP IP Logged
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