[Webinar] Streamline your web hosting managementRegister Today

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

Need to export 500 character lines to text in crystal reports. Is this possible

I have a report which I have created which outputs records in lines with a specific format required by our vendor.  The output is basically a datafile with the data in specified positions within each line.

I've attached a code snippet of the formula I created to generate the output line in the detail record:

Basically, it creates a 500 character line.  I cannot view the entire generated line when I preview it in Crystal Reports preview mode.  I've exported the report with Characters Per Inch ranging from 8 to 35 and no pagination ("0" in the number of lines per page option).  When I view the exported text file the lines terminate either well-short of the 500 characters specified or a little bit over the 500 characters.  

I have attempted to use zero-inch margins, 11x17 page size in landscape mode, and no printer without any change in the results.  The output font is set to Courier.

Am I using the wrong tool to generate this file?  I have used this method successfully on reports of smaller line sizes, and did not expect this kind of problem.  I am tempted to go back to perl to get the information from our DB and then generate the report, but I do not really want to stray from our standard reporting environment.

Thanks in advance.


NumberVar Zeros;
StringVar ZeroPadding;
NumberVar StringLength;
 
StringLength:=Len(Cstr({NewAutoLoan.AccountNum}, "0"));
Zeros:=25-StringLength;
ZeroPadding:=ReplicateString("0", Zeros);
 
{NewAutoLoan.CardNumber} + "000" + Cstr({NewAutoLoan.AccountNum},"0") + ZeroPadding + "0000050000" + "-" + "NEW AUTO LOAN AWARD POINTS" + Space(24) + Space(205) + {@transDate} + Space(184)

Open in new window

0
jasoncraddock
Asked:
jasoncraddock
  • 6
  • 2
  • 2
1 Solution
 
RajendraDewaniCommented:
i Think Crystal does not support string returning more than 250 char in a formula.


What you can do is.
Create 3 (as per requirement) formals  and split the result. ( do not concate in 4th formula)
keep all the 3 in the report in different selection.

With Regards
Rajendra Dewani
0
 
jasoncraddockAuthor Commented:
Thank you, Rajendra.

As soon as I get the opportunity (it may not be until Monday) I will try your solution and report back.

Thanks again.

Jason
0
 
mlmccCommented:
WIth Crystal 9 and later you can return many more than 250 characters from a formula.  CR8 anmd before had the limitation of 254.

mlmcc
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
jasoncraddockAuthor Commented:
mlmcc,

Any suggestions regarding my question?

Thanks
0
 
mlmccCommented:
As I have stated in your other questions, Crystal is probably truncating the trailing blanks during the export.

mlmcc
0
 
jasoncraddockAuthor Commented:
mlmcc,

This is the only question I have ever posted regarding Crystal....

Is there a way to prevent Crystal from truncating my output?  I am using Crystal 11.

Thanks.
0
 
jasoncraddockAuthor Commented:
Rajendra,

I did as you suggested (break the output into three separate formulas).  There is no difference.

Thanks,

Jason
0
 
RajendraDewaniCommented:
e.g
Create a Formla ( it should only return the first 200 char)
Put it on the detail section.

Now insert a selection below ( under detail section"

Create 2nd Formula ( it should only return the second 200 char)
Put it on the detail section 2

Now insert a selection below ( under detail section"

Create 3rd Formula ( it should only return the thrid 200 char)
Put it on the detail section 3

I think This should work
Rajendra Dewani
0
 
jasoncraddockAuthor Commented:
Rajendra,

I just did this and all the output now is shown, but it does introduce newline at the end of each detail output.

thank you
0
 
jasoncraddockAuthor Commented:
I gave up on Crystal and wrote it in Perl.

Thank you for the suggestions.
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

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