Solved

Reporting Services: Can I Add Columns at Runtime?

Posted on 2004-08-04
3
292 Views
Last Modified: 2008-01-09
Hi,

A Reporting Services newbie here...Can I add columns to a report at runtime? I have some .NET datagrids that I add template columns to at runtime based on a datacolumn naming convention. I would like to do something similar in Reporting Services. Is this possible?

For example, I have this large query that returns data like:
UPC# - UPC Description - Store #1 - Store #2 - etc...

...so I would like my report to have the "UPC#" and "UPC Description" as static columns, and then the ability to add a column to the report for each "Store".

If this is possible, and you can provide a snippet of how to do this, it would be greatly appreciated. If the answer is no this is not possible, then the reward is not so great :)

Thanks in advance,

Phil
0
Comment
Question by:ppastor
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
kselvia earned 500 total points
ID: 11723235
You can return

UPC#, UPC description, Store #1
UPC#, UPC description, Store #2
...

and add list with a matrix on the stores column.  Sorry I can't explain exactly how off the top of my head, but look at the adventureworks sample for an example. (It should be in the samples folder)

0
 

Author Comment

by:ppastor
ID: 11725539
Thanks, that IS pretty close, but how do I add a Column Header like "UPC Number" above the UPC# field? Also, I have a field which is the SUM of all Store values for each UPC. Any way to get that at the end of the row, instead of before the store columns?
0
 
LVL 12

Expert Comment

by:kselvia
ID: 11737353
Sorry I did not answer your last question. I don't have access to SRS this week so I could not do any tests.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how the fundamental information of how to create a table.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now