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


Top 5 Contributors of the Month
ASPEvil
david stephan
Santhakumar Munuswamy
Fauzul Azmi
Post New Web Links

Join matrix cell values with comma

Posted By:      Posted Date: October 11, 2010    Points: 0   Category :Sql Server
 

Hi.

I need some advice in my situation. I have db. table with next values (fake values):

 

CustmerID		Question	Answer
0001			MyQuestion1	Answ1
0001			MyQuestion2	Answ1
0002			MyQuestion1	Answ1
0002			MyQuestion2	Answ2
0002			MyQuestion2	Answ3
0003			MyQuestion1	Answ1
0003			MyQuestion2	Answ2
0003			MyQuestion3	Answ3

 

I need put them into result "table".
I want to use matrix because I don't know how many questions(columns in my result) are in the db. table.

Here result I want to get:

 

			Question1			Question2						QuestionN
Customer1		Answer1, Answer2	Answer1, Answer2, Answer3		Answer1, AnswerN
Customer2		Answer1			Answer2, Answer3				AnswerN-1, AnswerN
...
CustomerN		etc.			etc.					etc.

 

How I can Join fields with comma using standard reporting services features? Or I need write custom VB code? Examples?

I know that Data field is good for agregate functions, like Sum, Avg, etc. But I need another logic. Also I couldn't join


View Complete Post


More Related Resource Links

Merge Join: Full Outer Join - keep key values in case of no-match

  
I'm using the Merge Join to join several different incoming flows into one flow.  I've configured the joins to use a Full Outer Join because I need all records from all sources. In the case of a no-match, I want the component to keep the values of join key fields instead of setting them to NULL.  How can I achieve that?  (Activating the checkbox doesn't help, because that adds a new field to the output instead of re-using the existing one.)

insert mulitple comma seperated values in a temp table

  
I have a reporting services report with a single parameter that can take up to 10 numbers which are comma delimited. I need to insert those numbers into a temp table with one column. So if the numbers were 1 - 10 I would expect to see something like this if querying the temp table Acct_Num 1 2 3 4 5 6 7 8 9 10 Is there a way to do this insert into the table using a comma delimeted string of numbers? ThanksFJK

using join when a column may have multiple values

  
Have 2 tables. Table A has among several columns one called "product_code," which contains 4-digit numerals. Table B has just 2 columns, "product_code," the same 4-digit numerals used in the same column in Table A, and "product_description," which includes a VARCHAR string describing the product referenced by the code. I'm querying Table A and trying to include the "product_description" from Table B with each record returned. Am using a LEFT JOIN like this: SELECT  * FROM Table_A LEFT OUTER JOIN Table_B ON Table_A.product_code = Table_B.prod_code This works fine EXCEPT in cases where Table A has more than one value in "product_code," in which case I get no match in Table B and "NULL" is returned for "product_description." When there is more than one value in the "product_code" column in Table A for a particular record, the values are separated by commas (for example: 1002,1003,9856). How can I get this to work so that for records that have multiple produce codes in table A I get multiple product descriptions from Table B?   Thanks      

matrix including zero values in report builder

  
I have a user that has created a matrix and they are wanting the row to return even if the data value is 0.  Basically the Matrix calculates the number of students enrolled in 10 buildings and 2 of the buildings have no students, so those 2 buildings are excluded in the output.  Nick

spgridview RowDataBound event returning cell values as empty

  
Hi.

i am working with SPGridView to display Announcements. User should be able to edit his own created Announcements.Remaining Items shouldnt be having edit option.

i created SPGridView Columns :

                SPBoundField Title = new SPBoundField();
                Title.HeaderText = "Title";
                Title.HeaderStyle.Font.Bold = true;
                Title.DataField = "Title";
               grdAnnouncements.Columns.Add(Title);


                SPBoundField Description = new SPBoundField();
                Description.HeaderText = "Description";
                Description.DataField = "Description";
                grdAnnouncements.Columns.Add(Description);

          

How Get selected cell values from gridview

  

How Get particular selected cell value from gridview . my grid so many cell available..

i'm created dynamic row and cell ...


Accessing gridview cell values

  

Hi All,

In my application Iam using GridView, in this there are fields (Quantity, Price, Amount) the user can enter Quantity Field value which is a template field (textbox). Iam calculating Amount(Quantity * Price) using Javascript and assigning to the Amount Column cells as below

Gridviewcell.innerText=Quanity * price.

and when user clicks on the Save button I want to add these details of Gridview to the database.

when I try to access the values of the gridview using below code

For i=0 to GridView.rows.count-1

GridView.Rows(i).Cells(2).toString ( for Example)

Next i

It is not displaying the changed value instead it is displaying the default value before calculating the amount.

Before implementing the Javascript part, I had done this in the code behind and it was working fine... Now I just dont want the page to get load so I used javascript.

Can any one help me out in able to access the value of Gridview cells which are assigned using Javascript.

Thanks

 


How to hide matrix rows based on values?

  
Hi,

I have a matrix settled upon an MDX Query using Reporting Services 2000.
In columns i have the Months and in  the Lines and i have Products, so what i need todo is hide the rows that have a 0 value in all months.

How can this be achieved?


Best Regards,
Luis Simões

Hiding Columns in Matrix (RS 2005) Report Based on Columns' Values

  

Hi!

Is there a way to hide automatically columns in a Matrix type raport in RS 2005.  The columns I want to hide have only 'N/A' values in them because there is no data available to populate them.  Here is the example:

  Fall 2010 Fall 2009

Split comma separated values into columns

  

 

Hi,

 I have data like this in my table:

 

AppId   Gender

1         x

2         y

3         x, y

4         x, y, z

 

I need to transform like this:

AppID          Gender

1                  x

2                  y

3                  x

3                  y

4                  x

4                  y

4                  z

 

How to do this?

 

Thanks in advance


Join Multivalue Parameter Values Into a String and LTrim Whitespace

  

Hi

In my reports i like to print the values of the paramters used to generate the report at the top of my reports.

I've just written a report usuing MDX and one of the Parameters is a multivalue list based on a hierachy. The problem i have is when i join the parameter label values together it's bringing through the indenting preceeding whitespace. I've been struggling for a while now to try and trim this off

Anyone have any suggestions??

=JOIN(Parameters.Sites.Label,", ")

results in

  Head Office,      Branch 1,            Subbranch 1 etc

If i put =JOIN(LTrim(Parameters.Sites.Label),", ") i get the error

Overload resolution failed because no accessible 'Join' can be called with these arguments

cheers

Matt


How to list comma separated values in column to multiple rows

  

Hi,

 

I need to list comma seperated values form one to column in multiple rows..ex:

id                           call_rec 

1                            508190,737079,1004618,1075562,1272753,1390841,1544201,2591141

 2                           335395,359380,741049,1113212,2283999,2908851,2001205615 

3                            1212358,2451853,2795175,2001196872 

4                            2283999,2451853 

I want the call_rec for each bug ID to be listed

ex:

id                    

Split Parameter and asign comma seperated values to different parameters?

  

Hi All,

I have a paramter field @param that gets passed a comma seperated list of values eg ('Value1','Value2','Value3').

 

What i would like to be able to do is split these values out and assign them to paramters for later use.  So if for example 'Value1','Value2','Value3' was passed i would count the number of values and in this case its 3 so create 3 parameters named

 

@One = Value1

@Two = Value2

@Three = Value3

 

Is this even possible?

 

Many Thanks,

Slash.

 

 

 


Full join and Null values

  

Hello

I have two tables named tb1 and tb2:

tb1                                                   

id   name  sold   type

1         a     5        1

2         b     10      1

3         c      2       2

 

tb2                                                   

id   name     type

1       &nb

SSRS: Printing multiple values within one cell on a single row

  

Hi I'm new to SSRS and SQL in general.  I'm trying to publish a report that is easy to read, but I end up printing rows that are largely redundant. Consider the following tables:

Table 1: PersonID; Name; Age

1, Tom, 88
2, Stacey, 16

Table 2: PersonID; Color

1, Blue
1, Red
1, Green
2, Jade

 I would like a report that prints something like this:

 

Name

Age

Color

Tom

88

How to Pass Values Between Web Pages ASP.NET

  
You can pass information between pages in various ways, some of which depend on how the redirection occurs. The following options are available even if the source page is in a different ASP.NET Web application from the target page, or if the source page is not an ASP.NET Web page:

Use a query string.

Get HTTP POST information from the source page.

The following options are available only when the source and target pages are in the same ASP.NET Web application.

Use session state.

Create public properties in the source page and access the property values in the target page.

Get control information in the target page from controls in the source page.

How to Pass Values Between ASP.NET Web Pages

  
You can pass information between pages in various ways, some of which depend on how the redirection occurs. The following options are available even if the source page is in a different ASP.NET Web application from the target page, or if the source page is not an ASP.NET Web page:

Use a query string.

Get HTTP POST information from the source page.

The following options are available only when the source and target pages are in the same ASP.NET Web application.

Use session state.

Create public properties in the source page and access the property values in the target page.

Get control information in the target page from controls in the source page.
Categories: 
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