Hi all,
I have a report that exports it's results to a text file for use with a main frame import file. The problem is with one of my formulas. Here it is (it's a bit long):
[tt]
numberVar NameLength := 30-length(trim({ARCUS.NAMECUST}));
numberVar Addr1Length := 30-length(trim({ARCUS.TEXTSTRE1}));
numberVar Addr2Length := 30-length(trim({ARCUS.TEXTSTRE2}));
numberVar CityLength := 17-length(trim({ARCUS.NAMECITY}));
numberVar PostalLength := 9-length(trim({ARCUS.CODEPSTL}));
numberVar PhoneLength := 10-length(trim({ARCUS.TEXTPHON1}[1 to 10]));
if NameLength < 0 then NameLength := 0;
if Addr1Length < 0 then Addr1Length := 0;
if Addr2Length < 0 then Addr2Length := 0;
if CityLength < 0 then CityLength := 0;
if PostalLength < 0 then PostalLength := 0;
if PhoneLength < 0 then PhoneLength := 0;
'6105'+
' '+
'A'+
{@sCustNumber}+
trim({ARCUS.NAMECUST})+ReplicateString (' ', NameLength) +
trim({ARCUS.TEXTSTRE1})+ReplicateString (' ', Addr1Length)+
trim({ARCUS.TEXTSTRE2})+ReplicateString (' ',Addr2Length)+
trim({ARCUS.NAMECITY})+ReplicateString ("",CityLength)+
{ARCUS.CODESTTE}[1 to 2]+
trim({ARCUS.CODEPSTL})+ReplicateString (' ', PostalLength)+
' '+
trim({ARCUS.TEXTPHON1}[1 to 10])+ReplicateString (' ', PhoneLength)
[/tt]
The purpose is to construct a string to be an exact number of characters long. It appears correctly on the screen. This used to work but now the client accesses the report through Citrix and it appears to not work. Crystal Info 7.
From my playing around I've found that the last part of the string it will export is up to trim({ARCUS.NAMECITY}). The formula won't export the ReplicateString part of the formula. If I comment out the replicate string on the same line of the formula I can export more of the string - up to about the first two characters of the phone number.
I've tried changing the font of the field from Arial 10pt down to 6pt, changing the font to courier. The report is set to 'print' landscape and the field is as wide as the paper.
Any suggestions?
DjangMan
I have a report that exports it's results to a text file for use with a main frame import file. The problem is with one of my formulas. Here it is (it's a bit long):
[tt]
numberVar NameLength := 30-length(trim({ARCUS.NAMECUST}));
numberVar Addr1Length := 30-length(trim({ARCUS.TEXTSTRE1}));
numberVar Addr2Length := 30-length(trim({ARCUS.TEXTSTRE2}));
numberVar CityLength := 17-length(trim({ARCUS.NAMECITY}));
numberVar PostalLength := 9-length(trim({ARCUS.CODEPSTL}));
numberVar PhoneLength := 10-length(trim({ARCUS.TEXTPHON1}[1 to 10]));
if NameLength < 0 then NameLength := 0;
if Addr1Length < 0 then Addr1Length := 0;
if Addr2Length < 0 then Addr2Length := 0;
if CityLength < 0 then CityLength := 0;
if PostalLength < 0 then PostalLength := 0;
if PhoneLength < 0 then PhoneLength := 0;
'6105'+
' '+
'A'+
{@sCustNumber}+
trim({ARCUS.NAMECUST})+ReplicateString (' ', NameLength) +
trim({ARCUS.TEXTSTRE1})+ReplicateString (' ', Addr1Length)+
trim({ARCUS.TEXTSTRE2})+ReplicateString (' ',Addr2Length)+
trim({ARCUS.NAMECITY})+ReplicateString ("",CityLength)+
{ARCUS.CODESTTE}[1 to 2]+
trim({ARCUS.CODEPSTL})+ReplicateString (' ', PostalLength)+
' '+
trim({ARCUS.TEXTPHON1}[1 to 10])+ReplicateString (' ', PhoneLength)
[/tt]
The purpose is to construct a string to be an exact number of characters long. It appears correctly on the screen. This used to work but now the client accesses the report through Citrix and it appears to not work. Crystal Info 7.
From my playing around I've found that the last part of the string it will export is up to trim({ARCUS.NAMECITY}). The formula won't export the ReplicateString part of the formula. If I comment out the replicate string on the same line of the formula I can export more of the string - up to about the first two characters of the phone number.
I've tried changing the font of the field from Arial 10pt down to 6pt, changing the font to courier. The report is set to 'print' landscape and the field is as wide as the paper.
Any suggestions?
DjangMan