Showing posts with label depending. Show all posts
Showing posts with label depending. Show all posts

Tuesday, March 27, 2012

Combining multiple tables - please help!

Hii all.

quite urgent... I have 3 matix tables.. all the same row headings. I need to be able to make these visible/invisible depending on the user parameters. The reason for this, if a user hides table on the left.. the middle table needs to show the row headings. and last table must not.

The problem:
When making the row headings invisible it doesnt exactly chop off the textboxes... so the tables look disjoint.. and a big gap appears between both tables...

Is there a way to join these tables without leavings gaps ?

any help is appreciated.
Neil
Try putting each matrix inside a rectangle, then hide the rectangle containing the table based on the user parameter.

Additionally, put all 3 rectangles within one parent rectangle. Should help with the spacing.|||Hi Andy

thanks for the reply!

While I like that idea and provides a lot more control over the positioning of the tables.. the problem still exits...

It seems that making a textbox "visibility = true" just produces an empty textbox..but still leaves the space allocated to textbox in place... and therefore the gap.. the rectangles dont seem to help.. unless im doing something wrong..

Does this seem right ?
|||I also just tried making the middle rectangle hidden = true and it didnt close the gap as expected.. very confused.. I just draggged the rectangles into the parent rectangle... ?

very strange.. any idea's why this may not be working for me ?
|||Well now I'm confused about what you're doing. One partyou're talking about matrixes, the next you're talking about tables. Which are you using? Matrixes or tables? Do you have 3 separate matrixes or 3 rows in one matrix?

Have you tried setting the visibility property for the whole row (or column) instead of the individual textboxes?|||

Using Matrix

Select appropriate textbox in matrix

Right click

Select Edit Group...

Visibility tab

Select Expression

Add your expression

It will not work if you put it on the textbox properties.

Using Table

Select appropriate column

Go to properties

Go down to visibility tag and select expression

Add your expression

You can use a variety of expressions to hide the columns like parameters or counts.

=IIF(Fields!City.Value=@.City, FALSE, TRUE)

or

=IIF(Trim(Fields!City.Value) = "", TRUE, FALSE)

Hope this helps

|||Sorry, I mean matrix...

My problem is not making the whole matrix invisible... I have 3 of them lined from left to right.
All three have the same row (group headings - sorry I should have made that clear). I dont need all the to show the same headings on the row groups. So, I just want to beable to hide these headings depending on the users selection.

The problem is that making the row headings + total header hidden, leaves a gap between the matrices as if the headers were there but just with no text or borders in them (invisible to the human eye but as if its like a brick stopping the matrix from moving closer to the other ones)

Sorry for the confusion.. thanks for helps !
But any idea.. anyone ?
|||Hi Brady,

Thanks for the suggestion.. while I have been trying that.. the problem there is that bigger Textbox located in the top left of the matrix.. that wont be invisible and therefore will stop my matrix from moving closer to the other matrix..

Is there a way to get rid of that Textbox...?
I have tried deleting it , but does not go away...

Thanks!sqlsql

Thursday, March 8, 2012

columns containing percantage values

Hi,
I am a newbie in reporting services with a pretty easy question.
How can display percentage values of a column depending of the column
sum?
Example:
_______________________________________________
row1 3 30%
row2 5 50%
row3 2 20%
_______________
sum 10 100%
_______________________________________________
How do I create the last column?
ThanxLast week I did this for the first time.
Created a sum total in a report footer for your 2nd col and the10 would show
for your sample. Give it a label like Total_Count. Then for the 3rd col
which is to be the percentage, use the expression =Sum(Fields!Total_Count.
Value)/(ReportItems!TotalCount.Value)
HTH!
James Ski
mickmack wrote:
>Hi,
>I am a newbie in reporting services with a pretty easy question.
>How can display percentage values of a column depending of the column
>sum?
>Example:
>_______________________________________________
>row1 3 30%
>row2 5 50%
>row3 2 20%
>_______________
>sum 10 100%
>_______________________________________________
>How do I create the last column?
>Thanx
--
Message posted via http://www.sqlmonster.com|||Thank you James for your prompt reply,
that works with one column.
But how would I create the following matrix?
_____________________________________
row1 3 30% 8 40%
row2 5 50% 8 40%
row3 2 20% 4 20%
_________________________
sum 10 100% 20 100%
_____________________________________
I dont know how to call the 10 and the 20 seperatly. Which names do
they have?
Thanx|||You could use the sum aggregate , but shouldn't the group % always be 100%..
You could also refer to the column with 10 in it using
ReportItems!textboxname.Value
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"mickmack" wrote:
> Thank you James for your prompt reply,
> that works with one column.
> But how would I create the following matrix?
> _____________________________________
> row1 3 30% 8 40%
> row2 5 50% 8 40%
> row3 2 20% 4 20%
> _________________________
> sum 10 100% 20 100%
> _____________________________________
> I dont know how to call the 10 and the 20 seperatly. Which names do
> they have?
> Thanx
>|||here is how I did:
drag a list into your report, in the list, drag in two subreports, one is
on the left and another one is on the right. then you write stored procudures
(name it sptest for now) with one parameter. In your subreport one, you call
sptest 0, and it will display the left 3 columns, subreport two, you call
sptest 1, and it will display the right 2 columns. sptest 0, and sptest 1 is
the dataset that you create when you design your subreport. The hard part for
this is the store procedure. you need to decide how many rows/columns that
you want to display. For my example, sptest 0, I display:
01/2004 5
02/2004 6
03/2004 7
.
.
.
sptest 1, then display on the second subreport
01/2005 1
02/2005 2
03/2005 3
.
.
.
finally, it ends up like this
01/2004 5 01/2005 1
02/2004 6 02/2005 2
03/2004 7 03/2005 3
. .
. .
. .
I hope this will give you some idea.
Henry
"mickmack" wrote:
> Thank you James for your prompt reply,
> that works with one column.
> But how would I create the following matrix?
> _____________________________________
> row1 3 30% 8 40%
> row2 5 50% 8 40%
> row3 2 20% 4 20%
> _________________________
> sum 10 100% 20 100%
> _____________________________________
> I dont know how to call the 10 and the 20 seperatly. Which names do
> they have?
> Thanx
>|||today I found a page at microsoft, where the problem is solved:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/semiadd2.asp

Saturday, February 25, 2012

Column name as variable

Does anyone know if I can use a variable for a column name in a query?
I'm wanting to reuse some code that updates a table, but, depending on
conditions, I want it to update a different column.
Something like:
declare @.col_name as ?
Select @.col_name = "last_week"
update tblTest set @.col_name = blah blah blah
Perspiring minds want to know.
DS
Hello,
You may need to use dynamic sql for this. Take a look into EXEC and
SP_EXECUTESQL in books online
Thanks
Hari
"d.s." <nodamnspamok@.yahoo.com> wrote in message
news:1178038066.444666.41510@.y5g2000hsa.googlegrou ps.com...
> Does anyone know if I can use a variable for a column name in a query?
> I'm wanting to reuse some code that updates a table, but, depending on
> conditions, I want it to update a different column.
> Something like:
> declare @.col_name as ?
> Select @.col_name = "last_week"
> update tblTest set @.col_name = blah blah blah
> Perspiring minds want to know.
> DS
>
|||On May 1, 9:54 am, "Hari Prasad" <hari_prasa...@.hotmail.com> wrote:
> Hello,
> You may need to use dynamic sql for this. Take a look into EXEC and
> SP_EXECUTESQL in books online
> Thanks
> Hari
> "d.s." <nodamnspa...@.yahoo.com> wrote in message
> news:1178038066.444666.41510@.y5g2000hsa.googlegrou ps.com...
>
>
>
>
>
> - Show quoted text -
Gracias. That looks promising.

Column name as variable

Does anyone know if I can use a variable for a column name in a query?
I'm wanting to reuse some code that updates a table, but, depending on
conditions, I want it to update a different column.
Something like:
declare @.col_name as '
Select @.col_name = "last_week"
update tblTest set @.col_name = blah blah blah
Perspiring minds want to know.
DSHello,
You may need to use dynamic sql for this. Take a look into EXEC and
SP_EXECUTESQL in books online
Thanks
Hari
"d.s." <nodamnspamok@.yahoo.com> wrote in message
news:1178038066.444666.41510@.y5g2000hsa.googlegroups.com...
> Does anyone know if I can use a variable for a column name in a query?
> I'm wanting to reuse some code that updates a table, but, depending on
> conditions, I want it to update a different column.
> Something like:
> declare @.col_name as '
> Select @.col_name = "last_week"
> update tblTest set @.col_name = blah blah blah
> Perspiring minds want to know.
> DS
>|||On May 1, 9:54 am, "Hari Prasad" <hari_prasa...@.hotmail.com> wrote:
> Hello,
> You may need to use dynamic sql for this. Take a look into EXEC and
> SP_EXECUTESQL in books online
> Thanks
> Hari
> "d.s." <nodamnspa...@.yahoo.com> wrote in message
> news:1178038066.444666.41510@.y5g2000hsa.googlegroups.com...
>
>
>
>
>
>
>
>
>
> - Show quoted text -
Gracias. That looks promising.

Column name as variable

Does anyone know if I can use a variable for a column name in a query?
I'm wanting to reuse some code that updates a table, but, depending on
conditions, I want it to update a different column.
Something like:
declare @.col_name as '
Select @.col_name = "last_week"
update tblTest set @.col_name = blah blah blah
Perspiring minds want to know.
DSHello,
You may need to use dynamic sql for this. Take a look into EXEC and
SP_EXECUTESQL in books online
Thanks
Hari
"d.s." <nodamnspamok@.yahoo.com> wrote in message
news:1178038066.444666.41510@.y5g2000hsa.googlegroups.com...
> Does anyone know if I can use a variable for a column name in a query?
> I'm wanting to reuse some code that updates a table, but, depending on
> conditions, I want it to update a different column.
> Something like:
> declare @.col_name as '
> Select @.col_name = "last_week"
> update tblTest set @.col_name = blah blah blah
> Perspiring minds want to know.
> DS
>|||On May 1, 9:54 am, "Hari Prasad" <hari_prasa...@.hotmail.com> wrote:
> Hello,
> You may need to use dynamic sql for this. Take a look into EXEC and
> SP_EXECUTESQL in books online
> Thanks
> Hari
> "d.s." <nodamnspa...@.yahoo.com> wrote in message
> news:1178038066.444666.41510@.y5g2000hsa.googlegroups.com...
>
> > Does anyone know if I can use a variable for a column name in a query?
> > I'm wanting to reuse some code that updates a table, but, depending on
> > conditions, I want it to update a different column.
> > Something like:
> > declare @.col_name as '
> > Select @.col_name = "last_week"
> > update tblTest set @.col_name = blah blah blah
> > Perspiring minds want to know.
> > DS- Hide quoted text -
> - Show quoted text -
Gracias. That looks promising.

Tuesday, February 14, 2012

Colors hadling with ReportViewer

Hello,
My doubt is how to change in a LocalReport environment the text color of a
textbox of a report depending on certain condition at runtime.
I will thank any help.
Sincerely,
Arturo Carrión
at Tiempo HardHello Arturo,
My understanding of this issue is: You have a reportviewer control using
the Local Report. And you want to control the color of a textbox in the
runtime. If I misunderstood your concern, please feel free to let me know.
Based on my research, you could only control the color in the report. You
could use the Expression to control the color.
Expressions Commonly Used in Reporting Services
http://msdn2.microsoft.com/en-us/ms157328.aspx
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Thanks Wei,
Until this moment, I have not been able to enter the link that you gave me
because it gives an error of "Server is too busy".
I will try it later, then I tell you.
Sincerely,
Arturo Carrión
at Tiempo Hard
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> escribió en el mensaje
news:bmTJvs%23THHA.1860@.TK2MSFTNGHUB02.phx.gbl...
> Hello Arturo,
> My understanding of this issue is: You have a reportviewer control using
> the Local Report. And you want to control the color of a textbox in the
> runtime. If I misunderstood your concern, please feel free to let me know.
> Based on my research, you could only control the color in the report. You
> could use the Expression to control the color.
> Expressions Commonly Used in Reporting Services
> http://msdn2.microsoft.com/en-us/ms157328.aspx
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Jackpot!
I realized that most properties of a textbox accept an expression instead a
value.
Thanks, Wei
<tiempotecnologia@.newsgroup.nospam> escribió en el mensaje
news:eaynrmEUHHA.1636@.TK2MSFTNGP02.phx.gbl...
> Thanks Wei,
> Until this moment, I have not been able to enter the link that you gave me
> because it gives an error of "Server is too busy".
> I will try it later, then I tell you.
> Sincerely,
> Arturo Carrión
> at Tiempo Hard
> "Wei Lu [MSFT]" <weilu@.online.microsoft.com> escribió en el mensaje
> news:bmTJvs%23THHA.1860@.TK2MSFTNGHUB02.phx.gbl...
>> Hello Arturo,
>> My understanding of this issue is: You have a reportviewer control using
>> the Local Report. And you want to control the color of a textbox in the
>> runtime. If I misunderstood your concern, please feel free to let me
>> know.
>> Based on my research, you could only control the color in the report. You
>> could use the Expression to control the color.
>> Expressions Commonly Used in Reporting Services
>> http://msdn2.microsoft.com/en-us/ms157328.aspx
>> Sincerely,
>> Wei Lu
>> Microsoft Online Community Support
>> ==================================================>> When responding to posts, please "Reply to Group" via your newsreader so
>> that others may learn and benefit from your issue.
>> ==================================================>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>|||Hello Arturo,
Glad to hear the information is helpful.
If you have any question, please feel free to let me know.
Have a nice day!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.