Solved

Reporting Services: Can I Add Columns at Runtime?

Posted on 2004-08-04
3
294 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sql server concatenate fields 10 36
date diff with Fiscal Calendar 4 31
How to use three values with DATEDIFF 3 25
sql server query 6 9
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

809 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