2013-07-17 103 views
0

我試圖使用創建鑽取功能到另一個報表文本框屬性>操作>轉至URL,鑽取報表中包含的所有參數都包含在url表達式中,以確保在鑽取報表中不使用默認值,並且按照其在鑽取rdl中存在的順序進行指定。SSRS 2008 URL多點值參數的點擊不起作用,但在手動輸入字符串時起作用

@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 
        &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> 

回答

0

這個問題是由文本(也有它的Goto Url動作文本框內)造成被縮進,它們的目的。

刪除此縮進可使操作起作用。

這可以通過以下方法來完成:

  • 點擊Decrease Indent按鈕上Report Formatting Toolbar
  • 選擇文本框,然後轉到Properties面板和設置ListLevel等於0
  • 進入XML並找到標籤<ListLevel>1</ListLevel>並將1設置爲0(如果縮進比例較大,例如2,3,...,n將爲更大數字)
0

CSTR的功能使試圖將多值參數轉換時的錯誤。改用Join函數。你可以轉換這樣和使用任何你想要的分隔符:

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

'CStr()'函數未與多值參數一起使用 –