报告的定义无效

时间:2017-01-25 16:08:13

标签: xml rdlc reportviewer

尝试创建RDLC报告但遇到异常:

textrun的值表达式'Textbox40.Paragraphs [0] .TextRuns [0]'包含一个错误:[BC30516]过载分辨率失败,因为没有可访问的< IIf'接受这个数量的论点。这是代码:

                              <Value>
                                =Fields!TermsDescription.Value &amp; " " &amp; Fields!PrimaryCurrency.Value &amp; vbcrlf &amp;
                                iif((Parameters!DocType.Value = "INVOICE" and Fields!ShowInterestStatement.Value), "1.5% Per Month (19.56% per Annum)" &amp; vbcrlf &amp; "Will be Charged on Overdue Accounts" &amp; vbcrlf &amp;
                                IIF((Parameters!DocType.Value = "ORDER ACKNOWLEDGEMENT"), "All goods sold are subject to Apex Remington's terms and conditions of sale which are available for your review at http://www.apexdistribution.com/terms", "test") &amp;

                              </Value>

1 个答案:

答案 0 :(得分:1)

您必须指定第一个IIf功能的Add-Type -AssemblyName System.Windows.Forms Add-Type @" using System; using System.Collections; using System.Collections.Generic; using System.Runtime.InteropServices; using System.Text; public struct RECT { public int left; public int top; public int right; public int bottom; } public class pInvoke { [DllImport("user32.dll", SetLastError = true)] public static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint); [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, ExactSpelling = true, SetLastError = true)] public static extern bool GetWindowRect(IntPtr hWnd, ref RECT rect); } "@ function Move-Window([System.IntPtr]$WindowHandle, [switch]$Top, [switch]$Bottom, [switch]$Left, [switch]$Right) { # get the window bounds $rect = New-Object RECT [pInvoke]::GetWindowRect($WindowHandle, [ref]$rect) # get which screen the app has been spawned into $activeScreen = [System.Windows.Forms.Screen]::FromHandle($WindowHandle).Bounds if ($Top) { # if top used, snap to top of screen $posY = $activeScreen.Top } elseif ($Bottom) { # if bottom used, snap to bottom of screen $posY = $activeScreen.Bottom - ($rect.bottom - $rect.top) } else { # if neither, snap to current position of the window $posY = $rect.top } if ($Left) { # if left used, snap to left of screen $posX = $activeScreen.Left } elseif ($Right) { # if right used, snap to right of screen $posX = $activeScreen.Right - ($rect.right - $rect.left) } else { # if neither, snap to current position of the window $posX = $rect.left } [pInvoke]::MoveWindow($app.MainWindowHandle, $posX, $posY, $rect.right - $rect.left, $rect.bottom - $rect.top, $true) } # spawn the window and return the window object $app = Start-Process dotnet -ArgumentList "run" -PassThru Move-Window -WindowHandle $app.MainWindowHandle -Bottom -Left

FalsePart
相关问题