Showing posts with label matrix. Show all posts
Showing posts with label matrix. Show all posts

Thursday, March 29, 2012

EASY! Trim string?

I have values in a matrix takin too much space. Since they are just used as the matrix column header, cant i trim it or something. To display just the first 3 letters of the the attribute, and not the whole string? Whats the code for that?

=Fields!Collision_Type.Value thats my field right now.

Please help! thanks!

=LEFT(Fields!Collision_Type.Value,1,3) I believe. Or some variant of that syntax.|||

I believe it should be Mid(Fields!Collision_Type.Value,1,3)

|||

Yes, you can change it to this to always show the first 3 characters:

=Left(Fields!Collision_Type.Value, 3)

Jarret

|||Thanks for the quick response, this worked great!|||This one worked as well, hum i wonder what the difference is? But they both seem to display the same. Thanks!|||

There is no difference really, the Mid function allows you to give it a starting position and how many characters to return.

Jarret

Thursday, March 22, 2012

Easy IF statement (Beginner)

Im not really keen on If statements, so im trying to figure out how to write an if statement in a matrix. I want it to list the values that begin with 4's as 2004 the values that start with 5's as 2005 and the values that begin with 6's as 2006. How do i do this? Whats the IF statement code, i know how to put one option. but now all.

=IIF(Fields!ICNNo.Value=Left(1),2004,) ? I know thats wrong..

Please Help.

One way you could do this is using nested IIF statements. Like this:

=iif(left(Fields!ICNNo.Value, 1) = "4", "2004",
iif(left(Fields!ICNNo.Value, 1) = "5", "2005",
iif(left(Fields!ICNNo.Value, 1) = "6", "2006", "OtherValue")))

Hope this helps.

Jarret

|||It worked!!! THANKS ALOT!!!! It worked perfectly!

Easy ....If Else

I completely forgot how to do this. I want one of my groups in the matrix to take its week number (1-7) as Monday-Sunday.

so it would kind of be like this:

=IIF(Fields!DayOfWeek.Value=2,"Mon",

ELSE(Fields!DayOfWeek.Value=3,"Tues",

Else(Fields!DayOfWeek.Value=4,"Wed",

etc etc

Am i doing this right, or am i off?

I think you are almost right, but is RS you must use it like this :

=IIF(Fields!DayOfWeek.Value=2,"Mon",

iif(Fields!DayOfWeek.Value=3,"Tues",

iif(Fields!DayOfWeek.Value=4,"Wed", "other")))

Hope this helps

Vinnie

|||You could use the Switch function i.e =Switch(Fields!DayOfWeek.Value=2,"Mon", Fields!DayOfWeek.Value=3,"Tues"... and so on|||thanks for the help, I should have known the "(" didnt close till the end .sql

easy (hopefully) matrix question


I'm working with a matrix in the designer and noticed I need to add a new row in between two existing rows. When I right click and choose add row a row is added at the very bottom of the matrix. What's the easiest way to add a matrix row to the middle of a matrix, one that doesn't include editing the rdl directly.

thanks

I had this exact problem!

What I found out is that if you carefully (yes, carefully) drag your field between 2 existing data fields, there's a thin white bracket line that shows up on the outside of the nearest existing textbox. This is to alert you where the field will be placed. It will either be on the left, right, top or bottom. If none of these areas are white then keep looking because otherwise you'll replace the destination cells - (bad).

|||Thanks for the response! I can insert a row below the first row but every other row is missing that white line that indicates I can insert.

Can you insert between every row or just between the first and second rows?|||You should be able to do it anywhere.. try moving the mouse around more.
The only time I see that you don't get the white bar is when you don't even have an existing data field in the nearest textbox.|||
You're right. After expanding the box and some very careful mouse work I got it to insert. Hopefully the MSFT guys will make this very basic function easier to use. Thanks again for the help.

Friday, March 9, 2012

dynamically columns

Hi guys,
Is there any method to add/delete dynamically columns in a table, not in a
matrix?
thanks,
RaduYou can not really Dynamically add columns to a table..
But you can pre-create a number of extra columns, show/hide and assign their
values on the fly...
That's about the best we can do now.
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Radu" <Radu@.discussions.microsoft.com> wrote in message
news:FEA44080-476E-46AC-B2AC-7599FB6A6C06@.microsoft.com...
> Hi guys,
> Is there any method to add/delete dynamically columns in a table, not in a
> matrix?
> thanks,
> Radu|||Just another thought... ONe of the things we do that 'sort of' simluates
dynamically adding columns is that we will create a single column, then
populate it with varying multiple pieces of information concatenated
together as a single sql column...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Radu" <Radu@.discussions.microsoft.com> wrote in message
news:FEA44080-476E-46AC-B2AC-7599FB6A6C06@.microsoft.com...
> Hi guys,
> Is there any method to add/delete dynamically columns in a table, not in a
> matrix?
> thanks,
> Radu|||You could build up the XML for the report programmatically. This would allow
you complete control over what columns get placed in your table. A possible
disadvantage is that you would have to deploy the report programmatically
once it had been built up.|||snyder,
i want to hide a whole column in a table if there is no data to be
displayed in the entire column, if there exists atleast one record in the
column then we need to show the column else hide it.
"Wayne Snyder" wrote:
> You can not really Dynamically add columns to a table..
> But you can pre-create a number of extra columns, show/hide and assign their
> values on the fly...
> That's about the best we can do now.
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Radu" <Radu@.discussions.microsoft.com> wrote in message
> news:FEA44080-476E-46AC-B2AC-7599FB6A6C06@.microsoft.com...
> > Hi guys,
> >
> > Is there any method to add/delete dynamically columns in a table, not in a
> > matrix?
> >
> > thanks,
> > Radu
>
>|||how do you create a single column in the matrix control and then populate it
with multiple pieces of information
I amtrying to add a Percent Change Col to Pivoted colmns in Matrix
"Wayne Snyder" wrote:
> Just another thought... ONe of the things we do that 'sort of' simluates
> dynamically adding columns is that we will create a single column, then
> populate it with varying multiple pieces of information concatenated
> together as a single sql column...
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Radu" <Radu@.discussions.microsoft.com> wrote in message
> news:FEA44080-476E-46AC-B2AC-7599FB6A6C06@.microsoft.com...
> > Hi guys,
> >
> > Is there any method to add/delete dynamically columns in a table, not in a
> > matrix?
> >
> > thanks,
> > Radu
>
>

Wednesday, March 7, 2012

Dynamically change column width in matrix

Hi, All,
I am designing a report which will use matrix to show a pivot table. Matrix
in reporting service is wonderful for showing a pivot table. However, when
it is used to show the detail information based on column group, I cannot
change the column width dynamically. The width for columns has to be
specified by fixed number, which means the whole width of that matix cannot
be fixed. The more dynamic columns it has, the wider it will be. Is there
any way I could specify it in percentage or something else I could do so I
could fix the width of matrix which will has variable columns in it?
Thank for any recommendations.
HenrySupport for dynamic column sizing is on the wish list for inclusion in a
future release.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Henry" <wang_yuhang@.hotmail.com> wrote in message
news:evIba1blEHA.2820@.TK2MSFTNGP15.phx.gbl...
> Hi, All,
> I am designing a report which will use matrix to show a pivot table.
Matrix
> in reporting service is wonderful for showing a pivot table. However, when
> it is used to show the detail information based on column group, I cannot
> change the column width dynamically. The width for columns has to be
> specified by fixed number, which means the whole width of that matix
cannot
> be fixed. The more dynamic columns it has, the wider it will be. Is there
> any way I could specify it in percentage or something else I could do so I
> could fix the width of matrix which will has variable columns in it?
> Thank for any recommendations.
> Henry
>
>|||Thanks, Bruce.
I am looking forward to the next version...
Henry
"Bruce Johnson [MSFT]" <brucejoh@.online.microsoft.com> wrote in message
news:ePr$TXclEHA.2884@.TK2MSFTNGP09.phx.gbl...
> Support for dynamic column sizing is on the wish list for inclusion in a
> future release.
> --
> Bruce Johnson [MSFT]
> Microsoft SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> "Henry" <wang_yuhang@.hotmail.com> wrote in message
> news:evIba1blEHA.2820@.TK2MSFTNGP15.phx.gbl...
>> Hi, All,
>> I am designing a report which will use matrix to show a pivot table.
> Matrix
>> in reporting service is wonderful for showing a pivot table. However,
>> when
>> it is used to show the detail information based on column group, I cannot
>> change the column width dynamically. The width for columns has to be
>> specified by fixed number, which means the whole width of that matix
> cannot
>> be fixed. The more dynamic columns it has, the wider it will be. Is there
>> any way I could specify it in percentage or something else I could do so
>> I
>> could fix the width of matrix which will has variable columns in it?
>> Thank for any recommendations.
>> Henry
>>
>

Friday, February 17, 2012

Dynamic SQL statement

Hi all
I want to create a report with dynamic select statement. Does matrix
supports to pass a select statement as a parameter at runtime? I am
wondering[could not understand few reviews] how the matrix will support to
add dynamic columns and rows at runtime. I will have fixed columns of 5 .
But my select statement might change by "where" condition at runtime.
Expecting an earliest suggestion.
Thanks in advance.The matrix can have dynamic columns means that depending
on what your dataset contains you can show a particular
number of columns.
I didnt exactly get what you mean by your SP needs to be
dynamic.
In your select statement you can change the where clause
(as you say) and depending on the result you get from the
SP execution you can make your report dynamic.
>--Original Message--
>Hi all
>I want to create a report with dynamic select statement.
Does matrix
>supports to pass a select statement as a parameter at
runtime? I am
>wondering[could not understand few reviews] how the
matrix will support to
>add dynamic columns and rows at runtime. I will have
fixed columns of 5 .
>But my select statement might change by "where" condition
at runtime.
>Expecting an earliest suggestion.
>Thanks in advance.
>.
>