Showing posts with label expression. Show all posts
Showing posts with label expression. Show all posts

Monday, March 12, 2012

Repeating footer data from a field

I have a data field called RunStatus that I place into a hidden textbox on my
report. I created a textbox in the footer and set the expression to
=ReportItems("RunStatusTextBox").Value. The footer does not repeat this
value on all pages. I am assuming it is because the hidden textbox is on the
first page only. How do I get my run status to show in the footer for all
pages?On Apr 29, 7:16 pm, Bruce Parker <bpar...@.nospam.nospam> wrote:
> I have a data field called RunStatus that I place into a hidden textbox on my
> report. I created a textbox in the footer and set the expression to
> =ReportItems("RunStatusTextBox").Value. The footer does not repeat this
> value on all pages. I am assuming it is because the hidden textbox is on the
> first page only. How do I get my run status to show in the footer for all
> pages?
You could try creating a hidden parameter and add it in the report
footer in a textbox control. Something like this should work:
=Parameters!RunStatus.Value
Regards,
Enrique Martinez
Sr. Software Consultant|||Hi Bruce,
As for the TextBox in report footer, though you can assign it the value
from another reportItem in report body, however, sincce that reportItem in
body area won't repeat as the ones in report footer, you'll find that the
value got from the reportItem is identical to where it displays in the
report body. For your scenario, I think you can consider Enrique's
suggestion about define a report parameter and dirctly reference that
parameter in footer. Is there any particular code logic for caculating the
value for this repeated textbox in footer?
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.|||in vs2005
right click table select property.
click repeat header or repeat footer in the property.
"Bruce Parker" <bparker@.nospam.nospam> дÈëÏûÏ¢ÐÂÎÅ:C5FA9C95-A781-41B4-8F47-51F531F96AD5@.microsoft.com...
>I have a data field called RunStatus that I place into a hidden textbox on
>my
> report. I created a textbox in the footer and set the expression to
> =ReportItems("RunStatusTextBox").Value. The footer does not repeat this
> value on all pages. I am assuming it is because the hidden textbox is on
> the
> first page only. How do I get my run status to show in the footer for all
> pages?|||That did the trick. Thanks guys.
"Steven Cheng[MSFT]" wrote:
> Hi Bruce,
> As for the TextBox in report footer, though you can assign it the value
> from another reportItem in report body, however, sincce that reportItem in
> body area won't repeat as the ones in report footer, you'll find that the
> value got from the reportItem is identical to where it displays in the
> report body. For your scenario, I think you can consider Enrique's
> suggestion about define a report parameter and dirctly reference that
> parameter in footer. Is there any particular code logic for caculating the
> value for this repeated textbox in footer?
> Sincerely,
> Steven Cheng
> Microsoft MSDN Online Support Lead
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>

Wednesday, March 7, 2012

Reorganize Index Task - SelectedDatabases expression format

Hi

I am trying to configure the SelectedDatabases property of the Reorganize Index Task using an expression.

The Expressions property of the task provides the ability to configure the SelectedDatabases property of the task using an expression. The properties pane shows that the type of the SelectedDatabases property should be a "(Collection)" (which is edited using the 'Object Collection Editor').

How do I create an expression to configure the SelectedDatabases property? Can I build the collection in text? Or do I need to provide a variable of type System.Object that contains a collection type (and if so exactly what type should it contain)?

TIA . . . Ed

No, you cannot execute an expression successfully for the SelectedDatabases property of the Reorganize Index Task, and to generalize, any "(Collection)" property, and even more generally, any non value-type task property (excepting strings).

The workaround for these types of properties (like the StringCollection

being referred to in this question) is to use the self-modifying

package technique as outlined here:

http://www.sqljunkies.com/WebLog/knight_reign/archive/2005/12/31/17731.aspx

Or course, one could roll a custom task with an expression-able property of type string, which depending on your familiarity with custom tasks, may be a reasonable choice.