Solved

concantenate text string over 254 characters

Posted on 2003-11-26
16
2,254 Views
Last Modified: 2013-12-03
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
Comment
Question by:mikodmc
  • 7
  • 6
  • 2
  • +1
16 Comments
 
LVL 7

Expert Comment

by:mnye
ID: 9827411
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
 

Author Comment

by:mikodmc
ID: 9827485
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
 
LVL 77

Expert Comment

by:peter57r
ID: 9827502
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
 
LVL 7

Expert Comment

by:mnye
ID: 9827583
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
 
LVL 22

Expert Comment

by:Ido Millet
ID: 9827957
Pete's solution would work perfectly.

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

Cheers,
- Ido
0
 

Author Comment

by:mikodmc
ID: 9840168
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
 
LVL 7

Expert Comment

by:mnye
ID: 9845593
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
 

Author Comment

by:mikodmc
ID: 9850468
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 7

Expert Comment

by:mnye
ID: 9850530
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
 

Author Comment

by:mikodmc
ID: 9850629
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
 
LVL 77

Expert Comment

by:peter57r
ID: 9850639
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
 
LVL 7

Expert Comment

by:mnye
ID: 9850665
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
 

Author Comment

by:mikodmc
ID: 9850878
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
 
LVL 7

Expert Comment

by:mnye
ID: 9851086
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
 

Author Comment

by:mikodmc
ID: 9860118
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
 
LVL 7

Accepted Solution

by:
mnye earned 500 total points
ID: 9860188
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now