Hello,
I have been trying to figure out what seems to be a simple task:
I have a dataset (of 10 rows) and a text box. You are to display the value found in the 3rd row, first column of my dataset into that textbox. You may not alter the dataset.
I want to know how this can be done. Is there a way to loop through the dataset programmatically in a function?
I also tried this: The below code sets the value for MYTEXTBOX. If the value in “MyField” of my dataset = “0.0”, I want MYTEXTBOX to hold the value of “MyRelatedField” (so another field within the same row of my dataset). Otherwise, DO NOTHING!!!!!, but because all functions MUST return a value, I attempted to return the value of MYTEXTBOX—hence setting it equal to what it already is, but this give me #ERROR!
=iif(Fields!MyField.Value = "0.0",Fields!MyRelatedField.Value, ReportItems!MYTEXTBOX.Value)
I have read the wrox reporting service book from front to back, and what seems like pie is giving me a grief—any help, link or advice would be so much appreciated!...much thanks, John
It could be done through some custom code. Store the data set element access code in a little class and refer it from the report
http://msdn2.microsoft.com/en-us/library/ms155798.aspx
|||
Johnny606 wrote:
I have a dataset (of 10 rows) and a text box. You are to display the value found in the 3rd row, first column of my dataset into that textbox. You may not alter the dataset.
I want to know how this can be done. Is there a way to loop through the dataset programmatically in a function?
What about saving the first dataset into a multivalue report parameter (make it internal or hidden if you do not want users to see it)
Make a 2nd dataset that selects top 3 from the multivalue parameter.
The textfield value should then be something like =Last(Fields!<nameOfField>.Value, "<name of 1st dataset>")
That way you have not changed the first dataset and you get the correct value in your text box
I cannot test it at the moment so it might not work (I'm in the middle of installing the SP2 CTP and have a little time for surfing while it's doing its thing) :-)
No comments:
Post a Comment