?
Solved

Line Feed and Carriage Return in a basic formula

Posted on 2006-06-16
6
Medium Priority
?
571 Views
Last Modified: 2008-02-01
I have the following formula in a CR but it is igorning the CHR(10) and CHR(13) in the formula
DIM InputField AS STRING
DIM Increment AS NUMBER
DIM TempString AS STRING
DIM TempStringTwo AS STRING
DIM SpouseIDString AS STRING
 

IF NOT(ISNULL({GENERIC.spouse_id})) THEN
    SpouseIDString = ",   "&{GENERIC.spouse_id}
ELSE
    SpouseIDString = ""
End IF

InputField = {GENERIC.name}&"#"&{GENERIC.id_number}& SpouseIDString
Increment = 1

IF INSTR(InputField, "#") > 0 THEN
     TempString = InputField(1 TO INSTR(InputField, "#")-1)
ELSE
    TempString = InputField
END IF
 
IF INSTR(InputField, "#") > 0 THEN
    TempStringTwo= CHR(13)+CHR(10)+InputField(LENGTH(TempString) + 2 TO LENGTH(InputField))
ELSE
    TempStringTwo = ""
END IF

 
FORMULA = "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Times New Roman;}}" + "\viewkind4\uc1\pard\b\f0\fs20 " + TempString + "\b0 " + TempStringTwo

Any Ideas how get the line feed and carriage return to function
0
Comment
Question by:mroberson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 16925161
How do you do the NEWLINE in RTF?  You may need to add that string rather than using the Carriage Rturn - Line Feed.

mlmcc
0
 

Author Comment

by:mroberson
ID: 16934617
Think there is a way to do this sans the RTF code? I am after having the first line bold then a second line that is not. crBOLD will not work in a formula
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 600 total points
ID: 16938860
There is no way to do it with a single formula.

You can put an empty text box on the report and drag fields into it.  The fields can be formatted individually.

mlmcc

0
 

Author Comment

by:mroberson
ID: 17141710
sorry for not getting back but there has been lot going on around here this month and last Any ways mlmcc indirectly did come up with the solution to this. I goggle something and ended up in expert-exchange and mlmcc had applied a technique of using html tag to that problem I in turn used the same technique for the solution to this problem.  
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question