标签: microsoft-reporting

使用数据集进行Microsoft报告

当我们使用SSRS创建报告时,我们可以使用数据集窗口中的查询框来创建自定义查询.但是在我们想要创建报告的本地报告(.RDLC)中,我们应该为报告设置一个设计的数据集.

在此输入图像描述

问题是,当我们有100个报告时,我们也应该有100个数据集.目前我们使用带有这些字段的数据集(F1,F2,F3,...,F100),在将数据表绑定到报告之前,我们更改了数据表列的名称.但它的可读性很低.

我想问一下,有没有更好的方法来解决这个问题?

谢谢

c# reporting microsoft-reporting reporting-services c#-4.0

18
推荐指数
1
解决办法
583
查看次数

微软报表查看器中的列重复方向

我正在使用Windows窗体生成使用c#和Microsoft报表查看器的身份证.一切都工作正常,除了我在Microsoft报表查看器中找不到列重复方向.

目前的情景

我的报告纸张尺寸是A4.每页最多可显示10张个人卡.页面中有2列.每列显示5张卡片.它是生成卡,如图所示.列重复方向是垂直的.首先列出第1列(1-5),然后列出第2列(6-10).

在此输入图像描述

我的要求

我希望报告列重复方向水平,如下图所示.首先显示1然后是2和3和4,依此类推.

在此输入图像描述

为什么我要水平显示而不是垂直显示?

它会保存纸张.例如,如果用户仅根据当前场景生成4个身份证,则它将在第1列中生成4张卡,并且因为我无法重复使用左侧空间而浪费整个页面空间.

通过将列方向重复到水平,将显示4个卡,如第1列,卡1和3以及第2列,将显示卡2和4.然后我可以剪纸并在以后重复使用.

我搜索了很多,但找不到任何解决方案.任何建议,评论或链接都会有所帮助.我不能使用任何其他报告.提前致谢.

c# reportviewer microsoft-reporting reporting-services

14
推荐指数
1
解决办法
1238
查看次数

WinForm应用程序中的Microsoft报表教程

我在我的WinForm应用程序项目中使用Microsoft报表.我是表达式和​​组甚至过滤器和其他许多问题的一些问题.我正在寻找Microsoft Report的竞赛教程.但是直到现在我才找到任何教程.可以你帮我找一个教程?

我找到了这个.告诉我如果你知道的更好.谢谢

c# microsoft-reporting winforms

13
推荐指数
1
解决办法
4万
查看次数

ASP.NET Core v3.x 的 RDLC 本地报告查看器

我有很多关于 Microsoft Report 的报告。我已将所有其他项目迁移到ASP.NET Corev. 3.1。我想保留我的报告,rdcl因为很容易在 Visual Studio 中更新。

在我的解决方案中,我添加了

<ItemGroup>
    <PackageReference Include="Microsoft.ReportingServices.ReportViewerControl.WebForms" Version="150.1404.0" />
    <PackageReference Include="Microsoft.SqlServer.Types" Version="14.0.1016.290" />
</ItemGroup>
Run Code Online (Sandbox Code Playgroud)

我注意到包中有一些警告。可以理解。该库适用于 .NET Framework,而不适用于 .NET Core。

在此处输入图片说明

但是,该项目正在正确编译。当我尝试呈现报告时,出现以下错误:

TypeLoadException:无法从程序集“System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”加载类型“System.Web.UI.WebControls.CompositeControl”。

环顾四周,我发现了一些库,但它们都没有工作:

任何的想法?或者,有没有办法在 Azure Functions 中生成 PDF?

c# rdlc microsoft-reporting asp.net-core azure-functions

6
推荐指数
0
解决办法
6768
查看次数

为什么Visual Studio报告数据屏幕不显示所有可用的数据集?

在下面的示例中,我有一些在命名空间中定义的公共类.这些将被实例化,绑定到ReportDataSets并传递给我的ReportViewer控件以从我的报表定义文件生成报表.但是,当我尝试在我的.RDLC文件的报表设计器的"报表数据"窗口中访问这些类时,它只显示了我定义的一些类.发生了什么,剩下的都在哪里?

namespace Namespace1
{
    public class Class1
    {
        public string String1 { get; set; }
    }

    public class Class2
    {
        public string String1 { get; set; }
    }
}
Run Code Online (Sandbox Code Playgroud)

注意:如果尝试将Class1定义添加到需要Class2数据的报表页面,然后在生成报表之前将Class2绑定到ReportDataSet,则会引发异常.

c# rdlc microsoft-reporting visual-studio visual-studio-2012

5
推荐指数
1
解决办法
1301
查看次数

如何在Microsoft Reporting Services RDL报告中有条件地突出显示字段?

我有一个RDL报告,这是一个名单 - 它是一个网格:

  • 每行代表一天
  • 每列代表一个任务
  • 每个单元格包含当天执行该任务的人员的姓名.

我正在通过MS报告服务器提供报告.

我希望能够突出显示包含查看报告的人姓名的单元格.所以我真的有两个问题:

  • 是否可以从将其请求发送到报表服务器的环境变量中获取人员的姓名?更一般地说,如何查看发送的环境变量列表?

如果我无法自动获取其名称,我可以提供一个报告参数,允许他们手动输入其名称.

第二个问题是:

  • 假设我在字符串中有一个名称,我如何有条件地格式化报告中包含该字符串的单元格?

conditional highlight microsoft-reporting

3
推荐指数
1
解决办法
9377
查看次数

LocalReport.SetParameters Exception尝试设置此报告中未定义的报告参数"ParameterName"

我有两个按钮(button1,button2)两个按钮打开两个相同的报告,除了report2.rdlc有一个字符串参数

如果我先按下button1,则消息框显示参数count = 0(正如预期的那样),我在reportviewer1中显示report1.rdlc,然后我按下按钮2 ,消息框再次显示参数count = 0(我希望它显示为1)和我得到LocalProcessingException {"尝试设置报告参数'Report2ParameterString',此报告中未定义."}

如果我先按下button2,则消息框显示参数count = 1(正如预期的那样),我在reportviewer1中显示report2,如果我按下button1 消息框再次显示参数count = 1(我希望它显示0) 我得到报告1 .rdlc显示在reportviewer1中,没有例外

我的代码是

private void report1Button_Click(object sender, EventArgs e)
    {
        reportViewer1.LocalReport.ReportPath = Application.StartupPath + "\\report1.rdlc";
        MessageBox.Show("parameters count =" + reportViewer1.LocalReport.GetParameters().Count.ToString());
        reportViewer1.LocalReport.DataSources.Clear();
        reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", reportDataTable));
        reportViewer1.RefreshReport();
    }
    private void report2Button_Click(object sender, EventArgs e)
    {
        reportViewer1.LocalReport.ReportPath = Application.StartupPath + "\\report2.rdlc";
        MessageBox.Show("parameters count =" +reportViewer1.LocalReport.GetParameters().Count.ToString());
        reportViewer1.LocalReport.SetParameters(new ReportParameter("Report2ParameterString", " testing Report2ParameterString"));
        reportViewer1.LocalReport.DataSources.Clear();
        reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", reportDataTable));
        reportViewer1.RefreshReport();
    }
Run Code Online (Sandbox Code Playgroud)

c# parameters reportviewer rdlc microsoft-reporting

3
推荐指数
1
解决办法
5974
查看次数

尚未指定报告定义的来源

我正在使用以下代码尝试SetParametr:

    var report = new ReportParameter[1];
    report[0] = new ReportParameter("MyName", "Raha");
    var reportDataSource1 = new ReportDataSource { Name = "WpfApplication17_User", Value = _users };


    _reportViewer.LocalReport.DataSources.Add(reportDataSource1);
    _reportViewer.ServerReport.SetParameters(report);
    _reportViewer.LocalReport.ReportPath = "../../Report1.rdlc";

    _reportViewer.RefreshReport();
Run Code Online (Sandbox Code Playgroud)

错误:尚未指定报告定义的来源

为什么错?

我创建了一个报告参数,参数名称是'MyName'

更新:

我正在使用以下代码:

    //var report = new ReportParameter[1];
    //report[0] = new ReportParameter("MyName", "Raha");


    var reportDataSource1 = new ReportDataSource { Name = "WpfApplication17_User", Value = _users };

    string exeFolder = System.IO.Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);

    _reportViewer.LocalReport.ReportPath =exeFolder + @"\Reports\Report1.rdlc";


    _reportViewer.LocalReport.DataSources.Add(reportDataSource1);

    //_reportViewer.ServerReport.SetParameters(report);

    _reportViewer.RefreshReport();
Run Code Online (Sandbox Code Playgroud)

报告中显示的数据.

但是,我使用以下代码:

   var report = new ReportParameter[1];
            report[0] = new ReportParameter("MyName", …
Run Code Online (Sandbox Code Playgroud)

report microsoft-reporting c#-4.0

2
推荐指数
3
解决办法
4万
查看次数