Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Returning data after last carriage return Post Reply Post New Topic
Author Message
rpetry
Newbie
Newbie
Avatar

Joined: 28 Aug 2009
Location: United States
Online Status: Offline
Posts: 5
Quote rpetry Replybullet Topic: Returning data after last carriage return
     Posted: 28 Aug 2009 at 7:03am
I have a memo field that is free-form text and we use it to keep collection call notes on customers.  When we have a new entry, it is always preceded by a carriage return.
 
I want to create a formula that returns the most recent comments, so I need to it to return all data after the last carriage return in the field.  How can I do this?
Russ Petry
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Aug 2009 at 9:36am
IP IP Logged
rpetry
Newbie
Newbie
Avatar

Joined: 28 Aug 2009
Location: United States
Online Status: Offline
Posts: 5
Quote rpetry Replybullet Posted: 31 Aug 2009 at 12:23pm
Thanks.  This works except every few records, the entire note does not come through.  Is there any way to add to this to let Crystal Reports know to pull everything after the last carriage return?
Russ Petry
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Aug 2009 at 12:28pm
I am guessing it is messing up when there is no carriage in your memo field at all, correct?
if so use an if then statement to account fot that:
if instr({table.memofield},CHR(13))>0 then
IP IP Logged
rpetry
Newbie
Newbie
Avatar

Joined: 28 Aug 2009
Location: United States
Online Status: Offline
Posts: 5
Quote rpetry Replybullet Posted: 31 Aug 2009 at 12:39pm
This catches those fields where there is not carriage return.
 
However, on some fields, for no apparent reason, the last note gets cut off in the middle of the note.  On example is where the memo field says the following:
 
08/19/09 Left msg. DMA

08/26/09 Sent letter 8/7/09.  Called 08/26/09 Lynn Jordan promised check would be sent next week.  DMA
 
But Crystal Reports returns this:
 
08/26/09 Sent letter 8/7/09.  Called 08/26/09 Lynn Jordan promised check would be se
 
I have the field set for "Can Grow" up to 15 lines, but this is way under and other customer notes are longer than this and come through completely.
 
I'm perplexed.
 
 
Russ Petry
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Aug 2009 at 12:46pm

if you place the original field on the report does it get cut off at the same place as the formula field or does it display the full memo field?



Edited by DBlank - 31 Aug 2009 at 12:46pm
IP IP Logged
rpetry
Newbie
Newbie
Avatar

Joined: 28 Aug 2009
Location: United States
Online Status: Offline
Posts: 5
Quote rpetry Replybullet Posted: 31 Aug 2009 at 12:52pm
Interesting observation.  The field cust off at the same place as the formula when it is placed on the report.  Any idea what would cause this?
Russ Petry
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Aug 2009 at 12:55pm
first check your source data to make sure it is fine there. You may have a problem at the data capture point.
If it is OK in the source db (not touched by crystal) what is your source type?
IP IP Logged
rpetry
Newbie
Newbie
Avatar

Joined: 28 Aug 2009
Location: United States
Online Status: Offline
Posts: 5
Quote rpetry Replybullet Posted: 31 Aug 2009 at 1:18pm
I believe that you are correct in that the problem is in the data capture point.  The software is Computer Ease and they use their own ODBC driver to connect.  This is pulling from a flat file if I understand correctly.  I have an email question into them for an answer if this is a known bug.
 
In the meantime, I really appreciate your help.  It has been great.
Russ Petry
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