我正在尝试使用Text Box Properties > Action > Go to URL创建另一个报表的钻取功能,钻取报表中的所有参数都包含在 url 表达式中,以确保钻取报表中没有默认值使用,并按照它们在钻取 rdl 中存在的顺序指定。
@ReportIntermediary是一个多值参数,其他都是单值。
=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
其中Fields!ParameterIntermediaryList.Value
格式为:
&ReportIntermediary=123456789&ReportIntermediary=123456789
以及由以下表达式形成的字符串样本:
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
我已将上述表达式放在矩阵行组内的文本框中,并且字符串似乎格式正确。当我将该字符串手动输入到 IE 地址栏中时,报告将呈现。
如果手动方法将呈现,为什么点击行为在报表中不起作用?
我还尝试将Go to URL
表达式设置为=ReportItems!txtLink.Value
,其中此文本框包含由上面的表达式创建的字符串值。这也不起作用。
这是 rdl 文件中的 XML:
<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
& "/reportserver?"
& replace(Globals!ReportFolder, " ", "+")
& "/Snapshot+Report"
& "&rs:Command=Render&rs:ParameterLanguage=en-AU&rc:Parameters=false"
& "&ReportSegment=Dealer"
& "&ReportRegion=National"
& "&ReportDate=" & Code.URLEncode(Format(Parameters!ReportDate.Value, "yyyy-MM-dd"))
& "&ReportIntermediaryGroup=" & CStr(Fields!GroupIntermediaryNo.Value)
& "&ReportNumberOfMonthsToShow=3"
& "&ReportIntermediaryState=National"
& 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>