If Crystal Reports is installed on your computer, you will be able to create custom reports in the Administration and Monitoring Console.
Important! 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, 22.214.171.1247 is recommended), Crystal Reports 2008 (Version 12), Crystal Reports for Visual Studio 2008 (Version 10.5).
Note. 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).
Note. 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
Description Exception has been thrown by the target of an invocation.
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:
- 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.
- Add a Crystal Report template to the project.
- Depending on the type of report you chose, do one of the following:
For an SQL or stored procedure based report
Important! 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.
- Add a DataSet to the project.
- Use DataSet Toolbox or Server Explorer to access the database server of ABBYY FlexiCapture and transfer the necessary data to the data selection tab.
- Add the data to your report.
For a report created in Crystal Reports
- Use Database Expert in Crystal Report's report editor to connect to the database by selecting OLE DB (ADO).
- Use Database Expert to create a database query command by specifying the database's text and parameters.
- Create the report.
- 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:
- Reports based on queries created in Crystal Report Query Editor.
- 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:
- Based on an SQL query:
- Based on a stored procedure:
- Based on a Crystal Report query:
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.