0
votes

I'm attempting to create drill-through functionality to another report using Text Box Properties > Action > Go to URL , all parameters that are in the drill-through report are included in the url expression to ensure no defaults within the drill through report are used, and are specified in the order that they exist in the drill-through rdl.

@ReportIntermediary is a multi-value parameter, all others are single-value.

=Globals!ReportServerUrl 
& "/reportserver?" 
& replace(Globals!ReportFolder, " ", "+")
& "/Snapshot+Report"
& "&rs:Command=Render&rs:ParameterLanguage=en-AU&rc:Parameters=false"
& "&ReportRegion=National" 
& "&ReportDate=" & Code.URLEncode(Format(Parameters!ReportDate.Value, "yyyy-MM-dd")) 
& "&ReportIntermediaryGroup=" & CStr(Fields!GroupIntermediaryNo.Value)
& "&ReportNumberOfMonthsToShow=3"
& "&ReportIntermediaryState=National"
& Fields!ParameterIntermediaryList.Value

Where Fields!ParameterIntermediaryList.Value is formatted as:

&ReportIntermediary=123456789&ReportIntermediary=123456789

And a sample of the string that is formed by the expression being:

http://localhost/ReportServer/Pages/ReportViewer.aspx?/Folder/Sub+Folder/Snapshot+Report&rs:Command=Render&rs:ParameterLanguage=en-AU&ReportRegion=National&ReportDate=2013-06-01&ReportIntermediaryGroup=123456789&ReportNumberOfMonthsToShow=3&ReportIntermediaryState=National&ReportIntermediary=123456789&ReportIntermediary=123456789&ReportIntermediary=123456789

I have put the above expression in a text box within the row group of the matrix and the string appears to be well formed. When I take that string and manually enter it into IE address bar the report will render.

If the manual method will render, why won't the click-through behaviour be working in the report?

I have also tried setting the Go to URL expression to =ReportItems!txtLink.Value, where this text box holds the string value created by the expression above. This doesn't work either.

Here is the XML from within the rdl file:

<CellContents>
    <Textbox Name="txtGroupIntermediaryName">
        <KeepTogether>true</KeepTogether>
        <Paragraphs>
            <Paragraph>
                <TextRuns>
                    <TextRun>
                        <Value>=Fields!GroupIntermediaryName.Value</Value>
                        <Style>
                            <FontSize>8pt</FontSize>
                            <TextDecoration>Underline</TextDecoration>
                            <Color>Blue</Color>
                        </Style>
                    </TextRun>
                </TextRuns>
                <ListLevel>1</ListLevel>
                <Style />
            </Paragraph>
        </Paragraphs>
        <ActionInfo>
            <Actions>
                <Action>
                    <Hyperlink>=Globals!ReportServerUrl 
                    &amp; "/reportserver?" 
                    &amp; replace(Globals!ReportFolder, " ", "+")
                    &amp; "/Snapshot+Report"
                    &amp; "&amp;rs:Command=Render&amp;rs:ParameterLanguage=en-AU&amp;rc:Parameters=false"
                    &amp; "&amp;ReportSegment=Dealer" 
                    &amp; "&amp;ReportRegion=National" 
                    &amp; "&amp;ReportDate=" &amp; Code.URLEncode(Format(Parameters!ReportDate.Value, "yyyy-MM-dd")) 
                    &amp; "&amp;ReportIntermediaryGroup=" &amp; CStr(Fields!GroupIntermediaryNo.Value)
                    &amp; "&amp;ReportNumberOfMonthsToShow=3"
                    &amp; "&amp;ReportIntermediaryState=National"
                    &amp; Fields!ParameterIntermediaryList.Value</Hyperlink>
                </Action>
            </Actions>
        </ActionInfo>
        <Style>
            <Border>
                <Style>None</Style>
            </Border>
            <BackgroundColor>=iif(ReportItems!txtRowGroupBackgroundFormat.Value = 1, Code.ColourPalette("row-highlight"), Nothing)</BackgroundColor>
            <PaddingLeft>2pt</PaddingLeft>
            <PaddingRight>2pt</PaddingRight>
            <PaddingTop>2pt</PaddingTop>
            <PaddingBottom>2pt</PaddingBottom>
        </Style>
    </Textbox>
    <rd:Selected>true</rd:Selected>
</CellContents>
2

2 Answers

0
votes

The CStr function causes an error when trying to convert a multi-value parameter. Use the Join function instead. You can convert like this and use whatever separator you want:

Join(Fields!GroupIntermediaryNo.Value, ",")
0
votes

The issue was caused by the text (within the textbox that has the Goto Url action on it) being indented for formatting purposes.

Removing this indentation allowed the action to work.

This can be done by any of the following methods:

  • Clicking the Decrease Indent button on the Report Formatting Toolbar
  • Selecting the textbox and then going to the Properties pane and setting ListLevel equal to 0
  • Going into the XML and finding the tag <ListLevel>1</ListLevel> and setting the 1 to 0 (this will be a larger number if the indentation is larger, e.g., 2, 3 ..., n)