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

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

please help on table to matrix/chart

Posted By:      Posted Date: October 18, 2010    Points: 0   Category :Sql Server
i have a table with 2 columns

create table t1

(x varchar(1)
, y varchar(1)


the values are

(L, a)

(M, a)

(N, a)

(M, b)
(N, b)

(L, c)
(N, c)

(M, d)
(L, d)

what is a tsql to create a matrix/chart as the following based on it? (pls use fix font/notepad to have characters align)
  a          b     c    d
a          M,N    L,N   L,M
b M,N
c L,N                   L
d M,L             L

-- IBM has jobs for USA employee to work oversea (India) and get their wages.

View Complete Post

More Related Resource Links

Super Complex Table/Matrix



I'm in a situation where I have to build a super complex table or rather matrix

This is how the table/matrix should look like: 




The complex thing is that everything is taken from a database.


I will try to explain the color sections one by one.


SERIE (Green area)

If we start with the top columns; SERIE 1, SERIE 2, SERIE 3

These values are coming from a table column value. If this column has the value 3 then I will need to print 3 table cells, just like in the image.




Then there is the outer left columns, that goes like this;

Behandlingsdag (meaning day of treatment)

Osplatin (100 mg/m2)

Leucovorin (x)

And so forth.


All these values are also coming from 3 different tables



One Column (Yellow area)

These cells are getting their values from a table. According to some true og false values.



1, 2, 3, 4 (Red area)

Then there is the table cells below the SERIES. These table cells goes like this

First there is a 1, then there are the tables cells 1 to 18 all below

Matrix (or table) like form: questions

Hi! I have to build a form to allow user to submit data; in some cases user should have to fill "matrix" forms, or table... I mean, I will have to define some columns, to be filled with data by user row by row (with the number of rows predefined too). So, I'm wondering if there's a smarter method to create a "matrix" like form than manually creating a grid with labels and textboxes. At first it seems that, at least visually speaking, datagrid could work; but i've always used it binded to some data source, so its population was automatic. Anyone knows if a datagrid could be created "blank", without any databinding, to be real-time populated? Or if there's a better solution? Thanks! ;)

Empty/blank group at top of matrix table

I'm having trouble creating a report with matrix tables.  I've got all the data showing up properly, but the first line in the preview is always blank.  If I subtotal the groupings, I get a blank Total line as well.  How can I stop this from happening? I'm using SQL 2005, report designer.  Data is coming from a stored procedure.  I've executed the sp in management studio as well as in the data tab of the report and it comes back with the correct data (no completely blank/null lines).  I'm new to SSRS and I've tried googling for a solution, but haven't found anything similar.  Below is the sp and the output data. SP: SELECT s.Status_Name + ' (' + CAST(CAST(s.Status_Weight*100 AS int) AS varchar(50)) + '%)' AS Status, s.Status_Order, CASE WHEN co.Company_Name IS NULL THEN '' ELSE co.Company_Name END AS Company_Name, co.Est_Income FROM tblStatus AS s LEFT OUTER JOIN tblCompany AS co ON (co.Status_ID = s.Status_ID AND co.New_Upsell = @NewUpsell) GROUP BY co.Company_Name, s.Status_Order, s.Status_Name, s.Status_Weight, co.Est_Income ORDER BY s.Status_Order, co.Company_Name Output (mgmt studio): Still Connecting (0%),1,Company1,400000.00 Still Connecting (0%),1,Company2,3000000.00 Clear Future (0%),2,Company3,250000.00 Clear Future (0%),2,Company4,250000.00 Appointment (10%),3,,NULL Proposal (40%),5,,NUL

Is there a way to set default style properties for a table or matrix?


We have a company standard we use for fonts, color, background, borders. 

Is there a way to set the default font to say 8 pt (vs 10 pt) so that I do not have to change every textbox and column header when adding columns to a table?



Matrix Report need to look as Table Report


Hi All,

I have a matrix report with 13 columns and 12 row groups are created in SSRS 2008. My problem here is because of the grouping the value is shown only once for a set where as I want to view the value of the grouping column to be repeated for every individual record. Can any one help with this.

Thanks for helping


SSRS 2008 - Fixed headers while scrolling - works fine for Matrix - but not for Table??!!


I have this feature working fine for matrix, but it does not work as expected for Table (Tablix).

I tried all over, and setting both check boxes in the 'Tablix Properties' dialog page 'Repeat header rows on each page' and 'Header should remain visible while scrolling' for both row header and column header, but none of it is working. Am I missing something?

In the properties table (F4) for text box of tablix, under 'Other' there is 'RepeatWith' - none / tablix: what is this used for? I tried this property also but I cannot get the headers fixed / visible while scrolling. I cannot get the 'column headers' repeat on each page of the report. Very frustrating...

Does anyone face similar issue? Can anyone help please? Do I need any update / download any fix? For now I have the following version installed for Visual Studio 2k8:
Microsoft SQL Server Reporting Services Designers Version 10.0.1600.22


matrix or table


How can I achieve the following desing of report ? I got all data but my problem is how to present it ? income, premium and fee are measuares

Country                Measures        July            August           September ....



                           income           $                   $                   $ 

                           premium         $          &n

Add link to another report within a Matrix Table


I have created a matrix table... and want to add a link to report base on the row field

how do i do this?

Each Row will have should nativigate to different reports based on which row the user will select.

So For example, the matrix table layout is like this....


                       Apr          May           Jun          Jul

Navigation to another report via a Matrix Table

I have created a matrix table... and want to add a link to various report base on the row. field.. .how do i do this?

Subreports within table/matrix cells are ignored.

I have Report with subReport,

in the designer its looked well, but when I export  the report to excell format

I get this error,

is it poosible export report with sub report to excell?


Export Visio Database Table Names to Excel

If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

Insert value using Table Value Functions

a real gem in Sql Server 2008. mostly people still using Stored procedure may be they shifted to SQL Server but they are not using TVF right now.

Using jQuery to Filter Table Rows

The project is using the .net GridView control, so I had limited control over the output HTML code. Still, I think this code can work for most tables. One thing to notice: you should use the class "filterable" on your table or on one of its parents for the code to work.
First, we need a text box:

RadioButton Groups, Table Rows And NamingContainers in asp.net

The RadioButtonList. Very handy for inviting users to select just one item from a list although because of the screen real estate it takes up, used less and less in favour of the DropDownList. In plain HTML, the browser knows to enforce the unique selected value amongst a list of radio buttons because they all have the same value for their name attributes.

RadioButton Groups, Table Rows And NamingContainers

(In which AJAX-enhanced CheckBoxes become more useful than RadioButtons but inheritance saves the day, and a simple RadioButton-derived control establishes the purpose of a control's naming container)

The RadioButtonList. Very handy for inviting users to select just one item from a list although because of the screen real estate it takes up, used less and less in favour of the DropDownList. In plain HTML, the browser knows to enforce the unique selected value amongst a list of radio buttons because they all have the same value for their name attributes.

Building a 3-Tier App with Silverlight 3, .NET RIA Services, and Azure Table Storage

Silverlight 3, .NET RIA Services, and Windows Azure Services Platform makes a 3-tier Cloud application easier to build: Silverlight 3 as presentation tier, .NET RIA services as the business logic and data access tier, and Windows Azure Table as the data storage tier. The sample application in this article demonstrates the architecture with a simple Survey application with all these technologies working together from Windows Azure.

Temporary tables in SQL Server vs. table variables

When writing T-SQL code, you often need a table in which to store data temporarily when it comes time to execute that code. You have four table options: normal tables, local temporary tables, global temporary tables and table variables. I'll discuss the differences between using temporary tables in SQL Server versus table variables.
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