Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Line Feed Post Reply Post New Topic
Author Message
dhakshu
Newbie
Newbie
Avatar

Joined: 01 Mar 2007
Location: Singapore
Online Status: Offline
Posts: 21
Quote dhakshu Replybullet Topic: Line Feed
    Posted: 20 Mar 2007 at 8:29pm
Hi All!
 
    I have a formula field named remarks in my report in which i Check several if conditions .
   I set the remarks to some text each time a condition is found true.
  For eg)
 WHilePrintingRecords;
  Global Stringvar remarks;
remarks:="";
    if cond1 is true then
   ( ..........
      ........
      remarks:="Line no" & " First Line";
    );
   if cond2 is true then
  (
    .........
    ........
    remarks:=remarks & "Line no" & "Second line";
   )
  I have to print them in separate lines.
For eg)  1. Cost is 0
              2. Cost is null
              3. Start Date is empty
The problem is all lines are getting printed continuously.
What is the substitue for "\n" in crystal Reports?
 
Thanks in advance!


Edited by dhakshu - 20 Mar 2007 at 8:44pm
Dhakshu
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 21 Mar 2007 at 9:52am

ChrW(13) + ChrW(10).

So, the remarks:= lines in  your formula for Line 2 and higher would change to something like:

remarks := remarks & ChrW(13) & ChrW(10) & "Line no" & "Second Line"

I recommend putting it there and not at the end of every line so that you don't get an extra line feed at the end of your formula.

-Dell
IP IP Logged
dhakshu
Newbie
Newbie
Avatar

Joined: 01 Mar 2007
Location: Singapore
Online Status: Offline
Posts: 21
Quote dhakshu Replybullet Posted: 21 Mar 2007 at 6:19pm
Thanks a lot Hilfy!
Very helpful!
Dhakshu
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.047 seconds.