.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

group only selected columns of tablix

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :Sql Server
i have a simple tablix, with item in rows and sales per year in columns...so depending upon the data available, the columns will be shown..from year 2010 back to any number of years..                   year item    2010      2009    2008    current yr   current yr + last yr 123     50           80        10            50            50+80=130 abc      119          29       40         119          119+29 = 148 now, i want to have a calculated columns ( current year sales ie first column value), (last two year sales ie first two column sum) how to achieve this.

View Complete Post

More Related Resource Links

How to let user edit selected gridview columns, not entire row



I've got a gridview I would like to let the user edit a couple of columns.  Seems like everything I'm coming across so far makes the entire row editable.  

Hopefully the solution isn't too complicated.  Can someone point me in the right direction?


Dynamic columns on row group page

Hi, I have a SSRS (2008 R2) report on an Olap data source. On rows I have Agents (as a row group), on columns I have Stores (as a column group) and a measure, let's say SeelOutValue. I want to see sales from agents to stores. I added a page break between each group instance on the Agent row group => one page for an Agent, but the column stores are not filtered by the Agent. I want to see on an Agent page only the stores with values. My question: can I filter the columns (Stores column group) for each Agent (row group)?  Example Dataset:             Store1 Store2 Store3 Store4 Store5  Agent1     1                   1                    1     Agent2     2         2 Agent 3  .... Now an each Agent page there are all 5 stores columns (on Agent1 page column Store2 and Store4 without data). It is possible to see on Agent1 page only Store1, Store3 and Store5 columns, on Agent2 page Store1 and Store2 columns ... ?   Thanks in advance for your help!

Unable to Merge columns outside Group ? Unnecessary Row height ?

HI , In a matrix tablix , I'm unable to merge columns outside the group . Heres a quick screen shot . http://img843.imageshack.us/img843/366/samplema.png The top 3 columns is what i meant [ Unable to Merge columns outside Group ]  and Row height of the first row ? Thanks in Advance !!Rajkumar Yelugu

Entity Model- Add Function Import - selected stored procedure returns no columns

I am using stored procedures returns columns from pivot table generated dynamically "Execute (@PivotTableSQL)".So the resultset columns cannot be identified. Please let us know how to add function import and Get Column information(create complex Type). Thanks in advance. My stored procedure is alter PROCEDURE spGetQuestGrid( @QID as int)ASBEGIN SET NOCOUNT OFF SET FMTONLY OFF  Declare @optId varchar(10) set @optId = (select DISTINCT Optid from  QuestOptions where  QID = @QID)    DECLARE @PivotColumnHeaders VARCHAR(MAX) SELECT @PivotColumnHeaders =  COALESCE(@PivotColumnHeaders + ', [' + cast(Caption as varchar) + ']' ,  '[' + cast(Caption as varchar)+ ']' ) FROM OptionsDetail where OptId = @optId  DECLARE @PivotTableSQL NVARCHAR(MAX)  SET @PivotTableSQL = 'select * from  ( select  Caption,Optid  from OptionsDetail ) as dt PIVOT  ( min(Optid) FOR Caption IN ( '+ @PivotColumnHeaders + '))as pt'     Execute (@PivotTableSQL)  END 

Hiding rows/columns completely in SSRS tablix even when they have data

I have several columns and rows in my tablix.  I don't want to see all of them at once.  I am using a parameter that controls the visibility of the columns or rows of the tablix.  The issue is that it hides but the white space is left.  How do i take out that white space?

FieldTypes for Multi Text and Person or Group Columns?


i am trying to insert an Item through List Web service.

i am able to insert, Text column fields. But unable to  insert an Image in Multi text line, and inserting dates for Date column,Person or Group  fields

Please suggest me on this

 XmlDocument doc = new XmlDocument();
           XmlElement batch = doc.CreateElement("Batch");
           batch.SetAttribute("OnError", "Continue");
           batch.SetAttribute("ListVersion", "1");
           batch.InnerXml = "<Method ID='1' Cmd='New'>" +
              "<Field Name='Title'>"+strTitle+"</Field>" +
               "<Field Name='MultiTextAnnouncement'>"+Announcement+"</Field>" +
                "<Field Name='StartDate' Type='DateTime'>" + DateTime.Now + "</Field>"

does the sql server 2008 R2 support movable columns in a tablix (in Reports)



is there a way to build a report with a tablix and let the columns movable for the users?
from another post i figured out, that this feature is not supported in sql server 2008.
is it featured in  2008 R2 or in 2010? :)

thanks Johnny


How can I clear all selected items of a radio button group in WPF - MVVM?

Hi I have a group of radio buttons bound to a property in View model. Now, on check of one of the button, i perform some action through property. My use case is when ever the action is failed, i want to reset checked button and set the earlier one. For this, i have reset the property value in seter itself but it is not reflected on UI. A workaround for this would be to clear all checked buttons from radio button group. How can we achieve it?? thanks in advance Swapnil

Display columns in matrix based on a group even if data don't exist in resultset


I am trying to create columns in a matrix for data that currently does not exist.  I created a matrix that groups on office name (ROWS) and Month of Appointment Date (Columns).

For example, the matrix currently looks like this.....

  January February March April

SQL MAX() function selecting ALL columns and not only those in the GROUP BY clause


A school has classes. Each class has students. Each student may take up one or several courses.

One only table with thousands of rows contains the following columns (and some others):

  1. Student´s class
  2. Student id-number
  3. Student's course
  4. Student's grade (in the course)
  5. Some other rows. This table has about 25 rows

I need an only SELECT that brings ALL ROWS for each student's highest grade (grades are numbers, not letters).

In the example bellow, I have listed a fragment of the table and I have emphasized with bold and italic characters the rows that are supposed to be selected:

          Class       ID-number     Course     Grade     Row5   Row6   Row7... 

  1. Class-A         100001     Math&n

Custom Columns - Fill values based on value selected in a lookup column



I am working with Sharepoint 2007. I have a list of 130 buildings located in six different cities and three different provinces. I imported this list from an Excel spreadsheet. I also have a document library that contains various files associated with these buildings. I've added a custom column to the document library that contains a lookup field to the name of each building. I also have two additional custom columns that have the city and province. What I would like to accomplish is to have the city and province columns automatically be set based on the name of the building selected, such that these values are taken from the same row of this list as the building name.

Hopefully my question makes sense.

Thank you, James

Group by on external data columns



I created an external content type "Auction" from a SQL table. I added an external data column "Auction" to my document library and selected a few fields to be shown as additional information on "Auction". I would like to create a view where the documents are grouped by one of those additional fields, but the field I need is not shown in the view settings... Is it possible to sort/group on the additional columns comming from from my external data column?





Formatting -- Tucking the child columns under the group header:


I seem to have missed something somewhere.

How do you get a report organized like:


Rather than:


You can't be successful at this unless you're at least 1/2 a bubble off level.

Combine Column Group Columns Into One?


I have a dataset like this:



1........... 09-2010................25,000




I have a report that shows this data by pivoting on the month and giving the remaining amount, like this:

BID......Aug-2010 Remaining........Sep-2010 Remaining.......Oct-2010 Remaining........Nov-2010 Remaining



This all works just fine. However now, I want to take a date that's given, and make a "Past Due" column for anything less than the first of the month of that date.


I have this partially working, as I can filter my column group to be >= CDate(Month(Parameters!CurrentDate.Value) & "/01/" & Year(Parameters!CurrentDate.Value)).


This would give me this:

BID.......Oct-2010 Remaining........Nov-2010 Remaining

1.......... 25,000..............................100,000


How do I combine the previous months into one column? Like this:

BID......Past Due Remaining.......Oct-2010 Remaining........Nov-2

Create a group from selected rows of grid




Let me see if I can explain what I am trying to do...


From a gridview a user would be able to select as many rows as they wanted and create a "custom group" ... that user group would then be available from a dropdown list for future selection. So next time they would just select the "custom group" from a dropdown list and the resulting datagrid would only have those rows that were originally selected.

So if I had a datagrid which had: empoyeeID, name, address, phone#, etc...

1. I select what ever rows I want
2. Create a name for the new custom group
3. Click a "save group" button ... this would save all the employeeID's from selected rows.
4. A dropdown list would then be updated with the new custom group ... ie, MIKE's GROUP
5. User could then select MIKE's GROUP from a dropdown list and work only with rows that were added to it.


Hope that makes sense.

Thanks in advance.


Does the 2008 R2 Data Alignment in the columns (Domain Scope) work with multiple tablix's


Does the 2008 R2 Data Alignment in the columns (Domain Scope) work with multiple tablix's or only with one Tablix with different groups?


I have been trying to use it for a report that has 3 tablixs (the same dataset and same format) but it doesnt seem to work. All the examples i find are for a single tablix.

Anyone know?

count number of columns in group



I need to count number of columns in group -

I have a matrix with SUM in the date area.

I have a group column (lats say 'city') and under it my columns (lats say 'street name');

Under each 'street name' I have cell with SUM function.

The problem is:

When The main group (city) is not expand I get the sum of all cities and what I want to get is an average .

So what I thought of was to divide that number in the number of streets under each city group.

How can I get that number?


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend