Crystal Reports を使ってカスタムレポートを作成したい (英語のみ)

If Crystal Reports is installed on your computer, you will be able to create custom reports in the Administration and Monitoring Console.

【重要!】Crystal Reports must be installed on the same computer as the Application Server.

Crystal Reports setup

ABBYY FlexiCapture supports Crystal Reports for Visual Studio 2010 (Version 13, 13.0.11.1467 is recommended), Crystal Reports 2008 (Version 12), Crystal Reports for Visual Studio 2008 (Version 10.5).

【ご注意】If you are using Crystal Reports for Visual Studio 2008 (Version 10.5) and Internet Explorer 11, enable Compatibility View in Internet Explorer.

Whether to install a 32- or 64-bit version of Crystal Reports is determined by the mode, in which the pool of the Administration and Monitoring Console is running in IIS (FlexiCapture 11 Monitoring).

【ご注意】If the bit does not match or Crystal Reports is not installed, the following error message will appear:

A runtime error occurred:
CrystalReports loading failed

Details:
Description Exception has been thrown by the target of an invocation.
Source mscorlib
Stack trace at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at ReportManager.loadCrystalReports()

To use Crystal Reports for generating reports, specify the following key in the web.config file of the Administration and Monitoring Console:

<appSettings> <add key="UseCRReportSystem" value="true"/> ... <app Settings>

Crystal Report Query

To create a custom report, complete the following steps:

  1. Create a new Visual Basic Class Library in Microsoft Visual Studio:
    • In the main menu, click File > New Project.
    • Chose Other Languages > Visual C# > Windows in the Project Types panel and Class Library in the Templates panel.
      mceclip0.png 
    • Add a Crystal Report template to the project.
    • In the main menu, chose Project > Add New Item.
    • Chose Visual C# Items > Reporting in the Categories panel and Crystal Report in the Templates panel.
      mceclip1.png 
  2. Depending on the type of report you chose, do one of the following:
    • For an SQL or stored procedure based report

      【重要!】Crystal Reports represents data received from SQL queries or stored database procedures as data sets. If you plan to use a stored procedure, you must create one and save it in the database of ABBYY FlexiCapture in advance.

      1. Add a DataSet to the project. 
        • Choose Project > Add New Item in the main menu.
        • In the Categories panel, chose Visual C# Items > Data, in the Templates panel, chose DataSet.
          mceclip2.png 
      2. Use DataSet Toolbox or Server Explorer to access the database server of ABBYY FlexiCapture and transfer the necessary data to the data selection tab. 
        • In the main menu, choose View > Toolbox or View > Server Explorer to display the corresponding windows.
          mceclip3.png 
        • Transfer the necessary data to the data selection tab.
          mceclip4.png 
      3. Add the data to your report. 
        • Open your report in Crystal Reports and chose Crystal Reports > Database > Database Expert in the main menu.
        • In the Available Data Sources panel, chose Project Data > ADO.NET DataSets > <DataSet Name> and click the > button.
          mceclip5.png 
    • For a report created in Crystal Reports

      1. Use Database Expert in Crystal Report's report editor to connect to the database by selecting OLE DB (ADO). 
        • Open your report in Crystal Reports, then chose Crystal Reports > Database > Database Expert in the main menu.
        • In the Available Data Sources panel, chose Create New Connection > OLE DB (ADO).
          mceclip6.png 
          Then setup a connection to the database.
      2. Use Database Expert to create a database query command by specifying the database's text and parameters. 
        • After you connect to the database, chose Add Command and click the > button.
          mceclip7.png 
        • Enter your query and specify its parameters.
          mceclip8.png 
  3. Create the report.
  4. Save the report.

Now when you generate this report it will be displayed in Crystal Report Viewer and you will be able to export it to various formats.

カスタムレポート

Custom reports are divided into two types according to the method of acquiring data:

  1. Reports based on queries created in Crystal Report Query Editor.
  2. Reports based on data acquired from stored procedures or on SQL queries to the database.

Both types of reports will be displayed in Crystal Report Viewer.

A custom report containing the first 100 records from the log would include the following files:

In order to enable a custom report, place the report (*.rpt) and the report's XML file in the FlexiCapture11\CustomReports subfolder of the IIS root folder (usually C:\Inetpub\wwwroot\FlexiCapture11\Monitoring\CustomReports), and then enable it through the Administration and Monitoring Console. Examples of custom reports are placed in this folder when FlexiCapture is installed. When you enable your report, it will become available in the Custom reports submenu of the Administration and Monitoring Console.

他にご質問がございましたら、リクエストを送信してください

コメント

0件のコメント

サインインしてコメントを残してください。