简体   繁体   English

为什么我的存储过程只能在SSMS中工作,而不能在Reporting Services(SSRS)中工作?

[英]Why is my stored procedure only working in SSMS , but not in the Reporting Services(SSRS)?

I'm working on putting many stored procedures into SSRS , and then you can view it on a website interface.. however, it's giving me issues. 我正在努力将许多存储过程放入SSRS,然后可以在网站界面上查看它。.但是,这给了我很多问题。 Mainly, it only works when I run the exec manually but the "Report Manager" web-site comes up blank. 主要是,它仅在我手动运行exec ,但是“报表管理器”网站空白。

Could it have something to do with my having removed these lines(the direction I was given) , from the SPROC ? 可能与我从SPROC中删除了这些线(给出的方向)有关吗? :

@DBStatus INT OUTPUT,
..and...
SELECT @DBStatus = @@ERROR

The reason I'm asking is because, when I run the SPROC manually , like so : 我问的原因是因为,当我手动运行SPROC时,像这样:

exec prc_Report_DataAnalysis 1, '20120818', '20120819', 16226

I just put "1" for the @DBStatus part. 我只是在@DBStatus部分输入“ 1”。

Or does it have to do with GRANT commands? 还是与GRANT命令有关? My apologies for vagueness, i'm somewhat pokin in the dark..Any tips /pointers appreciated. 对于模糊性,我深表歉意,我有点不高兴。 thanks! 谢谢!

With the help of my coworker, I figured this out. 在同事的帮助下,我解决了这个问题。 The problem was in my SSRS setup( within MS vis studio). 问题出在我的SSRS设置中(在MS vis studio中)。 I didn't have the correct set-up in the "Report Data" left-hand pane.. So , I needed to : 我在“报告数据”左侧窗格中没有正确的设置。.因此,我需要:

Double-click the DataSets folder, then Rt. 双击“ DataSets”文件夹,然后双击“ Rt”。 click 'DataSet1' and choose 'DataSet proerties' .. from tere I get this box : 单击“ DataSet1”,然后选择“ DataSet属性” ..我得到以下提示

在此处输入图片说明

Well .. before I had not selected 'Stored Procedure' , when I should have. 好吧..在我没有选择“存储过程”之前,我应该选择。 The reason is because , I assumed that the wizard i used to get this up in the beginnin would suffice. 原因是因为,我认为我一开始就使用过的向导就足够了。 But , in there I only entered a dummy SPROC to get it running.. which looks like so: 但是,在这里,我只输入了一个虚拟SPROC来使其运行..看起来像这样:

exec [dbo].[prc_RPT_Account_Summary]
@AccountID = 1,
@dtStart = '19001010',
@dtEnd = '19001010'

And so, I am starting to learn SSRS a littl. 因此,我开始学习SSRS。 thanks 谢谢

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

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