Skip to Content
avatar image
Former Member

Unwanted line break when exporting to text - Crystal Reports

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

13 Answers

  • Best Answer
    avatar image
    Former Member
    May 16 at 03:00 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 09 at 06:05 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 09 at 07:00 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 09 at 07:22 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 09 at 07:46 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 09 at 08:02 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 11 at 07:57 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • May 09 at 04:37 PM

    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?

    Add comment
    10|10000 characters needed characters exceeded

  • May 09 at 06:10 PM

    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 ?

    Add comment
    10|10000 characters needed characters exceeded

  • May 09 at 07:13 PM

    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.."

    Add comment
    10|10000 characters needed characters exceeded