Problem Using Stored Procedures In Report Datasets

Apr 26, 2007

I have a local Reporting Services report that I am modifying to use a stored procedure.



Although I am executing a stored procedure in the dataset query window, I also have to run a SELECT statement to retrieve the fields from a table that will populate the report.



The code that I have in the dataset query window looks like the following:



------------------------------------------------------------------------------------------------------------

EXECUTE @retCode = RunClaimVerification @parmID, @parmDate, @parmRecordID OUTPUT



SELECT *

FROM ClaimsDetail

WHERE ClaimRecordID = @parmRecordID

------------------------------------------------------------------------------------------------------------



When I execute this code, the only results that are returned SEEM TO BE the return code associated with running the stored procedure.



I thought about putting the SELECT code in the stored procedure and returning a table or a cursor from the stored procedure BUT it looks like tables are not supported as Report Parameter data types.



The stored procedure code generates Claim data that is stored in a SQL Table. The fields in this SQL table need to be retrieved by a unique record id to populate the fields in the report.



Does anybody have any suggestions as to how to go about doing this OR any suggestions that would help me resolve this problem?

View 1 Replies


ADVERTISEMENT

Using Multiple Stored Procedures In One Report

Aug 11, 2005

Hi all,

View 9 Replies View Related

Using Stored Procedures With Report Builder

Jul 6, 2006

New to the forum here. I'm having a trouble. My company is contemplating using Report Builder as an end user tool as opposed to giving everyone a copy of Visual Studio. I'm studying the feasability on this.

A problem I'm running into, is that it doesn't seem possible to use a stored procedure as a data source. All of our standard reports are based off of stored procedures. Now granted, I'm talking about just Report Builder. I know how to base a report off of a SP using reporting services in VS. So, my question is, can you create a report off of a SP using only Report Builder, and if so, the steps? Thanks guys!

View 8 Replies View Related

Multiple Stored Procedures,single Report

Sep 3, 2007

Hi ,

I have a Report which has 8 stored procedures to get 8 resultant data sets . the stored procedures are almost similar such that they have only difference is the where clause and column getting returned.

So ,every stored access same set of tables and temporary tables getting created to store some set of active data derived from big table.

what happening is ,when i run the stored procedures individually in query analyser ,it is taking the time which is accepatable individually,but when i keep them in the same report. it is taking the time which is equal to sum of all the times taken by the stored procedures ran individually in query analyser which is some what not acceptable

can anybody through an idea,what can be done here. i already thought of locks and kept set transaction isolation level read uncomitted for all the stored procedures.but the time taking is same.

please help me here,i am stuck

Thank you

View 1 Replies View Related

Using Stored Procedures To Build The Report Model

Feb 28, 2007

Hi,

I plan to use my stored procedures to build the ad-hoc reporting model

Can someone please tell me where to use the OPENROWSET hack mentioned in this post (below) to create a datasource view for building the Report Model.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=345209&SiteID=1

 

Appreciate your help

Thanks.

 

 

View 1 Replies View Related

Create Report With Complex And Nested Stored Procedures

Apr 16, 2007

Hi all,

I had developed all my reports using CRXI and stored procedures of MSSQL 2000. Now I am migrating from CRXI to SSRS. But i have a problem because of my report stored procedures. These stored procedures are complex and nested. When i try to use procedures in a report, it gives a error. When i comment out my EXEC line in my procedures, it goes OK.

Please help me to do this ?

View 1 Replies View Related

Using Multiple Stored Procedures In One Report (SQL Server Reporting Services)

Aug 11, 2005

Hi all,

I want to use 2 stored procedures in one report, but I could not find what is the way of doing this. I searched this subject on the intrernet, and I found some solutions. However, they used stored procedures in one stored procedure and used in one report. This is not the thing which I want to do, I want only do using 2 stored procedures in one report at the same time.

Thanks, for now...

View 1 Replies View Related

Using Two Datasets In A Report

Feb 25, 2008

hello everyone!

i have a report in which i use two datasets
the problem is that when i was using only one, there wasn't any scope argument you know, to tell in which dataset i am , because there was only one and all fields and cells in my table returned me the correct values

but as soon as i add the second data set and i drag and drop the datasets fields in my table

instead of having for instance



Code Snippet

=Fields!Consultant.Value






or




Code Snippet=(Fields!Consultant.Value, "dataset1")





it automtically applies the function "first"




Code Snippet=First(Fields!Consultant.Value, "dataset1")





and i don't understand why

please can you give me precious help on this

because it returns me the name of the first consultant only and if i deleter the function first in the expression, the report doens't work anymore

View 3 Replies View Related

2 Datasets In One Report?

Nov 29, 2007

Dear Experts,

I have a problem regarding my report.

Can we use 2 datasets in one report (tabular or chart, either one)?

my report get its data-fed from OLAP database (Cubes) and Oracle tables.

Let say the cube contains the actual sale (all aggregated and query using MDX) and the Oracle table contains the budget value for specific period.

And I am trying to construct a tabular like this:

date item type Revenue Budget Actual (Sale - Budget)
Jan calls regular 2000 1800 200
Jan calls super 3000 2500 500
Feb calls new 1000 900 100
Mar calls super 4500 4000 500
..... and so on

The data for date, item, type and Revenue are available in the OLAP (cubes) and the Budget value is available in Oracle table and we can't afford to transfer the Budget value to the cube.

Is this possible in SSRS? Please let me know if more information needed.

Thanks very much

View 6 Replies View Related

Learn To Access Stored Procedures With ADO.NET 2.0-VB 2005:How To Work With Output Parameters && Report Their Values In VB Forms?

Feb 11, 2008

Hi all,

In my SQL Server Management Studio Express (SSMSE), pubs Database has a Stored Procedure "byroyalty":

ALTER PROCEDURE byroyalty @percentage int

AS

select au_id from titleauthor

where titleauthor.royaltyper = @percentage

And Table "titleauthor" is:
au_id title_id au_ord royaltyper




172-32-1176
PS3333
1
100

213-46-8915
BU1032
2
40

213-46-8915
BU2075
1
100

238-95-7766
PC1035
1
100

267-41-2394
BU1111
2
40

267-41-2394
TC7777
2
30

274-80-9391
BU7832
1
100

409-56-7008
BU1032
1
60

427-17-2319
PC8888
1
50

472-27-2349
TC7777
3
30

486-29-1786
PC9999
1
100

486-29-1786
PS7777
1
100

648-92-1872
TC4203
1
100

672-71-3249
TC7777
1
40

712-45-1867
MC2222
1
100

722-51-5454
MC3021
1
75

724-80-9391
BU1111
1
60

724-80-9391
PS1372
2
25

756-30-7391
PS1372
1
75

807-91-6654
TC3218
1
100

846-92-7186
PC8888
2
50

899-46-2035
MC3021
2
25

899-46-2035
PS2091
2
50

998-72-3567
PS2091
1
50

998-72-3567
PS2106
1
100

NULL
NULL
NULL
NULL
////////////////////////////////////////////////////////////////////////////////////////////
I try to do an ADO.NET 2.0-VB 2005 programming in my VB 2005 Express to get @percentage printed out in the VB Form1. I read some articles in the websites and MSDN about this task and I am very confused about "How to Work with Output Parameters & Report their Values in VB Forms": (1) Do I need the Form.vb [Design] and specify its properties of the object and classes I want to printout? (2) After the SqlConnectionString and the connection.Open(), how can I bring the value of @percentage to the Form.vb? (3) The following is my imcomplete, crude draft code:

Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes

Public Class Form1

Dim connectionString As String = "Data Source=.SQLEXPRESS;Initial Catalog=pubs;Integrated Security=SSPI;"

Dim connection As SqlConnection = New

SqlConnection(connectionString)

Try

connection.Open()

Dim command As SqlCommand = New SqlCommand("byroyalty", connection)

command.CommandType = CommandType.StoredProcedure
...................................................................
..................................................................
etc.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
From the above-mentioned (1), (2) and (3), you can see how much I am lost/confused in attempting to do this task. Please help and give me some guidances and good key instructions for getting the output parameter printed out in the FORM.vb in my VB 2005 Express project.

Thanks in advance,
Scott Chang


View 11 Replies View Related

Having Two Datasets In A Single Report

Jan 31, 2007

Hi,

i have developed a report with sql reporting services 2005 which consists of two datasets in the same report.

Any performance issues it will cause?

Thanks,

Shanthi





View 14 Replies View Related

How To Get Results From 2 Datasets Into Report

Apr 18, 2008

Im trying to use 2 datasets in a report. The first one works ok, but when I add another one (a different table from the same database), it runs ok and brings up results in the data tab, but when I try to view it on the preview tab I get the following error:

an error occured during local report processing.
The definition of the report '/PI' is invalid.
The data set name is missing in the data region 'Dataset2'.

any ideas?
The queries i am running are simple SELECT * queries.

View 1 Replies View Related

Report With 2 Datasets (Formatting Question)

Apr 16, 2008

I have a report with two datasets(and two tables). They both have a field in common(a customer code).

I want the results to be one customer per page.
This isn't a problem when using one dataset, because I can just group by customer_code and page break at the end.

But in this case I need the customer info from the second dataset to be on the same page as the customer info from the first set.

Does anyone have any formatting tips on this?

View 4 Replies View Related

Problems Addressing Different Datasets Used In One Report

Mar 24, 2008

Take a look at my report in layout view:

http://img366.imageshack.us/my.php?image=unbenanntex1.png

My problem is that the left table works perfectly, the right one always sums all values and uses the first funtion on char-fields... I never encountered the problem before, is there an easy solution for this?

View 5 Replies View Related

Execute Two Datasets Simultaneosly For One Report

Dec 18, 2007

Hi,
I have a scenario, where I have to execute a procedure and then run a query to get rows from a table. Whenever the user clicks on view report, these two should happen.
So I came with a strategy like, I have kept two datasets, one for executing SP and one for executing select query.
Can I run these two datasets one after the other, when view report was clicked?

Any other ideas?

View 4 Replies View Related

Two Different Datasets With Same Field Names Used In Same Report

Oct 10, 2007

I am having two datasets in the same report, the column names are the same, in both the datasets, Now How can I use the individual fields in same report.
If I use (Fields!xyz.Value, "dsDataSet1") and (Fields!xyz.Value, "dsDataSet2")
It is giving me syntax error.

How can I use both these fieds, I do not want any aggregates

View 7 Replies View Related

Differentiate Between Fields Of TWO Datasets In A Single Report

Aug 22, 2006



Dear ppl,

I have got 2 datasets D1 & D2 in a Report. How can i differentiate between the fields of these two.

e.g. I got Name field in both the datasets. So when i do =Fields!Name.Value in a textbox the report gives me error

How can i tell the report from which dataset to pick up the field ??

Regards

Nabeel



View 9 Replies View Related

Payslip Report With Multiple Tables/datasets

Jan 14, 2008

A report I am currently working on is a payslip report.
This report has multiple tables on the page, each linked to their own specific dataset.
Eg I have Taxable Allowances table linked to a dataset that returns information relating to any taxable allowances for an employee, then Non-Taxable allowances, Deductions and so on...

Taxable allowance dataset example

SELECT
TA.TaxableTrDesc,
TA.TaxableTrText,
TA.TaxableSubQty,
TA.TaxableTrRate,
TA.TaxableTrFact,
TA.TaxableSubTtl
FROM
Employee E
INNER JOIN TransCurrentMaster TCM ON E.EmployeeCode = TCM.EmployeeCode
CROSS APPLY udfReportTaxableAllowances(E.EmployeeCode, TCM.PaySequence, ) TA
WHERE
E.EmployeeCode IN (@EmployeeCodeParameter)
AND TCM.PaySequence IN (@PaySequenceParameter)

The report works fine when you select one employee.
Currently when you try to select more than one employee, all the employee results are displayed in the tables, for example, Taxable Allowance table contains all taxable allowances records for all employees on the one page...
I'm not sure how I can amend this report so that it is able to be run for multiple employee records...
Any ideas, thoughts, feedback would be much appreciated..

Cheers

View 4 Replies View Related

Oracle Stored Procedures VERSUS SQL Server Stored Procedures

Jul 23, 2005

I want to know the differences between SQL Server 2000 storedprocedures and oracle stored procedures? Do they have differentsyntax? The concept should be the same that the stored proceduresexecute in the database server with better performance?Please advise good references for Oracle stored procedures also.thanks!!

View 11 Replies View Related

Multi-table DataSets In VS2005 SRS Report Designer

May 7, 2007

Hi all,



I need to use a multi-table dataset as a datasource for my report items in a SRS2005 report.

But from designer, I can only see the first table.



Can any one tell me if it is possible to use multiple tables in a dataset for SRS report?



Thanks,



Samson

View 1 Replies View Related

Reporting Services : Report Using Two Datasets From Two SSAS Cubes

Mar 5, 2008

Hi,

I would like to build an SSRS report from two different cubes (SSAS 2005). These cubes are contained in two different SSAS databases.

To do this, i created a dataset for each cube throught MDX expressions.
These datasets use common parameters defined in my report.
Thus, i try to integrate in my report chart datas from the two datasets, but my chart only target one dataset.

Is it possible to create a kind of dataset view to join my two datasets ?
Or is it possible to join the cubes from two different SSAS databases in an MDX expression to put all my datas in a single dataset ?

thx for your help.

Zohir

View 3 Replies View Related

Reporting Services :: Tabular Report Datasets - Grouping On Column

Jun 23, 2015

I have table which has 5 columns(col1,col2,col3,col4,col5) very simple and some data .

I would like to create a tabular  report  datasets on the report like shown below with grouping on col1

like
col1  some static text and dynamic text
------------------------
col1 col2 col3 col4
data data data data
------------------------
col1 some static & dynamic text
------------------------
col1 col2 col3 col4
data data data data
------------------------

Note I need to keep all the tables on the same page and when exported in excel they should come on same page sheet.

View 2 Replies View Related

SSRS - Run Stored Procedure Before Other Datasets

Jun 4, 2008

Hi,

I have a report which contains several queries - one of which is a stored procedure which creates a Temp table in the database. This temp table is then used by the other queries. The temp table provides the lowest granularity of data, and the subsequent queries aggregate it at different levels in order to produce the report charts and matrix's.

The issue is that when I run the report, the stored procedure does not create the temp table before the other queries start using it. In fact, I need to run the report, and then refresh it in order to get the report to pull in the correct data (1st run populates the temp table, refresh then allows the queries to use it.).

Is there a way to force the execution of the stored procedure before the other queries run?...I don't want to create stored procedures for each query, because the intitial creation of the Temp table is quite slow (5seconds), and to do this for each data subset would be very resource intensive.

Thanks

Kevin.

View 10 Replies View Related

Reporting Services :: How To Export 2 Datasets To 2 Excel Sheets In Single Report SSRS

Jun 21, 2015

I have two different dataset in one Report, Each Dataset result is binded to a different Table component.

When I export as Excel ,I am getting all this in One Excel sheet.

I need this in separate excel, as dataset1 in excel1 and dataset2 in excel2.

View 3 Replies View Related

Defining Report Datasets For Package Data From SQL Server Integration Services (SSIS)

Feb 22, 2008

Hi,

I'm using SQL 2008 Februar CTP and trying to use SSIS for Data Source as described in http://msdn2.microsoft.com/en-us/library/ms159215(SQL.100).aspx.
I've created SSIS package and preformed steps described in http://msdn2.microsoft.com/en-us/library/ms345250(SQL.100).aspx (after fixing version to 10.0.0.0).

Now I got next error when trying to add SSIS DataSource (in Report Designer - Visual Studio):


Error messageThe data extension SSIS could not be loaded.


Please help.

Matej

View 3 Replies View Related

Reporting Services :: Count Of Lookup Expression Column In Report With Multiple Datasets?

Sep 27, 2015

My report has two data sets that hold inventory from two different departments.    

ds_DeptA and ds_DeptB

I have a table, that pulls the DeptB status of DeptA record and displays it. This returns empty when the lookup fails to make a match, which is fine.  Typically means DeptB does not have the record yet.   I need to count these empty (null) feilds and populate it in a Text box outside of the table.
 
I just can't figure out the syntax with multiple datasets. I can't use the lookup expression as part of the count expression since the count expression is not contained in a table that has a dataset. 

table: ds_DeptA
fields:
ID
Name 
date_set_to_DeptB
<<Expr>> =Lookup(Fields!ID.Value,Fields!DeptA_ID.Value,Fields!DeptB_Status.Value, "ds_DeptB")

View 3 Replies View Related

Stored Procedures 2005 Vs Stored Procedures 2000

Sep 30, 2006

Hi,



This Might be a really simple thing, however we have just installed SQL server 2005 on a new server, and are having difficulties with the set up of the Store Procedures. Every time we try to modify an existing stored procedure it attempts to save it as an SQL file, unlike in 2000 where it saved it as part of the database itself.



Thank you in advance for any help on this matter



View 1 Replies View Related

SQL Server 2008 :: Stored Procedure Returning Different Datasets Based On Input Variable

Sep 15, 2015

I'm seeing where previous developers have used a single stored procedure for multiple reports, where each report required different columns to be returned. They are structured like this:

CREATE PROCEDURE dbo.GetSomeData (@rptType INT, @customerID INT)
AS
BEGIN
IF @rptType = 1
BEGIN
SELECT LastName, FirstName, MiddleInitial

[Code] ....

As you can see, the output depends on the given report type. I've personally never done this, but that's more because it's the way I learned as opposed to any hard facts to support it.

So what I'm looking for is basically 2-fold.

View 5 Replies View Related

All My Stored Procedures Are Getting Created As System Procedures!

Nov 6, 2007



Using SQL 2005, SP2. All of a sudden, whenever I create any stored procedures in the master database, they get created as system stored procedures. Doesn't matter what I name them, and what they do.

For example, even this simple little guy:

CREATE PROCEDURE BOB

AS

PRINT 'BOB'

GO

Gets created as a system stored procedure.

Any ideas what would cause that and/or how to fix it?

Thanks,
Jason

View 16 Replies View Related

SQL Server 2012 :: Create XML File From AS400 Stored Procedure Returning Multiple Datasets

Oct 3, 2014

I have a store procedure in MC400 which I can call from SSMS using the below command:

EXEC ('CALL GETENROLLMENT() ')At serverName

Now this command returns two data sets like:

HA HB HC HD HE
1112
112571ABC14
113574ABC16
114577ABC87
DADBDCDD
1115566VG02
1115566VG02
1115566VG02

I want to generate two different XML files from these two datasets.Is there any way this can be achieved in SSIS or t-sql ?

View 3 Replies View Related

Listing Datasets In Report (dataset Name, Dataset's Commands)

Oct 12, 2007



Is there any way to display this information in the report?

Thanks

View 3 Replies View Related

How To Search And List All Stored Procs In My Database. I Can Do This For Tables, But Need To Figure Out How To Do It For Stored Procedures

Apr 29, 2008

How do I search for and print all stored procedure names in a particular database? I can use the following query to search and print out all table names in a database. I just need to figure out how to modify the code below to search for stored procedure names. Can anyone help me out?
 SELECT TABLE_SCHEMA + '.' + TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'

View 1 Replies View Related

Using A Stored Procedure To Query Other Stored Procedures And Then Return The Results

Jun 13, 2007

Seems like I'm stealing all the threads here, : But I need to learn :) I have a StoredProcedure that needs to return values that other StoredProcedures return.Rather than have my DataAccess layer access the DB multiple times, I would like to call One stored Procedure, and have that stored procedure call the others to get the information I need. I think this way would be more efficient than accessing the DB  multiple times. One of my SP is:SELECT I.ItemDetailID, I.ItemDetailStatusID, I.ItemDetailTypeID, I.Archived,     I.Expired, I.ExpireDate, I.Deleted, S.Name AS 'StatusName', S.ItemDetailStatusID,    S.InProgress as 'StatusInProgress', S.Color AS 'StatusColor',T.[Name] AS 'TypeName',    T.Prefix, T.Name AS 'ItemDetailTypeName', T.ItemDetailTypeID    FROM [Item].ItemDetails I    INNER JOIN Item.ItemDetailStatus S ON I.ItemDetailStatusID = S.ItemDetailStatusID    INNER JOIN [Item].ItemDetailTypes T ON I.ItemDetailTypeID = T.ItemDetailTypeID However, I already have StoredProcedures that return the exact same data from the ItemDetailStatus table and ItemDetailTypes table.Would it be better to do it above, and have more code to change when a new column/field is added, or more checks, or do something like:(This is not propper SQL) SELECT I.ItemDetailID, I.ItemDetailStatusID, I.ItemDetailTypeID, I.Archived,     I.Expired, I.ExpireDate, I.Deleted, EXEC [Item].ItemDetailStatusInfo I.ItemDetailStatusID, EXEC [Item].ItemDetailTypeInfo I.ItemDetailTypeID    FROM [Item].ItemDetails IOr something like that... Any thoughts? 

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved