Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
harlingtonthewizard
Constraint Violating Yak Guru
352 Posts |
Posted - 2011-06-08 : 22:54:50
|
Report Builder 3.0 using Stored Procedure No fields.I run the wizard, connect to my datasource (and test connection) and then on the next page select a stored procedure from the list. The function parameters pane populates with the input paramters if they exist but nothing appears in the Selected fields pane. How do I select fields? If I select the "Edit as Text button" and run the stored proceudr eit returns the correct results. Selecting the "Edit as Text button" again returns to the Design a query page. If I select the store procedure again and enter a value for the input paramter and then select "Next" it indicates Nullable object must have a value? If I select a stored procedure that does not have any input parameters when I select "Next" it indicates "You must have at least one field for your dataset". Yes, but how do I select a field? Here is an example SP.USE [VC]GO/****** Object: StoredProcedure [dbo].[ActionType_RP] Script Date: 06/09/2011 12:24:33 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO-- =============================================-- Author: Steve Harlington-- Create date: <Create Date,,>-- Description: <Description,,>-- =============================================ALTER PROCEDURE [dbo].[ActionType_RP]ASSET NOCOUNT ONDeclare @sql nvarchar(max)Select @sql=''Select @sql=@sql+ 'SELECT DISTINCT OperatorAction.ActionTypeFROM '+name+'.dbo.OperatorAction ' from sys.databases where name='VC' or name like 'VCA%' Create table #t([ActionType] nvarchar(50))Insert into #tExec(@sql)Select DISTINCT dbo.ActionTypeConv ([ActionType]) As ActionTypefrom #tUNION ALLSelect '(Exclude Action Type)'ORDER BY [ActionType]Drop table #tSET NOCOUNT OFFRETURNBut if do this it works?USE [VC]GO/****** Object: StoredProcedure [dbo].[Test_RP] Script Date: 06/09/2011 12:31:03 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO-- =============================================-- Author: Steve Harlington-- Create date: <Create Date,,>-- Description: <Description,,>-- =============================================CREATE PROCEDURE [dbo].[Test_RP]ASSET NOCOUNT ONSelect * from SiteDetailsSET NOCOUNT OFFRETURN |
|
harlingtonthewizard
Constraint Violating Yak Guru
352 Posts |
Posted - 2011-06-23 : 02:29:03
|
Seems report builder cannot see data from a stored procedure if the select statement obtains the data from a temp table. |
|
|
|
|
|