all groups > sql server reporting services > august 2004 >
You're in the

sql server reporting services

group:

Refer to value of textbox?


Refer to value of textbox? Jake Marx
8/27/2004 2:22:31 PM
sql server reporting services:
Hi all,

How would I go about referring to the value of a TextBox within a report? I
have a TextBox that I named "txtCount", in which I use an IIf expression to
selectively count records when in a group. In the footer of the container
group, I'd like to refer to that TextBox's value. I have no idea how to do
it. I tried Fields!txtCount.Value and that didn't work. I can't even refer
to a TextBox's value in the same detail line, so I must be missing
something. Or is it not possible to refer to another TextBox's value?

Thanks in advance for any help!

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
Re: Refer to value of textbox? Lev Semenets [MSFT]
8/27/2004 3:09:15 PM
You can get textbox value by refer to "ReportItems!<textboxname>.Value
I'm not sure it will work in your case: Report item expressions can only
refer to other report items within the same grouping scope or a containing
grouping scope.


--
This posting is provided "AS IS" with no warranties, and confers no rights.

[quoted text, click to view]

Re: Refer to value of textbox? Jake Marx
8/27/2004 3:15:05 PM
[quoted text, click to view]

OK - I found it online: ReportItems!txtCount.Value.

I can refer to a TextBox in the same group using that syntax.

However, what I'm looking to do is as follows:

Group 1: Client
Group 2 (inside Group 1): Status
Details: Claims

There are 4 statuses possible. What I'm trying to do is get the counts of
each Status *in the footer of Group 1*. I can't think of a good way to do
this. I can get the total Claims count within Group 1, and I can get counts
of each Status within Group 2. But I can't figure out how to get a count of
each Status type from Group 1. I need to do a calculation on the Client
level based on those counts. I tried the following, which didn't work:

1) created 4 textboxes in the Group 2 footer to hold the counts for each
status
2) tried summing the values of the textboxes created in step 1 from the
Group 1 footer

Any other ideas? Am I approaching this the wrong way?

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
Re: Refer to value of textbox? Jake Marx
8/27/2004 3:35:17 PM
[quoted text, click to view]

Thanks, Lev. I composed my other post before I saw your reply. Do you have
any ideas on my other post?

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
Re: Refer to value of textbox? Lev Semenets [MSFT]
8/27/2004 4:10:52 PM
I think, in step 2 you may put expressions into those 4 textboxes
for 1st status:
=Sum(iif(Fields!Status.Value == "Status1", 1, 0))
for 2nd
=Sum(iif(Fields!Status.Value == "Status2", 1, 0))
etc.

--
This posting is provided "AS IS" with no warranties, and confers no rights.


[quoted text, click to view]

Re: Refer to value of textbox? Jake Marx
8/30/2004 8:47:10 AM
[quoted text, click to view]

Great - thanks, Lev!

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

AddThis Social Bookmark Button