SSRS doesn't honor the CanGrow Property when Exporting to Excel

百般思念 提交于 2019-12-10 03:52:21

问题


I have a Table in an SSRS report. one of the Table Cells contains the Descriptions of Parts in an order. these descriptions could vary in length and for that reson i have set the "CanGrow" Property to True. when i try to export the report to Excel im expecting that if the text length would exceed the width of the Cell then the height of the cell would grow and the whole text would be shown. Unfortunately the SSRS Excel Generator keeps the height as is and so only the part of the text which fits the width of the cell would be shown.

i would appreciate any help or input to solve this problem. Thanks


回答1:


I've found that instead of removing any elements before the tablix, you can change their width to match that of the page.




回答2:


I found the solution of the same problem! :) Set the "CanGrow" Property to False for all cells from one row. And also set the "Height" Property to your specific size.




回答3:


This is how the Report Viewer's Excel renderer works. You cannot change the way it exports the excel file, however, there are other ways to resolve your issue.

  1. Write your own Excel Renderer (not a good idea -- time consuming)
  2. Fix the column widths before exporting
  3. After exporting to Excel, edit the Excel file via COM calls

My suggestion is #2 -- You can load the RDLC file in memory, and do your modifications there, then call the ReportViewer export function for that altered report.




回答4:


If you have elements before your tablix this can stop the growth. I've found that removing all elements before the tablix will restore the desired row-growth/auto-fit behaviour. I have not found a better solution yet.



来源:https://stackoverflow.com/questions/1544039/ssrs-doesnt-honor-the-cangrow-property-when-exporting-to-excel

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