使用 SSRS 2005 在 Excel 中导出报告时出现额外的空白页?

发布于 2024-11-30 15:16:50 字数 527 浏览 2 评论 0原文

我使用两个数据区域来显示两种类型的数据...一种缺少序列号,一种运输状态不匹配。当我将报告导出到 Excel 时,我使用分页符将每种类型的数据分隔到不同的工作表上。然后,我可以通过根据存储过程中的指示符列设置过滤器来区分哪个区域显示哪些数据。我的 SP 中有一个名为 @mode 的特定报告参数,共有三种类型,包括丢失序列、Badstatus 和 ALL(包括两者)。

全部模式工作正常,两个区域都在单独的工作表上,没有问题。但是,当我运行前两种模式时,缺少串行/错误状态。该模式显示了正确的数据,但它仍然在 Excel 文件中生成两张表,并为未使用的区域保留一个占位符,最终输出一个空白页面。

如果我不清楚任何事情,我很抱歉,但我是新手SSRS 和报告管理。感谢您的任何反馈,并提前感谢您。

我还忘了提及,我尝试了以下方法来尝试解决此问题:

  • 设置页面高度/边距,
  • 将“Can Grow”属性设置为 false
  • 将分页属性从“breakAtEnd”移动到“breakAtstart”

-Tyler

I am using two data regions to display two types of data... Ones with missing serial numbers, and one with mismatched transportation statuses. When I export my report to excel I seperate each of these types of data onto different sheets using a page break. Then I am able to differentiate which region shows which data by setting a filter based upon an indicator column within my stored procedure. I have one particular report parameter in my SP named @mode and there are three types including missing serial, Badstatus, and ALL (includes both).

The All mode works fine, both regions are on seperate sheets and there is no problem. However, when I run the first two modes which are missingserial/Badstatus. The correct data is displayed for the mode, but it still generates two sheets within the excel file and retains a place holder for the region not in use which ultimately outputs a blank page..

I apologize if I am unclear on anything but I am new to SSRS and Report managing. I appreciate any feedback and thank you ahead of time.

I also forgot to mention, I have tried the following in attempt to fix this:

  • Setting the page height/ margins
  • setting the "Can Grow" Property to false
  • Moving the pagebreak property from "breakAtEnd" to "breakAtstart"

-Tyler

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

祁梦 2024-12-07 15:16:50

试试这个...在报表上最后一个 Tablix 的属性中(预计将是导出到 Excel 后的最后一个工作表)- 设置分页符 >中断位置 = 无。

我认为这会消除导出过程中此 Tablix 之后另一个“区域”的期望。我也用页脚尝试过这个,在做了一点调整后,它也可以很好地与页脚一起使用。

让我们知道您的效果如何。祝你好运!

Try this... In the properties for the last Tablix on the report (which is expected to be the last worksheet upon exporting to excel) - set the Page Break > Break Location = None.

I think what this does is removes the expectation of another "region" after this Tablix in the export process. I also tried this with a footer, it works fine with the footer too after making that little adjustment.

Let us know how it worked out for you. Good luck!

燃情 2024-12-07 15:16:50

尝试将每个区域的可见性更改为:

=iif(Parameters!mode.Value = "Badstatus", True, False) 'for Missing Serial

=iif(Parameters!mode.Value = "Missing Serial",True, False) 'for Badstatus

Try changing the visibility of each region to something like:

=iif(Parameters!mode.Value = "Badstatus", True, False) 'for Missing Serial

=iif(Parameters!mode.Value = "Missing Serial",True, False) 'for Badstatus
你的他你的她 2024-12-07 15:16:50

这个问题并不是2005年特有的。我在2013年也遇到过同样的问题。

我想要有条件分页,尝试了以下选项 -

  • Group >分页> BreakLocation = 'None' 这不会创建多个工作表。 未达到目的。
  • 组>分页> BreakLocation = 'End' 这会根据要求创建多个工作表,但最后会创建一个不必要的工作表。 没有达到目的。

对我有用的是 -

  • Group >分页> BreakLocation = 'Start' 根据要求创建多个工作表,并且不会在最后创建不必要的工作表。 达到目的。

查看解决方案的图示

The issue isn't specific to 2005. I have faced the same issue in 2013 also.

I wanted conditional page breakup, tried following options-

  • Group > PageBreak > BreakLocation = 'None' This doesn't create multiple sheets. Not served the purpose.
  • Group > PageBreak > BreakLocation = 'End' This creates multiple sheets as per requirement, but creates an unnecessary sheet at the last. Not served the purpose.

What worked for me is-

  • Group > PageBreak > BreakLocation = 'Start' Creates multiple sheets as per requirement, and does not create an unnecessary sheet at the last. Served the purpose.

View image for pictorial representation of the solution

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文