How to eliminate blank rows while exporting to Excel?

心不动则不痛 提交于 2020-01-13 19:38:28

问题


When I export a crystal report to an Excel file, it adds a blank row after every detail row. I have tried many solutions like aligning the fields, keeping the height similar, alignment as baseline. But none of them work.

Can you please let me know a solution so that such blank rows don't get added?


回答1:


Finally, I got a solution with trial and error method. On crystal report designer, I went to Report->Section Expert. Under Details section, unchecked the 'Free-form Placement' checkbox and clicked on 'OK'. This solution worked and the blank rows no longer appeared while exporting to excel.




回答2:


This solved this issue for me.

  1. align to top
  2. arrange lines

The first align to top:

  1. Select all fields on the row, right click, align to top
  2. move the selection to the top of details section (no space between the details section and the section above
  3. remove remaining space at the bottom of the details section

The second:

  1. right click details
  2. click on arrange lines
  3. right click details again
  4. click on fit section

This solved the issue for me.

Sometimes only the first part is necesarry.




回答3:


I had a similar problem with exporting a "|" delimited file when trying to suppress a (group)record when my quantity was zero. Using the section expert the data was suppressed but my pipes were still showing up.
The solution was to use Report>Selection Formulas>Group and use my formula Sum ({Command.QUANTITY}, {@PerformingProvider-Physician}) <> 0.00 ^ is the group This eliminates the group with 0 quantity from the export




回答4:


The best way is Right click on Details cell then select "SIZE & POSITION" then Keep all cell have same Hight and KEEP Y length as 0.0 Issue resolved enter image description here




回答5:


you can export to Microsoft Excel (Data Only), it will remove all the issues of rows/columns gaps provided you have a CR V 13+




回答6:


If the report is complex with a lot of different rows and columns it will be almost impossible to export. It will create bunch of new lines and columns so then it is impossible to manipulate the excel file.

Otherwise, if it's a more simple report, with some small changes like: - realign columns - align all fields in the same row to top - remove blank spaces - suppress blank rows

It is possible to get a better exporting




回答7:


I had a problem that couldn't be solved by the tips above because my report needed group footer rows only, not detail.

After a good deal of trial and error, I found that the culprits were string fields in my group footer row which had null values in the detail.

I have no idea why those fields were somehow forcing line breaks, but I do know that when I replaced the string field

"serial_no"

in my GF row with this formula

"if serial_no = "" then " " else serial_no" (where the length of the inserted blank field is the length of a populated serial_no)

the inserted lines vanished, never to return.




回答8:


There are only a few things to do, to eliminate the empty rows

  1. Align all the columns and rows to the top (make sure to click on fit section option)

  2. All the columns and detail columns should be equal in size and align

  3. In section, expert make sure in all sections the checkbox (keep together unchecked)

  4. In the Detail section, all the columns should be set to Top 0 (Go to the properties [by pressing F4 or direct] set TOP = 0)



来源:https://stackoverflow.com/questions/30482374/how-to-eliminate-blank-rows-while-exporting-to-excel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!