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

前端 未结 4 2070
余生分开走
余生分开走 2021-01-11 18:35

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 se

相关标签:
4条回答
  • 2021-01-11 19:04

    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.

    0 讨论(0)
  • 2021-01-11 19:10

    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.

    0 讨论(0)
  • 2021-01-11 19:17

    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.

    0 讨论(0)
  • 2021-01-11 19:20

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

    0 讨论(0)
提交回复
热议问题