Telerik Reporting 是否支持业务对象数据源?

发布于 2024-07-24 07:08:05 字数 491 浏览 0 评论 0原文

我需要使用业务对象来调用三层模型中的强类型表适配器。 我还需要使用 Telerik 报告,但我在网上没有看到任何示例。 我只看到了创建 Northwind 的简单选择并将报表直接连接到该选项的简单示例。 我使用的是 Telerik 2008 年第三季度的报告,我的设计师甚至看起来与我看过的视频不一样。 我有两个业务对象:boReportHeader 和 boReportLines,它们各自有 4 个方法,这些方法将从 Ui 传递参数,并需要填充报表标题和详细信息部分。 我花了一些时间尝试使用来自设计者和代码隐藏的 Telerik 报告的这些内容,但没有成功。 我原以为这会像 RadGrid 一样简单,但事实似乎并非如此。 任何人都有使用带有参数的多个业务对象数据源作为 Telerik Reporting 数据源的经验吗? 该项目的主要要求是生成一个 PDF 文件,该文件将作为 BLOB 文件存储在数据库中。 如果 Telerik Reporting 无法做到这一点,除了 Telerik Reporting 之外,还有其他工具可以推荐吗?

I have a requirement to use business objects to call strongly typed table adapters in a three tier model. I also have a requirement to use Telerik reporting, which I didn't see any examples of online. I just see simple examples of creating a simple select to Northwind and connecting the report directly to that. I am using 2008 Q3 of Telerik reporting and my designer doesn't even look the same as the videos I've seen. I have two business objects: boReportHeader and boReportLines and they each have 4 methods that will be passed parameters from the Ui and need to fill the report header and detail section. I spent some time trying to use these from Telerik reporting from both the designer and code-behind and I haven't been successful. I was assuming this would be as straight forward as the RadGrid, but it doesn't appear to be. Anyone have experience with using multiple business object data sources with parameters as a datasource for Telerik Reporting? The main requirement for this project is to generate a PDF file that will be stored in the database as a BLOB file. If this is not possible with Telerik Reporting, does anyone have another tool to suggest other than Telerik Reporting?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

三月梨花 2024-07-31 07:08:05

是的你可以。 请参阅下面的代码。

namespace TelerikReporting {
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Telerik.Reporting;
using Telerik.Reporting.Drawing;

public partial class Rep2 : Telerik.Reporting.Report {

    public static int GetTotal(int male, int female) {
        return (male + female);
    }
    public Rep2() {

        InitializeComponent();

        // I am initializing my DataClass.
        MyData d = new MyData();

        // Adding the DataSource.
        this.DataSource = d.GetCityMFCount();

    }
}
}

最后,您在报告查看器中调用此报告。

    protected void Page_Load(object sender, EventArgs e) {

    Rep2 rep = new Rep2();
        ReportViewer1.Report = rep;


    }

希望这可以帮助。

莉比·乔治

Yes You can. See the code below.

namespace TelerikReporting {
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Telerik.Reporting;
using Telerik.Reporting.Drawing;

public partial class Rep2 : Telerik.Reporting.Report {

    public static int GetTotal(int male, int female) {
        return (male + female);
    }
    public Rep2() {

        InitializeComponent();

        // I am initializing my DataClass.
        MyData d = new MyData();

        // Adding the DataSource.
        this.DataSource = d.GetCityMFCount();

    }
}
}

Finally, You call this report in the report Viewer.

    protected void Page_Load(object sender, EventArgs e) {

    Rep2 rep = new Rep2();
        ReportViewer1.Report = rep;


    }

Hope this Helps.

Liby George

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文