rdlc水晶报表在wpf里的使用
2021-03-29 05:28
标签:stat == ssi 初始化 rtb dex value lan out 1引用程序集 2 xaml 命名空间 3 xaml 里用windowsFormsHost 来装报表控件 3.初始化控件参数 4 .加载视图,设置视图RDLC的方法 调用 rdlc水晶报表在wpf里的使用 标签:stat == ssi 初始化 rtb dex value lan out 原文地址:https://www.cnblogs.com/nocanstillbb/p/9308553.htmlMicrosoft.ReportViewer.WinForms
xmlns:rv="clr-namespace:Microsoft.Reporting.WinForms;assembly=Microsoft.ReportViewer.WinForms"
WindowsFormsHost Margin="135,75,0,0" Panel.ZIndex="-1" Height="auto">
rv:ReportViewer x:Name="reportViewer" />
WindowsFormsHost>
this.reportViewer.Messages = new Health.Client.Base.ReportViewerMessagesZhcn();
public class ReportViewerMessagesZhcn : IReportViewerMessages
{
public string BackButtonToolTip { get { return "后退"; } }
public string BackMenuItemText { get { return "后退"; } }
public string ChangeCredentialsText { get { return "更改"; } }
public string CurrentPageTextBoxToolTip { get { return "当前页"; } }
public string DocumentMapButtonToolTip { get { return "文档视图"; } }
public string DocumentMapMenuItemText { get { return "文档视图"; } }
public string ExportButtonToolTip { get { return "导出"; } }
public string ExportMenuItemText { get { return "选择格式"; } }
public string FalseValueText { get { return "不正确的值"; } }
public string FindButtonText { get { return "查找"; } }
public string FindButtonToolTip { get { return "查找"; } }
public string FindNextButtonText { get { return "下一个"; } }
public string FindNextButtonToolTip { get { return "下一个"; } }
public string FirstPageButtonToolTip { get { return "首页"; } }
public string LastPageButtonToolTip { get { return "最后一页"; } }
public string NextPageButtonToolTip { get { return "下一页"; } }
public string NoMoreMatches { get { return "无匹配项"; } }
public string NullCheckBoxText { get { return "空值"; } }
public string NullCheckBoxToolTip { get { return "空值"; } }
public string NullValueText { get { return "空值"; } }
public string PageOf { get { return "页"; } }
public string PageSetupButtonToolTip { get { return "页面设置"; } }
public string PageSetupMenuItemText { get { return "页面设置"; } }
public string ParameterAreaButtonToolTip { get { return "参数设置区"; } }
public string PasswordPrompt { get { return "请输入密码:"; } }
public string PreviousPageButtonToolTip { get { return "前一页"; } }
public string PrintButtonToolTip { get { return "打印"; } }
public string PrintLayoutButtonToolTip { get { return "打印"; } }
public string PrintLayoutMenuItemText { get { return "打印"; } }
public string PrintMenuItemText { get { return "打印"; } }
public string ProgressText { get { return "正在生成报表......"; } }
public string RefreshButtonToolTip { get { return "刷新"; } }
public string RefreshMenuItemText { get { return "刷新"; } }
public string SearchTextBoxToolTip { get { return "查找"; } }
public string SelectAll { get { return "全选"; } }
public string SelectAValue { get { return "SelectAValue"; } }
public string StopButtonToolTip { get { return "停止"; } }
public string StopMenuItemText { get { return "停止"; } }
public string TextNotFound { get { return "未找到"; } }
public string TotalPagesToolTip { get { return "总页数"; } }
public string TrueValueText { get { return "正确值"; } }
public string UserNamePrompt { get { return "用户名"; } }
public string ViewReportButtonText { get { return "显示报表"; } }
public string ViewReportButtonToolTip { get { return "显示报表"; } }
public string ZoomControlToolTip { get { return "缩放"; } }
public string ZoomMenuItemText { get { return "缩放"; } }
public string ZoomToPageWidth { get { return "页宽"; } }
public string ZoomToWholePage { get { return "整页"; } }
}
private void ShowReportViewer(int index, Microsoft.Reporting.WinForms.ReportDataSource dataSourse, List
public static string GetReportFilePath(string reportFileName)
{
string filePath= @"Reports\" + reportFileName + ".rdlc";
filePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, filePath);
if(!System.IO.File.Exists(filePath))
{
return "";
}
return filePath;
}
下一篇:C#MD5加密