Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Missing data Post Reply Post New Topic
Author Message
crystalsonic
Groupie
Groupie


Joined: 26 Jan 2012
Online Status: Offline
Posts: 46
Quote crystalsonic Replybullet Topic: Missing data
     Posted: 22 May 2013 at 11:37am
I created a report that displays the components of several items vertically:
K002
K6000
K6010
K6020
K6030
K6040
K6050
K6060
K6070
K6080
K6090
K6100
K6110
K6120
K6130
K6140
K6300
K6310
K6320
K6330
K6340
K6350
K6160
K6170
K6180
K6230
K6580
K6590
K7000
K7010
K7020
K7030
K7040
K7050
K7060
K7070
K7080
K6250
K7090
K6260
K6280
K7110
K7120
K7130

All of the components are listed above. I changed the report to display the components horizontally and separated by a ^.

K002 K6000^K6010^K6020^K6030^K6040^K6050^K6060^K6070^K6080^K6090^K6100^K6110^K6120^K6130^K6140^K6300^K6310^K6320^K6330^K6340^K6350^K6160^K6170^K6180^K6230^K6580^K6590^K7000^K7010^K7020^K7030^K7040^K7050^K7060^K7070^K7080^K6250^K7090^K6260^K6280^K7110^K7120
 
K002 in the horizontal format is not displaying the last component. K002 is the item with the most components in the report. There are many other items with components and all of the components display fine in both of the reports. I tried exporting in excel and tab delimited file with the same result. I used the following formulas to display the information horizontally:
 
FORMULA 1
    WhilePrintingRecords;
    StringVar chain := '';
    NumberVar ChCnt := 1
 
FORMULA 2
    WhilePrintingRecords;
    StringVar Item:= {TestSetsCodes.TestCode}; // place your field in place of {Your.Field}
    StringVar Chain;
    NumberVar ChCnt;
    if ChCnt = 1
    then (ChCnt:= 2; chain := Item)
    else
    if Length(Chain) + Length(Item) > 254  //see note about this number below
    then Chain := Chain else
    chain := chain + '^' + Item
 
FORMULA 3
    WhilePrintingRecords;
    StringVar Chain
 
Is there any limit to the number of characters a field can store? Is there a problem with my formula? Is there an error log I can look at to troubleshoot?
 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 23 May 2013 at 12:59pm
Which version of Crystal are you using?  Versions prior to 2008 (or possibly XI, I can't remember...) have a 256 character limit on strings.  It's possible that you're running into that.
 
Also, have you turned on "Can Grow" for the formula object when you place it on the report?  If not, it could be a simple issue of it's not displaying because the object on the report isn't wide enough.
 
-Dell
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