简体   繁体   English

URL 中的 SSRS 传递日期参数

[英]SSRS Pass Date Parameter in URL

I have been trying to figure this out for a while now and I cannot seems to get it to work.我已经尝试解决这个问题有一段时间了,但似乎无法让它发挥作用。 I am trying to pass 2 date parameters to an SSRS report.我正在尝试将 2 个日期参数传递给 SSRS 报告。 I am using SSRS 2016. The link that gets you to the report is http://ServerName/Reports/report/SomeFolder/ReportName I have tried following the unanimously agreed upon approach of simply appending &StartDt=01/01/2020&EndDt=01/31/2020 and other combination and listed below.我正在使用 SSRS 2016。让您获得报告的链接是http://ServerName/Reports/report/SomeFolder/ReportName我尝试遵循一致同意的方法,即简单地附加 &StartDt=01/01/2020&EndDt=01/ 31/2020 和其他组合并在下面列出。 http://ServerName/Reports/report/SomeFolder/ReportName&StartDt=01/01/2020&EndDt=01/31/2020 http://ServerName/Reports/report/SomeFolder/ReportName&StartDt=01-01-2020&EndDt=01-31-2020 http://ServerName/Reports/report/SomeFolder/ReportName&rs:Command=Render&StartDt=01/01/2020&EndDt=01/31/2020 http://ServerName/Reports/report/SomeFolder/ReportName&rs:Command=Render&StartDt=01-01-2020&EndDt=01-31-2020 In all cases I get the almost the same error, with the only difference being how I added the dates. http://ServerName/Reports/report/SomeFolder/ReportName&StartDt=01/01/2020&EndDt=01/31/2020 http://ServerName/Reports/report/SomeFolder/ReportName&StartDt=01-01-2020&EndDt=01-31-2020 http://ServerName/Reports/report/SomeFolder/ReportName&rs:Command=Render&StartDt=01/01/2020&EndDt=01/31/2020 http://ServerName/Reports/report/SomeFolder/ReportName&rs:Command=Render&StartDt=01-01 -2020&EndDt=01-31-2020在所有情况下,我都会得到几乎相同的错误,唯一的区别是我添加日期的方式。 The path of the item '/SomeFolder/ReportName&StartDt=01-01-2020' is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash. (rsInvalidItemPath) The path of the item '/SomeFolder/ReportName&StartDt=01-01-2020' is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash. (rsInvalidItemPath) I have confirmed the parameters match StartDt and EndDt appear exactly that way in my report, just for SAG I even made the prompts match and they are Non null able Date/Time fields. The path of the item '/SomeFolder/ReportName&StartDt=01-01-2020' is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash. (rsInvalidItemPath)我已经确认参数匹配 StartDt 和 EndDt 在我的报告中完全以这种方式出现,只是为了 SAG 我什至使提示匹配并且它们是不可为空的日期/时间字段。 None of available values or default values.没有可用值或默认值。 If nothing is selected it has the calendar icon to pick a date and everything runs perfectly.如果没有选择任何内容,它会有日历图标来选择一个日期,一切都运行得很完美。

I actually think I saw something on this back in a .Net explanation but it came out to be the link below.我实际上认为我在 .Net 的解释中看到了一些内容,但结果是下面的链接。 As usual I never mark my answer as correct, but leave it for the next person.像往常一样,我从不将我的答案标记为正确,而是留给下一个人。

http://ServerName/ReportServer/Pages/ReportViewer.aspx?%2FFolderName%2FReportName&rc:showbackbutton=True&StartDt=01/01/2020&EndDt=01/31/2020 http://ServerName/ReportServer/Pages/ReportViewer.aspx?%2FFolderName%2FReportName&rc:showbackbutton=True&StartDt=01/01/2020&EndDt=01/31/2020

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM