Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: how to change a new line? Post Reply Post New Topic
Author Message
crystaliao
Newbie
Newbie


Joined: 27 Sep 2010
Location: Taiwan
Online Status: Offline
Posts: 18
Quote crystaliao Replybullet Topic: how to change a new line?
    Posted: 27 Sep 2010 at 10:23pm
in my raw data, they're 5 line's

ex:
Q1.how old are you?
A1.under 20
A2.21-30
A3.31-40
A4.above 40

but the output in text object are all in the same line like
Q1.how old are you?A1.under 20A2.21-30A3.31-40A4.above 40

it's abuse to use '/n', what are other ways to separate them?

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: 05 Oct 2010 at 9:44am
Make sure your text objects has enoughs lines in it, in this case five. The place each data field on a a separate line. If the five lines are all in one data field string you will have to manipulate the string to split it or to insert the carriage return/ new line.
 
It is is hard to give a really clear answer without a better understanding of the raw data, one field or five.
 
Hope this helps
 
John W.
www.CustomReportWriters.net
IP IP Logged
crystaliao
Newbie
Newbie


Joined: 27 Sep 2010
Location: Taiwan
Online Status: Offline
Posts: 18
Quote crystaliao Replybullet Posted: 10 Oct 2010 at 9:56pm
hi John,

I already make sure the text objects is enoughs for lines I want.

about the raw data...I copy the raw date from Excel which has five lines like this:
Q1.how old are you?
A1.under 20
A2.21-30
A3.31-40
A4.above 40

then past it in SQL Server database, but it's only shows five lines into one line like this:
Q1.how old are you? A1.under 20 A2.21-30 A3.31-40 A4.above 40

I've try to insert char(10),char(13), but it not work.
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 11 Oct 2010 at 5:47am
Is it a single data field you are trying to break into 5 lines or 5 separate data fields on 5 lines?
IP IP Logged
crystaliao
Newbie
Newbie


Joined: 27 Sep 2010
Location: Taiwan
Online Status: Offline
Posts: 18
Quote crystaliao Replybullet Posted: 11 Oct 2010 at 7:16am
it is a single data field I'm trying to break into 5 lines.
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 11 Oct 2010 at 8:22am

Okay, try this, create a formula, in the formula create a string variable. Pass the results of the data field to the string variable and then use the string functions to break your string at the appropriate point and inserting your carriage return, new line code.

You can then load the formula into a text box of the appropriate size and then format your text box.
 
If you look in the Crystal Help file you will see the String functions available to you all of which should get you the result you want.
 
Hope this helps
 
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.031 seconds.