cancel
Showing results for 
Search instead for 
Did you mean: 

Unwanted line break when exporting to text - Crystal Reports

0 Kudos

Hello,

I am working on a data extract that requires a HL7 header be created. I am able to do this in a string field, but when exporting to text it creates a line break. I can't fit everything into a single line in the report and export it as once string is longer than 22.5 inches, it cuts out of the output completely.

Here is the line I am needing to export to text:
"MEMBER_SUBSCRIBER_ID|MEMBER_CTRL_NUM|MEMBER_FNAME|MEMBER_LNAME|MEMBER_SSN|MEDICARE_NUM|MEDICAID_NUM|BIRTHDATE|GND|PROVIDER_FNAME|PROVIDER_LNAME|PROVIDER_NPI|PROVIDERS_SPECIALTY|SERVICE_DATE|PLACE_OF_SERVICE|SERVICE_PERFORMED|SERVICE_RESULT|DIAGNOSIS1|DIAGNOSIS2|DIAGNOSIS3|DIAGNOSIS4|DIAGNOSIS5|DIAGNOSIS6|DIAGNOSIS7|DIAGNOSIS8|DIAGNOSIS9|DIAGNOSIS10|DIAGNOSIS11|DIAGNOSIS12|DIAGNOSIS13|DIAGNOSIS14|DIAGNOSIS15|DIAGNOSIS16|DIAGNOSIS17|DIAGNOSIS18|DIAGNOSIS19|DIAGNOSIS20|DIAGNOSIS21|DIAGNOSIS22|DIAGNOSIS23|DIAGNOSIS24|DIAGNOSIS25|ICD10_IND"

It ends up creating a line break at "DIAGNOSIS3". I have it set to lock size and position, and keep object together in the field. I have tried making it a text object and a formula field. I have also supressed blank sections when it was a text object. I have also tried the same settings in the header settings.

At this point I am unsure what to try. I do currently have the string put into a formula field, replacing line breaks in it. The report does have a sub report, but the sub report doesn't do anything with the header.

Does anyone have any tips or tricks I can try out on this?

Thanks,

Jonathan

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

I wanted to provide the final answer in case anyone else runs into this. After more research on this issue, it turned out that Crystal Reports 2013 Service Pack 9. I updated to Service Pack 10 and this resolved my export issues.

Thanks for the support on this! I learned a bit more about exporting text documents from all of the feedback.

Answers (12)

Answers (12)

0 Kudos

I initially thought that worked, but I still have to set the characters per inch to 24. This causes a new line in between each group footer. I have selected Microsoft XPS Printer which is capable of printing up to 44 inches in width, or going by the default print options. When I select this and expand the rows out, it simply prints blank. This occurs at 23 inches as well when using that printer. I tried with Cute PDF Writer as well, as soon as I go past 22.5 inches it doesn't export the header.

Any other thoughts on this? Is there a setting I am missing that prevents this from exporting after 22.5 inches? If I increase the characters per inch to 24 it still adds a blank line between each group footer as well.

0 Kudos

The other option is to select another printer that is capable of printing more than 22.5 inches wide. The formatting engine will generate a line feed when it hits the right margin.

Selecting a Plotter for your default printer is what others used to get large paper sizes. This will affect exporting also, so you need to test.

Don

0 Kudos

The sub report is in the report footer, the empty lines are occurring between the header and the group footer. I would think the sub report would only create a empty line at the bottom of the report. Just to clarify, if I keep the characters per inch at 12 it doesn't have a line between each group footer. This only occurs when I bump the characters per inch up to 24.

vitaly_izmaylov
Employee
Employee
0 Kudos

An empty line caused by subreport is By Design limitation and I do not think it is possible to eliminate it. (From my experience)

0 Kudos

All of the fields were already set to zero for the Y measurement. Also verified the subreport was and that all sections were set to suppress blank sections etc. If it helps any, the only non-suppressed fields are the header, group footer #2, and the group footer in the sub report. All other sections are suppressed.

vitaly_izmaylov
Employee
Employee
0 Kudos

Right-click the top object in any Section

Select Size and Position

Change Y measurement to zero

0 Kudos

Those have been set since I began this report. Adjusting the characters per inch definitely helped for the header. If I can figure out how to prevent the additional line breaks in the group footer, that would eliminate the issue completely. Any thoughts on that? I went ahead and reviewed the sections and it is set to suppress blank results. The line breaks only generate when the data is exported to text of course.

vitaly_izmaylov
Employee
Employee
0 Kudos

I also do not think the version of Crystal Reports makes a difference, but I would suggest to change Printer settings:

Set to "No Printer" and "Dissociate Formatting Page Size.."

0 Kudos

When I change it from 12 to 8, it only outputs this part ( 22.5x8 = 180 characters) of the header:

"MEMBER_SUBSCRIBER_ID|MEMBER_CTRL_NUM|MEMBER_FNAME|MEMBER_LNAME|MEMBER_SSN|MEDICARE_NUM|MEDICAID_NUM|BIRTHDATE|GND|PROVIDER_FNAME|PROVIDER_LNAME|PROVIDER_NPI|PROVIDERS_SPECIALTY|SER"

I see where the conversation is going and went ahead and did the math. If I have 24 characters per inch, it outputs the header without a line break, but then creates 2 line breaks between the header and details, and one after each detail.


Also, I forgot to include this in the original post. I am using Crystal Reports 2013 SP9. I know this may not be useful, but since replies are delayed I wanted to ensure it was out there.

Thanks,

Jonathan

vitaly_izmaylov
Employee
Employee
0 Kudos

Ok, make sense 22.5 X 12 characters per inch = 270

Does the line break change position if you change default 12 characters per inch to 8 ?

0 Kudos

I have tried various settings for export. No pagination, and I have used up to 55 characters in the characters per inch. At 55 character its adds multiple line breaks between the detail fields.The 22.5 inches is the page width, or the width that it will allow me to drag the text object out to before it stops exporting the header completely. At 23 inches, it simply doesn't export the header.

The line break is occurring right after 270 characters. Then it finishes up the header without any additional line breaks.

vitaly_izmaylov
Employee
Employee
0 Kudos

What are the settings for Exporting? How many characters per inch?

What is the exact number of characters till the line break? It looks like about 260 characters. What is the exact number?

Not clear where the 22.5 inches number is coming from. Is it Page Width?