×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Fixed Length txt file from Crystal Reports (11)

Fixed Length txt file from Crystal Reports (11)

Fixed Length txt file from Crystal Reports (11)

(OP)
Hi guys,
Need some help ..
I am trying to export a 366 bytes detail record and 47 bytes header record from crystal to .txt. A padspace is created for header and detail, used a formula to combine all fields. Those are all working perfectly fine (record length etc.), EXCEPT, When I export the file as .txt it's giving me two CRLF after each detail record. so after every detail record, there is blank record. How to eliminate the extra CRLF? By the way I tried the
as per PAJON's advise (https://www.tek-tips.com/viewthread.cfm?qid=800893) I made the textbox bigger than page margin, nothing works!
Appreciate your help. Thanks.

RE: Fixed Length txt file from Crystal Reports (11)

Try this. Make the text object exactly 22.5 inches wide. You may need to use a different printer driver to allow an object that wide on the page. Then export using 16 CPI and 0 for pagination. If that doesn't work I would need to know what version of the dll you are using. Go into Help > About and click "More Info". Then find U2FText.dll. If you don't see it run a text export to load that DLL and then check the list to see what version of the dll you have.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
http://www.kenhamady.com/

RE: Fixed Length txt file from Crystal Reports (11)

(OP)
Changed to 22.5 inches and no luck.
U2FText.dll version is 11.5.10.1298

RE: Fixed Length txt file from Crystal Reports (11)

(OP)
Also, I created a custom page layout of 10*37 for this report. I was using 22 CPI & 0 Pagination, now changed it to 16-0 and still showing two CRLF.

RE: Fixed Length txt file from Crystal Reports (11)

Make sure that:

1) Every other section has the 'suppress' check mark
2) the object is at position 0,0 in the section (use size and position)
3) There is no space in the section below the object

Any chance you are using a subreport?

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
http://www.kenhamady.com/

RE: Fixed Length txt file from Crystal Reports (11)

(OP)
Hi Ken,
It is not a sub report. everything else except the RH&DT are suppressed. Text Position is 0-0
and there is no space after the text box. still showing two CRLF. So frustrating!

RE: Fixed Length txt file from Crystal Reports (11)

>> A padspace is created for header and detail
What does this mean?

>> used a formula to combine all fields.
Can you post the formula?

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
http://www.kenhamady.com/

RE: Fixed Length txt file from Crystal Reports (11)

(OP)
These are the steps I used. Thanks again Ken.
1. The Detail record length has to be 366. So, first created a separate formula called padSpaces

stringvar padSpaces:= space(366);
padSpaces;

2.Created Formulas for each field filling the appropriate space. F1, F2 etc., like below..

left({F1} + ReplicateString(‘ ‘,4),4) //first field is 4 bytes length
left({F2} + ReplicateString(‘ ‘,10),10)//this is 10 bytes length

3.Made a big string(myString) Formula combining all fields giving the position for each field like below:

stringvar myString:="";
myString:=
left(({F1} + {@padSpaces}),4) +
left(({F2} + {@padSpaces}),10) +
//etc..for each field till the last 366 bytes
myString;

4.Placed the myString inside the textbox (inserted on the Detail)

RE: Fixed Length txt file from Crystal Reports (11)

(OP)
Hi Ken,
It is fixed! you won't believe this..
I changed the text box Height to .1 and the extra line disappeared! The idea of resizing/repositioning the text box was given by you. I played with it, that's all. a huge salute to you!
Hope this thread will help other crystal users.
:)

RE: Fixed Length txt file from Crystal Reports (11)

>> 4.Placed the myString inside the textbox (inserted on the Detail)

Glad you found it. I never put these formulas into text objects. If the formula is the correct length then there is no need to do that, and it adds another layer of complexity. But, I never argue with success.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
http://www.kenhamady.com/

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close