Professional.Crystal.Reports.for.Visual.Studio..NET [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Professional.Crystal.Reports.for.Visual.Studio..NET [Electronic resources] - نسخه متنی

David McAmis

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید



























Determining the Correct Object Model



When working with web applications, there are two different object models to choose from, each with its own capabilities and strengths. The first, contained within the Crystal Reports Web Forms Viewer object model (CrystalDecisions.web), contains all of the functionality required to view a report in the Crystal Reports Web Forms Viewer, including the ability to set database logon information, pass parameters and record selection, control the viewer's appearance, and view reports, including reports consumed from an XML Report Web Service.

Using the CrystalDecisions.Web object model, you are covered for most basic report integration requirements, but you have no control over the report itself at run time - you won't be able to change the record selection for any subreports that appear in your report and you won't have access to modify report elements, like groups and sorting, or formula fields.

For complete control over the report and its content, you need to use the Crystal Reports Engine object model (CrystalDecisions.CrystalReports.Engine) in conjunction with the viewer object model. This will allow you complete control over your report and the objects and features contained within. Using the Crystal Reports Engine means that you have a rich object model that can be used to modify even the tiniest elements of your report.


Note

You will also need to use the Report Engine object model if you are using ADO (.NET or "Classic" ADO) as the data source for your report (which is covered in Chapter 6: Working with .NET Data).

It is important to note that the Crystal Reports Engine object model cannot stand alone - it provides no way to view a report and relies on the Crystal Reports Web (or Windows) Forms Viewer to actually view the report.

Crystal Decisions recommends that you do not overlap the two object models and try to use properties and methods from both at the same time. An example would be where you are setting a parameter field value in the Report Engine object model - you wouldn't want to also try to set a parameter field in the same report using the Crystal Reports Windows Forms Viewer object model. Try to pick an object model based on your requirements and (as I recommended in the last chapter with the Windows Forms Viewer) stick with it!


/ 115