Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Referencing Text Boxes in other Text Boxes

Author  Topic 

sturgis
Starting Member

2 Posts

Posted - 2005-10-03 : 12:22:39
Is it possible to reference the value of a text box (txtField1) in another text box's expression?

Example:
txtField1 Expression (txtField1 is in Group1 footer)
=Sum(WidgetsCount)

txtField2 Expression (txtField2 is in Group2 footer)
=Sum(WidgetsCount)

txtResultLbl Expression (txtResultLbl is in Group1 header)
=IIf(txtField1 > txtField2, "Greater", "Less")

I am not sure if the cell needs to be referenced through the properties of the table in which all the cells reside. (Table1)

Your help is apprectiated,
sturgis

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2005-10-03 : 14:14:08
In general, you can reference the values in other textboxes by using the ReportItems!yourTextBoxName.Value syntax. However, I have had trouble referencing these from Headers & Footers, and your specific need may not work out the way you want.

---------------------------
EmeraldCityDomains.com
Go to Top of Page

sturgis
Starting Member

2 Posts

Posted - 2005-10-03 : 16:51:48
ReportItems was the answer. I had a feeling there was a container that held each of the report objects.
Additional question: Does ReportItems also have a reference to the dataset? If so, how is it accessed?
Thanks for solving my initial problem,
sturgis
Go to Top of Page

jhermiz

3564 Posts

Posted - 2005-10-04 : 10:13:22
Fields!YourObject.Value to access fields of a dataset.

BTW, you can have multiple data sets in one report. There is this misconception that reports can only take one data set which is not true. The only thing is you must encapsulate the dataset into its own object (table, matrix table, or list container).

Jon


Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page
   

- Advertisement -