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 8041669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:17:54+00:00 2026-06-05T04:17:54+00:00

Using SSRS 2008R2. Currently, I have a select statement that queries a few tables

  • 0

Using SSRS 2008R2.

Currently, I have a select statement that queries a few tables and returns a bunch of hierarchical data.

1 Store-> 1+ Sections -> 1+ Items

The returned dataset resembles something like this(plus 20 other columns):

Store_num | Section_num | Section_Name | Year_Calc | Item_name    | Item_Num
  4542    |   32        |    Fruits    |    1      |   Apple      |   1
  4542    |   32        |    Fruits    |    2      |   Apple      |   1
  4542    |   32        |    Fruits    |    3      |   Apple      |   1
  4542    |   32        |    Fruits    |    4      |   Apple      |   1
  4542    |   32        |    Fruits    |    5      |   Apple      |   1
  4542    |   32        |    Fruits    |    1      |   Berry      |   2
  4542    |   32        |    Fruits    |    2      |   Berry      |   2
  4542    |   32        |    Fruits    |    3      |   Berry      |   2
  4542    |   32        |    Fruits    |    4      |   Berry      |   2
  4542    |   32        |    Fruits    |    5      |   Berry      |   2
  4542    |   32        |    Fruits    |    1      |   Orange     |   3
  4542    |   32        |    Fruits    |    2      |   Orange     |   3
  4542    |   32        |    Fruits    |    3      |   Orange     |   3
  4542    |   32        |    Fruits    |    4      |   Orange     |   3
  4542    |   32        |    Fruits    |    5      |   Orange     |   3
  4542    |   32        |    Fruits    |    1      |   Banana     |   4
  4542    |   32        |    Fruits    |    2      |   Banana     |   4
  4542    |   32        |    Fruits    |    3      |   Banana     |   4
  4542    |   32        |    Fruits    |    4      |   Banana     |   4
  4542    |   32        |    Fruits    |    5      |   Banana     |   4
  4542    |   32        |    Fruits    |    1      |   Watermelon |   5
  4542    |   32        |    Fruits    |    2      |   Watermelon |   5
  4542    |   32        |    Fruits    |    3      |   Watermelon |   5
  4542    |   32        |    Fruits    |    4      |   Watermelon |   5
  4542    |   32        |    Fruits    |    5      |   Watermelon |   5
  4542    |   33        | Vegetables   |    1      |   Esparagus  |   12
  4542    |   33        | Vegetables   |    2      |   Esparagus  |   12
  4542    |   33        | Vegetables   |    3      |   Esparagus  |   12
  4542    |   33        | Vegetables   |    4      |   Esparagus  |   12
  4542    |   33        | Vegetables   |    5      |   Esparagus  |   12
  4542    |   33        | Vegetables   |    1      |   Lettuce    |   13
  4542    |   33        | Vegetables   |    2      |   Lettuce    |   13
  4542    |   33        | Vegetables   |    3      |   Lettuce    |   13
  4542    |   33        | Vegetables   |    4      |   Lettuce    |   13
  4542    |   33        | Vegetables   |    5      |   Lettuce    |   13
  4542    |   33        | Vegetables   |    1      |   Mushroom   |   14
  4542    |   33        | Vegetables   |    2      |   Mushroom   |   14
  4542    |   33        | Vegetables   |    3      |   Mushroom   |   14
  4542    |   33        | Vegetables   |    4      |   Mushroom   |   14
  4542    |   33        | Vegetables   |    5      |   Mushroom   |   14
  4542    |   33        | Vegetables   |    1      |   Tomato     |   15
  4542    |   33        | Vegetables   |    2      |   Tomato     |   15
  4542    |   33        | Vegetables   |    3      |   Tomato     |   15
  4542    |   33        | Vegetables   |    4      |   Tomato     |   15
  4542    |   33        | Vegetables   |    5      |   Tomato     |   15
  4542    |   33        | Vegetables   |    1      |   Spinach    |   16
  4542    |   33        | Vegetables   |    2      |   Spinach    |   16
  4542    |   33        | Vegetables   |    3      |   Spinach    |   16
  4542    |   33        | Vegetables   |    4      |   Spinach    |   16
  4542    |   33        | Vegetables   |    5      |   Spinach    |   16

In my tablix, I’m currently grouping on Items_num, and Section_num so that I repeat my entire tablix for each Item for each Section.

It wasn’t a difficult problem at first, as I just created two tablix’s and the one with multiple years had a column group. Problem solved.

However, as with any job, it wasn’t good enough. I need to have all the informational data repeated for each “5 year calculation”.

Here’s what the tablix sort of looks like, and you’ll understand why I can’t figure out a good solution for this.

+--------+--------+----------------+-------------+---------+---------+----------------+
|Store   |4542                     |Store Name:  | We Sell Groceries!                 |
+--------+--------+----------------+-------------+---------+---------+----------------+
|Section |32                       |Section Name:| Fruits                             |
+--------+--------+----------------+-------------+---------+---------+----------------+
|Item    |1                        |Item Name:   | Apple                              |
+--------+--------+----------------+-------------+---------+---------+----------------+
|                 |First(Year)     |2nd(Year)    |3rd(Year)|4th(Year)|Last(Year)      |
+-----------------+----------------+-------------+---------+---------+----------------+
|Calculation 1    |First(Column_10)|             |         |         |Last(Column_10) |
+-----------------+----------------+-------------+---------+---------+----------------+
|Calculation 2    |First(Column_11)|             |         |         |Last(Column_11) |
+-----------------+----------------+-------------+---------+---------+----------------+
|Calculation 3    |First(Column_12)|             |         |         |Last(Column_12) |
+-----------------+----------------+-------------+---------+---------+----------------+
|Calculation 4    |First(Column_13)|             |         |         |Last(Column_13) |
+-----------------+----------------+-------------+---------+---------+----------------+
|Calculation 5    |First(Column_14)|             |         |         |Last(Column_14) |
+-----------------+----------------+-------------+---------+---------+----------------+
|Calculation 6    |First(Column_15)|             |         |         |Last(Column_15) |
+-----------------+----------------+-------------+---------+---------+----------------+
|Calculation 7    |First(Column_16)|             |         |         |Last(Column_16) |
+-----------------+----------------+-------------+---------+---------+----------------+

I have 5 static columns and I cannot figure out a way to get the “2nd, 3rd and 4th” values from my dataset.

using the Lookup function doesn’t work as it’s on the entire dataset, and doesn’t adhere to the row groups that I currently have applied (To the entire tablix)

Any ideas?

  • 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-05T04:17:56+00:00Added an answer on June 5, 2026 at 4:17 am

    Since I had the report working in a previous attempt for 1 section and 1 Item. I reverted back to that design and created a new report with a subreport tucked inside a Tablix with the grouping done there.

    In the actual subreport, I created two tablixs. One with all the data above the Calculations, and one below with the calculations (Which would grow based on a column group)

    ANSWER: Used a sub report

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

Sidebar

Related Questions

I'm trying to access list data using SSRS 2008. I have created an XML
we have a bunch of reports (RDL) on SSRS built using officewriter. Sometimes errors
I have some data in a chart using SSRS, sometimes we want to see
I am using SSRS 2008 and i have a stored proc which currently uses
Using SSRS 2008R2 with a SQL Server 2005 database for the Data Source. I
I have a stored procedure that returns about 50000 records in 10sec using at
I'm using SSRS (2k5) to report on data from oracle. The report's purpose is
On my reporting application which is developed using SSRS 2005, I have a parameter
I have written and deployed a custom security extension for SSRS 2008r2 and it
I have two reports built using SSRS 2005. The first report is set to

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.