是否可以在SSRS报告中添加

是否可以在SSRS报告中添加

本文介绍了是否可以在SSRS报告中添加“自动过滤器”导出的Excel输出文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我正在项目中工作,在那里我们将所有的Excel报告( VBA 代码中的逻辑)迁移到 SSRS 报告。我必须为 SSRS 生成的Excel报告启用自动过滤器。你能帮我解决这个问题吗?解决方案我试图弄清楚如何做到这一点。到目前为止,我有以下的VBA添加一个自动过滤器的第1行的所有工作表:


$ b

  Sub FilterLoop()
Dim WS_Count As Integer
Dim I As Integer
WS_Count = ActiveWorkbook.Worksheets.Count
For I = 1 To WS_Count
ActiveWorkbook.Worksheets选择
Range(A1)。AutoFilter
Next I
ActiveWorkbook.Worksheets(1).Select
End Sub

这并不理想,但我已经将它添加到我的 PERSONAL 工作簿中,当我生成一个新的报告时可以运行它。我希望这有助于,如果我找出更好的东西,我会再次发布。

Currently I am working in project, where we are migrating all the Excel reports (Behind logic in VBA code) to SSRS reports. I have to enable AUTO FILTER for the excel reports generated from SSRS. Can you please help on this

解决方案

I am trying to figure out how to do this as well. So far I have the following VBA to add an auto-filter to all sheets on row 1:

Sub FilterLoop()
    Dim WS_Count As Integer
    Dim I As Integer
    WS_Count = ActiveWorkbook.Worksheets.Count
    For I = 1 To WS_Count
        ActiveWorkbook.Worksheets(I).Select
        Range("A1").AutoFilter
    Next I
    ActiveWorkbook.Worksheets(1).Select
End Sub

It is less than ideal, but I have added this to my PERSONAL workbook so that I can just run it when I generate a new report. I hope this helps, and if I figure out something better, I'll post again.

这篇关于是否可以在SSRS报告中添加“自动过滤器”导出的Excel输出文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 21:43