Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8461757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:57:55+00:00 2026-06-10T13:57:55+00:00

I have a stored procedure that returns three columns worth of data to our

  • 0

I have a stored procedure that returns three columns worth of data to our SSRS report. The stored procedure does not alias two of those columns, so they are returned unnamed. Here is an example of what the return dataset might look like:

[FundName]      [blank]          [blank]
    Abc         col2val1        col3val1
    Def         col2val2        col3val2
    Ghi         col2val3        col3val3

I’d like to be able to use an expression in SSRS to retrieve the values from column 2 and 3. Here’s an example of what retrieving data from FundName would look like:

=Fields!FundName.Value

Is there any way to replace the column name (in this example, FundName) with say, the index or position of the column, like so:

=Fields![0].Value    //returns FundName values
=Fields![1].Value    //returns column 2 values
=Fields![2].Value    //returns column 3 values

Thank you in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:57:56+00:00Added an answer on June 10, 2026 at 1:57 pm

    Fortunately, a way to accomplish this has been found. Since our stored procedure could not be changed and it did not return enough information for SSRS to generate a report (missing column names in the resulting DataSet), we changed the way our DataSet gets populated.

    In the DataSet query builder, we created a temporary table and had the stored procedure insert into that temporary table. Once inserted, we selected all the values in our temporary table which populated the DataSet. Now the DataSet has 3 columns with 3 column names to be used by our report.

    CREATE TABLE #tempTable (
    FundName varchar(50),
    col2 dec(15,4),
    col3 char(8)
    )
    
    insert into #tempTable
    exec storedProcedureName
    
    select * from #tempTable
    
    drop table #tempTable
    

    Then you can access those column values in an expression just like before:

    =Fields!FundName.Value    //returns FundName values
    =Fields!col2.Value        //returns column 2 values
    =Fields!col3.Value        //returns column 3 values
    

    I hope this helps anyone else with this particular issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a stored procedure that returns data in the format of: Date |
I have a stored procedure that returns a result with 250!!! columns. But I
I have a database stored procedure call that, among other columns, returns a column
I have a MYSQL stored procedure SP1() that returns a result set. I want
I have the following iBatis mapping for an Oracle Stored Procedure that returns a
I have a stored procedure that takes no parameters, and it returns two fields.
Let's say I have a stored procedure in Microsoft SQL Server 2005 that returns
I have a function that returns a date from a stored procedure, and it
I have a stored procedure that returns a list of numbers in the case
I have a stored procedure in Oracle that returns result set(s) via OUT parameter(s)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.