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.
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)
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)
U2FText.dll version is 11.5.10.1298
RE: Fixed Length txt file from Crystal Reports (11)
RE: Fixed Length txt file from Crystal Reports (11)
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)
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)
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)
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)
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)
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/