Crystal Reports & SQL Reporting Services Training Consultants
Account Log in:
Username:
Password:
A wish changes nothing - a decision changes everything
 
Institute of IT Trainers - Freelance Trainer of the Year 2006 & 2009
Liverpool Business Connect Member
  Maximum Impact Solutions Limited - Reporting Solutions, Creating Answers
Reporting Solutions - Creating Answers, Crystal Reports, Dashboarding (Xcelsius) & SQL Reporting Services

The Maximum Impact Solutions Blog Feed ME!!!!

19
May

When is a Carriage Returm not a Carriage Return in Crystal Reports?

The issue:

I had a client contact me recently about missing carriage returns in Crystal Reports, when exporting the reports.

The client had created a formula in Crystal Reports that added 4 fields together, each on their own separate line, using the following formula:

{TableName.StringFieldName 1} & CHR(13) &
{TableName.StringFieldName 2} & CHR(13) &
{TableName.StringFieldName 3} & CHR(13) &
{TableName.StringFieldName 4}

This formula is all well and good in Crystal Reports, as the function CHR(13), creates the required carriage return, which one will see in the print preview of the report.

However if the report is exported, as text format, the carriage returns disappears, and the resultant exported report  displays a long string of text.


The Solution:

The above formula need to be modified with the addition of a line feed CHR(10)
{TableName.StringFieldName 1} & CHR(13) & CHR(10 )&
{TableName.StringFieldName 2} & CHR(13) & CHR(10) &
{TableName.StringFieldName 3} & CHR(13) & CHR(10) &
{TableName.StringFieldName 4}


If you have any questions, leave us a comment below, or need any assistance, please do not hesitate to Contact Us

MAKE A COMMENT

Name *

Email Address *

Comment *