[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2293
  • Last Modified:

concantenate text string over 254 characters

I have a report in CR 8.5 that has 28 fixed length fields in the Detail Section,  that when added together, total 570 characters.  When I try to concantenate them into one string, I run into the ol' cannot be more than 254 character rule.  I have tried Crystal Reports Tech Knowledge Articles c2006429, "Displaying a multiple value parameter using the For loop with Basic Syntax" and c2009234, Create a string running total which outputs more than 255 characters,  but can not get these to work.  There is no grouping on this report.  Only one SQL table involved.  A Report Header, Detail, and Report Footer section.  I have to run a checksum on each section to FTP to a vendor, and the numbers have to verify.  How can I concantenate the fields in my Detail Section to allow a string of 570 character's.
Thanks,
Dan    
0
mikodmc
Asked:
mikodmc
  • 7
  • 6
  • 2
  • +1
1 Solution
 
mnyeCommented:
You can have these fields in a report you just cant put them in a formula.  What about doing your calculations in a stored procedure and then just dropping them into the report.  Whats is your datasource and what is the logic behind the concatinated field?
hth
matt
0
 
mikodmcAuthor Commented:
My datasource is a SQL 2000 table with ODBC connectivity.

Calculations in a stored procedure?????????  Would that be in the Crystal Report?

Original logic was just " String = Field1 + Field2 + Field3 + Field4...................................."
Of course, this doesn't work, so tried TechKnowledge articles referenced in original question.

Thanks,
Dan

0
 
peter57rCommented:
Just put a text box into the report and drag all the fields from the field explorer into the text box.

The limit for this is 64K.

Pete
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
mnyeCommented:
a stored procedure is logic you create of SQL Server.  If you arent familiar with this then what peter57r will work as well. I was thinking there was some sort of logic to the concatination.

hth
matt
0
 
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
Pete's solution would work perfectly.

This is just to note that this limitation is removed in Crystal 9...

Cheers,
- Ido
0
 
mikodmcAuthor Commented:
Unfortunately, we can not install Crystal 9 until one of our third party vendors who uses Crystal upgrades their product.  Crystal 9 would cause their product not to function.

I tried the Text Box and no, I did not get an error about the 254 character restriction.  However, when I export to a text file, I get line wraping for each detail record.   I can't have this.  All of the fixed length fields did not fit on the report (set to 11.7 x 17.7), so I created 3 concantenated string formula's that fit on the Detail line.  How can I get the detail line to export to a text file without wrapping?

Thanks,
Dan
0
 
mnyeCommented:
what size do you have the text box set to?  by default, TXT files use Courier 10pt.  If you are setting it to smaler then that in the report designer, you wont get an accurate view of how wide the field will be. also, be sure "Can Grow" is NOT checked for the text box (right click -> format field -> common tab).

hth
matt
0
 
mikodmcAuthor Commented:
font set to Courier(Western) 10pt.  "Can Grow" is not checked.  Still get line wrapping for each detail line.  am I trying to do something that Crystal can not do?  each detail line has to be exactly 570 characters with no wrapping when exported to a txt file.  I appreciate all of the input I'm getting here.
Dan
0
 
mnyeCommented:
does the text wrap when you view it in the Crystal Reports Designer? otherwise, the only thing that could be causing it to grow would be a carriage in your data, as long a "can grow" is unchecked.

hth
matt
0
 
mikodmcAuthor Commented:
no, it does not wrap when i preview the report.  however, i don't see all of the data for each detail line either.  it is limited by the size of the print setup.  i have it set to landscape and maximum 11.7 X 17.7.
thanks,
Dan
0
 
peter57rCommented:
I'm fascinated now.
What is it that you are printing that accepts a line length of 570 characters?  And how are you able to judge where the line wrap is occurring? What printer do you have declared that gives you paper of adequate size?

Pete
0
 
mnyeCommented:
if its not wrapping in the designer, then it shouldnt be wrapping in the txt, unless the font size is diffrent in the txt file than in the report designer. perhaps your systems default for a text file is not 10pt.    

as for fitting to the page, you can also cut down your left and right margin, although you wont get more than 10 or 12 characters by doing this.  its under File->Page Setup.

try opening the file in another text editor.  it maybe that the text editor you are using cant interperate (sp?) 11.7 X 17.7?

matt
0
 
mikodmcAuthor Commented:
Pete--------I am not actually 'printing' this to a printer.  This is a rpt to create a txt file that I will ftp to a third party vendor (CSI-CHEQ Services International, Inc) so we can process check payments electronically.  The file header record consisits of 5 fields that add up to fixed length of 31 characters, the detail record consists of 27 fields for a fixed length of 570 characters, and a trailer (footer) record with 5 fields and a fixed length of 40 characters.  I run a checksum agorithm against this text file that appends a checksum field to the file.  The number in this checksum filed must match the number the third party vendor gets after receiving the file.  That way, they know if they have received all of the data.

matt------I am opening the text file in Notepad to check it, since this is what I would be sending to the third party vendor.  That's where I see the wrapping.  I made sure the text file format matched.  
0
 
mnyeCommented:
instead of doing a EDI fixed length fields, why not do a csv?  then you dont have to worry about placement?  

but if you dont have that option, try creating  custom dummy printer driver witha larger printing area.

->Start->Control Panel->Printers->File->Server Properties
->select any format from the "Forms on [COMPUTER_NAME]:", wont matter, youll be changing it
->check "Create a New Form", give it a name
->enter your desired dementions
->"Save Form" -> "Ok"
->go back to your report
->File->Printer Setup
->in the drop down for "Size" under the "Paper" section, select your form you just created


that should give a little extra room.  see if the issue is the data or the actual export too.  let me know what you figure out, im curious as to what is going on.

hth
matt
0
 
mikodmcAuthor Commented:
matt,
ok, I tried your solutions.  csv didn't work.
I created a new form that would show the entire 570 character text box in the preview, and when I exported the report to a txt file, it still wrapped.  I don't know what is going on.  Seems like it might be an export issue.  If I export to Tab-separated text instead of text, it doesn't wrap, but adds extra rows.  I can't export to that format though.  The checksum algothrm doesn't work.
0
 
mnyeCommented:
are you exporting manually if so how many characters per inch did you originally specify?  if you dont know what im talking about or you're exporting programmatically then check these out:

http://support.crystaldecisions.com/library/kbase/articles/c2009328.asp
http://support.crystaldecisions.com/library/kbase/articles/c2009328.asp

--PROGRAMMATICALLY SETTING CHARACTERS PER INCH
http://support.crystaldecisions.com/library/kbase/articles/c2010330.asp


hth
matt
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 7
  • 6
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now