INFOR ReportingGuide
INFOR ReportingGuide
Important Notices
The material contained in this publication (including any supplementary information) constitutes and
contains confidential and proprietary information of Infor.
By gaining access to the attached, you acknowledge and agree that the material (including any modi-
fication, translation or adaptation of the material) and all copyright, trade secrets and all other right,
title and interest therein, are the sole property of Infor and that you shall not gain right, title or interest
in the material (including any modification, translation or adaptation of the material) by virtue of your
review thereof other than the non-exclusive right to use the material solely in connection with and the
furtherance of your license and use of software made available to your company from Infor pursuant
to a separate agreement, the terms of which separate agreement shall govern your use of this mate-
rial and all supplemental related materials ("Purpose").
In addition, by accessing the enclosed material, you acknowledge and agree that you are required to
maintain such material in strict confidence and that your use of such material is limited to the Purpose
described above. Although Infor has taken due care to ensure that the material included in this publi-
cation is accurate and complete, Infor cannot warrant that the information contained in this publication
is complete, does not contain typographical or other errors, or will meet your specific requirements.
As such, Infor does not assume and hereby disclaims all liability, consequential or otherwise, for any
loss or damage to any person or entity which is caused by or relates to errors or omissions in this
publication (including any supplementary information), whether such errors or omissions result from
negligence, accident or any other cause.
Without limitation, U.S. export control laws and other applicable export and import laws govern your
use of this material and you will neither export or re-export, directly or indirectly, this material nor any
related materials or supplemental information in violation of such laws, or use such materials for any
purpose prohibited by such laws.
Trademark Acknowledgements
The word and design marks set forth herein are trademarks and/or registered trademarks of Infor
and/or related affiliates and subsidiaries. All rights reserved. All other company, product, trade or ser-
vice names referenced may be registered trademarks or trademarks of their respective owners.
Publication Information
Release: Infor Mongoose 9.00
Publication date: October 30, 2013
Contents
Chapter 1: Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
Setting up the Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
Report-related Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
Creating or Modifying a Report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
Specific System Configuration with Respect to Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
Linking the Report to a Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
Using RunReport.exe to Process Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
Previewing a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
User View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
System View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
Printing a Report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
User View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
System View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
Using Email with Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
Sending Email to Yourself . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
Sending Email to Customers and Vendors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
This document describes how Infor Mongoose-based applications handle reports. It includes a
description of the reporting system architecture, specifics of creating reports, how to link custom
reports into an application, specifics of using the Infor Framework TaskMan and RunReport
executables, and how to troubleshoot problems with reports.
Note: By "Infor Mongoose-based applications," we mean any application that is built on the Infor
Mongoose framework. This includes programs such as SyteLine, Service Management, and other
applications that have been built or modified to use the Infor Mongoose framework. Where there are
specific points in this guide that apply to a particular application, we indicate that clearly throughout.
Related documents
You can find the documents in the product documentation section of the Infor Xtreme Support portal,
as described in "Contacting Infor" on page 5.
Additional information about reports, background processing, and customization can be found in the
following documents.
The Task Manager chapter in the system administration guide for your system
Infor Mongoose online help files (Customizing Forms...)
The modifications guide for your system (the chapter on "Architectural Guidelines for Customers
Modifying [your application]")
For the most up-to-date list of software and hardware requirements for Infor products, see the Infor
Guide to Technology. This document also lists typical system administration tasks you should be
familiar with before attempting to install and administer Infor products.
Contacting Infor
If you have questions about Infor products, go to the Infor Xtreme Support portal at http://
www.infor.com/inforxtreme.
If we update this document after the product release, we will post the new version on this Web site.
We recommend that you check this Web site periodically for updated documentation.
If you have comments about Infor documentation, contact [email protected].
This chapter explains how to set up reports for previewing and printing and then, first from a user’s
point of view, how a report is processed for previewing or for printing, and the forms that are used to
process it. The sections following explain what is happening behind the scenes during the print or
preview.
Report-related Terminology
For the purposes of this guide, here are some report-related terms that you should be aware of:
Report definition file – The parameters that determine how a report looks and what data it can
contain when it is output are contained within an XML file known as a report definition file. For
SQL Server Reporting Service (SSRS) reports, this file must have an .rdl extension.
Note: For legacy Crystal Reports, these are contained in .rpt files, which are no longer
distributed with SyteLine, as of version 8.03.10, or Service Management, as of version 4.10.
Several template RDL files are included with Mongoose-based applications. These report
templates are installed as part of the base software installation and, if the default installation
locations are used, they can be found at:
Drive:\ProgramDirectory\Infor\Mongoose-based application\Report\Reports\Templates
If you do not have these templates, you can obtain them from the Infor Xtreme Support site (see
“Contacting Infor” on page 5). They are contained in a zip file named
SSRS_Report_Templates.zip. To find the file, you can search on "SSRS Report Templates."
For a description of the report templates, see Appendix C, “Reference."
Report form – The most direct and easiest way for a report to be generated and processed is with
the use of a report form. These are specialized forms from which you can specify what exact data,
such as record numbers or ranges of dates, are to be included in the report output. You can also
create your own custom report forms.
Report output – The end result of a request to process and generate a report in some form usable
to the end user is the report output. Your Mongoose-based application includes several formats in
which report outputs can be previewed and generated, including PDF, HTML, DOC (Word),
MHTML, CSV, XLS (Excel), printer, and others.
Previewing a Report
For many reports, we recommend or require that the report be previewed before committing to print.
User View
System View
This diagram represents a high-level view of what happens inside the system when a user submits a
request to preview a report.
Step Description
1 WinStudio submits a report preview task through BGTaskSubmitSp, which inserts a task
request record into the ActiveBGTasks table.
2 BGTaskSubmitSp returns the BGTaskHistory.RowPointer value to WinStudio.
3 WinStudio directs users to an ASP .NET page, which monitors the BGTaskHistory table
through the IDO service session. It can query the specific task history record, using the
RowPointer value, returned by BGTaskSubmitSp.
Step Description
4 While processing the requested report task, TaskMan creates an XML file for the task
parameters.
5 After creating a parameter XML file, TaskMan executes RunReport.
6 RunReport causes MGReportProcessor to load the specified parameter XML file.
7 MGReportProcessor loads the requested report definition file.
This is a report specific to the current configuration. If not found, then it returns an error.
8 MGReportProcessor uses the IDO runtime service to process the report and export it to
a designated output location.
9 MGReportProcessor uses the IDO runtime service to query string objects and update
BGTaskHistory.ReportOutputPath.
The default report output path is:
\\<UtilityServer>\Report\OutputFiles\<UserId>\<ReportFileName>_<Site>_
<TaskNumber>.<FileExtension>
For more information, see “Determining the Output Path” on page 45.
10 After successfully exporting the requested report, MGReportProcessor updates
BGTaskHistory with the actual output file path (BGTaskHistory.ReportOutputPath).
11 The IDO runtime service delivers the report output to a predetermined ASP .NET page.
12 WinStudio directs the user to the ASP .NET page for viewing.
Printing a Report
When you are confident that the report output is what you want, then you can instruct the system to
process and print the report.
User View
RunReport.exe processes the report, by calling a SQL Server stored procedure in the application
database to retrieve the data needed for the report or by launching an IDO-based query. The data is
then formatted according to the settings in the report definition file.
System View
Step Description
1 WinStudio submits a report print task through BGTaskSubmitSp, which inserts a task
request record into the ActiveBGTasks table.
2 TaskMan service's polling thread monitors the ActiveBGTasks table through the IDO
runtime engine, looking for records with a status of Ready, which tells TaskMan to pick
up and process the record.
3 While processing the requested report task, TaskMan creates an XML file containing the
report parameters.
4 After creating the parameters XML file, TaskMan executes RunReport.
5 RunReport causes MGReportProcessor to load the specified parameter XML file.
Step Description
This flowchart shows the process used to email reports to customers or vendors:
This chapter includes information specific to creating a report in an Infor Mongoose application
environment. It does not include related information about customizing or modifying existing reports.
For information about customizing or modifying existing reports, see Chapter 5, “Modifying Reports."
Visual Studio creates the RDL file and displays a Design workspace in which to design and build your
report definition.
Once the basic report definition file has been created, you can proceed to design the report output
with the items, components, and data available in Visual Studio 2008.
Note that the report template already has report headers and footers configured. Many of the
entries in the headers and footers are preconfigured to pick up variable values from within the
system and need not be modified.
Note: For an explanation of the structure of this stored procedure and Mongoose
stored procedures in general, see “Structure of Report Stored Procedures” in
Appendix C, “Reference.”
-- ==================================================================
-- Stored Procedure: Rpt_UserTaskSp
--
-- This is a report stored procedure used by the UserTask report demo.
-- ==================================================================
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
-- Transaction management.
BEGIN TRANSACTION
SET XACT_ABORT ON
DECLARE
@RptSessionID RowPointerType
, @LowDate DateType
, @LowCharacter HighLowCharType
, @HighCharacter HighLowCharType;
, TaskDescription
, RowPointer
FROM #ReportOutput
ORDER BY Username, RemindDateTime, TaskName;
COMMIT TRANSACTION
EXEC CloseSessionContextSp @SessionID = @RptSessionID;
GO
4 Click Execute and verify that the stored procedure executes successfully.
5 Save the stored procedure with the name Rpt_UserTaskSp.sql.
a. Right-click the name of your data source and, from the context menu, select Add Dataset.
b. In the Dataset Properties dialog box, Name field, specify an appropriate name for your
dataset, such as UserTaskDataset.
c. Verify that the Use a dataset embedded in my report option is selected.
d. Verify that the data source defined in Step 2 is specified in the Data Source field.
e. For the Query type option, select Stored Procedure.
f. In the Select or enter stored procedure name field, specify the name of the stored procedure
you created (in this case, Rpt_UserTaskSp).
g. Click Refresh Fields.
Visual Studio displays a list of automatically created query parameters in the Define Query
Parameters dialog box.
h. Verify that all Parameter Value fields specify <Null>.
i. Click OK.
j. In the Dataset Properties dialog box, click OK.
The Report Data panel displays the new dataset under the Datasets entry.
Note: Verify that the dataset you specified is the only one in the project. If there
are others, delete them.
k. In the Properties panel field drop-down list (at the top of the panel), select Tablix 1.
Note: The “Tablix” area is where the data populates the report when generated.
For more information about a tablix and other report elements, see the Visual
Studio 2008 documentation.
l. In the General > Dataset Name field, specify the dataset you just created.
Note: For the Default Value, you must select the Default Values tab and then select Specify values.
Click Add and then set the Value field to (Null).
d. Click Add.
e. In the Value field, specify fUserTaskReport.
f. Click OK.
Visual Studio adds fUserTaskReport to the list of available Parameters.
Note: If you have not yet created any user tasks, there is no data with which to
populate this display. If this is the case, the query simply returns a row containing the
column headers. To see actual data displayed, first create some data using the Task
List form and then run this query again.
7 Click OK repeatedly to exit all dialog boxes.
Note that the report template already has report headers and footers configured. Many of the
entries in the headers and footers are preconfigured to pick up variable values from within the
system and need not be modified.
where:
ConfigServerURL is the standard URL formatted path to the configuration server’s default
page; for example: http://MyServer/IDORequestService/ConfigServer.aspx
ConfigName is the name of the configuration to which you want to connect; for example:
Mongoose701
Note: Take special notice of the semi-colon between the URL and the configuration name.
b. In the Dataset Properties dialog box, Name field, specify an appropriate name for your
dataset, such as UserTaskDataset.
c. Verify that the Use a dataset embedded in my report option is selected.
d. Verify that the data source defined in Step 2 is specified in the Data Source field.
e. For the Query type option, select Text.
f. Click Query Designer.
When the Query Designer dialog box opens, it should look like this:
If it does not, click the Edit as Text option to toggle to this view.
g. In the IDO Name drop-down field, specify UserTasks.
h. From the Properties list, select these properties:
UserID
Username
TaskName
RemindDateTime
TaskDescription
RowPointer
i. In the Filter field, specify this code:
Username BETWEEN ISNULL(@UsernameStarting,Username) AND
ISNULL(@UsernameEnding, Username)
AND TaskName BETWEEN ISNULL(@TaskNameStarting,TaskName) AND
ISNULL(@TaskNameEnding,TaskName)
AND ISNULL(RemindDateTime, '1753-01-01') BETWEEN
ISNULL(@RemindDateTimeStarting,'1753-01-01') AND
ISNULL(@RemindDateTimeEnding,'9999-12-31')
j. In the OrderBy field, specify this:
b. In the Report Parameter Properties dialog box, set the general properties like this:
Name: fUserTaskIDOReport
Prompt: fUserTaskIDOReport_
Note: The trailing underscore (_) is required for translatable string parameters.
Data type: Leave as Text
c. On the Default Values tab, select Specify values.
d. Click Add.
e. In the Value field, specify fUserTaskIDOReport.
f. Click OK.
Visual Studio adds fUserTaskIDOReport to the list of available Parameters.
Note: Before deploying and testing the report, you must define the fUserTaskIDOReport string. To do
that, go into Design Mode in your Mongoose-based application and select Edit menu > String to
create the string. Be aware that you must use fUserTaskIDOReport as the string name, but you can
set it to display as “User Task Report”.
Note: For the Default Value, you must select the Default Values tab and then select Specify values.
Click Add and then set the Value field to (Null).
If the last two do not yet exist in your project, create them now.
At this point, the variable elements, such as the report name still appear as variables.
Page footer
Some reports have additional features, such as notes, and some, such as label reports, contain only
data.
SSRS has four container classes. Three of these are subclasses of the Tablix class: Lists, Tables, and
Matrices. The fourth container class is the Rectangle. Data stored in a Tablix object can be filtered,
sorted, and grouped. Tablix objects also change their size and shape to best fit the space provided by
a particular output format. Rectangles are used to contain other objects, like tablix objects, textboxes,
images, and so on. Rectangles are useful to restrain the movement of objects, such as tables, as they
grow. This is especially important for reports like "label reports," where precise control of object
positioning is required.
In general, most reports use a rectangle for the report header, page header, page footer, and one or
more tables for detail data. In some instances, where there is a parent child relationship to data, a list
format can be used for the parent data, and one or more tables for the child data.
a. In the first body row cell (not the header row), click the data selection icon ( ).
b. From the drop-down list, select TaskName.
c. In the second cell, do the same thing and select TaskDescription.
d. In the third cell, do the same thing and select RemindDateTime.
Note that, as you make these selections, Visual Studio automatically adds correctly formatted
header row labels.
4 Add the group by which returned data is to be grouped and sorted:
a. In the Row Groups section (just below the main workspace area), click the drop-down arrow.
b. From the context menu, select Add Group > Parent Group.
c. In the Tablix group dialog box, Group by field, specify [Username].
d. Click OK.
Visual Studio creates a new column, on the left side of the Tablix table, labeled Username.
5 (Optional) Select the Preview tab and view the results of your changes.
Notice that the the preview now displays the returned data, the tasks are grouped together, and
they are sorted by user name.
TIP: To preview the report header page, in Preview mode, clear the NULL check box for the Display
Header parameter, and in the field, specify 1. Then click View Report.
Data Allow
Name Prompt Visibility Default Value
Type Null
3 Click OK.
4 Update the column header to reference the appropriate parameter:
a. Right-click inside the header cell and, from the context menu, select Text Box > Expression.
b. In the Expression dialog box, Set expression for: Value field, specify the expression using
this pattern: =Parameters!ParameterName.Value
where ParameterName is the specified parameter name, such as sUsername.
Notice that each header cell changes to something like this: [@ParameterName]
Our filter criteria is to correspond with the criteria specified on the User Task Report form, which we
have not yet created. For information on creating report forms and the example to create this one, see
Chapter 4, “Creating a Form to Run the Report."
For this example, we need four rows to display the filter criteria in our report header: One row is the
header row. The other three rows are to be used to display the filter criteria; specifically in this case,
the user name of the user to whom tasks are assigned, the names of the tasks assigned to the user,
and the reminder date for each task.
To create the extra rows:
1 Select and copy the existing set of text box components from the report header section.
2 Paste three copies of these text boxes into the report header section.
3 Move and align the three new sets of text boxes with the original set, aligning them vertically
below each other.
Your entire set of text boxes should now look something like this:
4 Fill in the criteria for these text boxes with labels and values that are to be passed in as report
parameters from the User Task Report form.
Your final set of text boxes should look like this:
Note: When filling in your text boxes take note of the following:
The first (most upper left) box has been deleted, because we are not using it.
Top-row and left-most fields are formatted using a boldface font, because they reference
string labels. The other, non-bolded boxes reference filtered values from the report form.
The sStarting and sEnding string parameters in this example have not yet been created.
Before doing this step, you might want to create those string parameters using the
procedures you have already learned. You can then select the new parameters in the
expression editor when assigning the value.
When filling in these values, the most reliable method is to right-click inside the box and,
from the context menu, select Create Placeholder or Text Box Properties (depending
on what box or field you are in). In the Placeholder Properties or Text Box Properties
dialog box, then, use the expression editor for the Value to assign the correct value. You
can also use this dialog box to set other attributes, such as the font family (Arial, for
instance) and font weight (Bold).
Note: This text never really displays anywhere in our system, but without something
in this field, Visual Studio does not let you save your changes to the data source.
Infor Task Manager, commonly known as TaskMan, is the Infor Windows service that is responsible
for processing and generating reports, among other things. There are several ways and places that
TaskMan settings can be made. This chapter covers settings that must be made in conjunction with
TaskMan to preview and print reports. Most of these settings were probably made during initial
system installation and configuration.
Additional information about TaskMan can be found in the system administration guide for your
system.
Note: Infor Task Manager is not the same as the Windows Task Manager.
On the Sites form, the Forms Database Name field should contain the name of the forms
database. If this is filled in incorrectly, the report can be previewed, but the labels remain
untranslated. For more information, see the description of the error “Labels Not Being Replaced
with Strings Table Values” on page 74.
Note: In some applications, the Sites form is known as the Sites/Entities form.
The System Parameters form should display the site ID. This site ID is used to select the
appropriate Sites record. The Sites form should contain the intranet name, which is used to
select the intranets record. If any of these links is incorrect, the report cannot be previewed.
Note: In some Mongoose-based applications, the System Parameters form is
known as the General Parameters form.
If you are developing Crystal reports, after you install TaskMan, you must separately install
Crystal Reports. For information on how to install and use Crystal Reports, see the previous
version of this document and the documentation for your version of Crystal Reports.
If you are using Crystal Reports, the Crystal Reports DLLs must be on the same machine as
MGCore.dll.
Report Output Obfuscation Use this option when you want to expose the report output
directory over the Web, for instance, without indexing the folder,
making illegitimate access to the reports of users more difficult.
When this option is set to 1, report output is directed into this path:
\\TaskMan_Path\Output
Files\ReportName_GUID.FileExtension
All report files reside in the Output Files folder and are
distinguished by the session ID appended to the report name.
If this option is set to 0 (the default), report output is directed into
the following paths, unless a Report Output Directory is specified
in the Report Options form or a Report Output Folder is specified
on the Sites/Entities form:
\\TaskMan_Path\Output
Files\UserID\ReportName_Site_TaskNumber.FileExtension
\\TaskMan_Path\Output
Files\UserID\Preview\ReportName_Site_TaskNumber.FileExt
ension (for preview)
TaskMan Options debug - Runs the current TaskMan thread in debug mode. For
more information, see the section on running TaskMan in debug
mode in the system administration guide for your system.
debugrep - Creates a text file containing a log of messages
generated during the running of a report.
eventlog - When debugging background tasks (with the debug
option above), TaskMan directs its debug logs to the toolset
messaging systems, which can be viewed using the IDO Runtime
Host or Log Monitor utilities. If you want to direct TaskMan debug
logs to the Windows event system so you can view and debug
them through the Windows Event Viewer, use this option.
taskmsg - If this is specified, TaskMan inserts some task-specific
messages while processing requested tasks, allowing you to
review the status/process of tasks. These messages can be
viewed in the Task Messages area on the Background Task
History form.
UsernameFilter - user01, user02, etc.
TasknameFilter - taskname01, taskname02, etc.
Intranet Defaults
The primary default path for report outputs is the path as specified on the Intranets form, TaskMan
Path field. This is the path the system uses for report outputs if no report output path is specified
either on the Sites/Entities form or the Report Options form.
Site Defaults
The Report Output Folder on the Sites/Entities form allows you to define a global file system/UNC
path (for example C:\\servername\ReportOutputs) to which all report outputs are directed. This folder
overrides the TaskMan Path field on the Intranets form. However, any user/task specific output
directory defined on the Report Options form overrides this default setting.
Within this directory, TaskMan looks for a user-specific subfolder. If not found, TaskMan creates the
subfolder and directs report output into it. User-specific subfolders are used only if the Report Output
Obfuscation process default (described above) is set to 0.
You can specify the following TaskMan keywords within the output path, which are substituted
accordingly:
BG~TMHOMEDIR~ - TaskMan home directory
BG~TASKID~ - Task ID/number
BG~TASKNAME~ - Task name
BG~CONFIG~ - Configuration name
BG~REQUSER~ - User requesting the task
BG~SITEID~ - ID of the site
Note: If you have overridden the TaskMan Path by specifying a Report Output Folder on the Sites/
Entities form, then use the Report Preview URL field on the Intranets form to specify the URL path
to that directory for report previews.
Process Defaults
The Report Output Obfuscation process default on the Process Defaults form appends the
session ID to the report name, rather than appending a user subfolder name. This option is useful if
you want to expose the report output directory over the Web without indexing the folder, which makes
illegitimate access to the reports of users more difficult.
Report Options
TaskMan looks first for a report output designation in the Output Directory field of the Report
Options form. The Report Options form allows you to specify a different output location for each
user/report task combination. You can specify a valid system path/file, and report outputs are
generated and exported to that location. Entering an output directory here overrides any path defined
on the Intranets form or the Sites/Entities form.
Max Concurrent - Specifies the maximum number of instances of this report that can be
processing at one time.
Note: The default Max Concurrent limit of 20 (which is required for Crystal
reports) does not necessarily apply to SSRS reports. However, for system
performance reasons, we recommend that you do not set this field to a number
greater than 20.
Also, be aware that this field controls, separately and simultaneously, the
number of report preview tasks and report printing tasks that can be processing
at the same time.
Isolation Level - The setting Read Uncommitted allows faster query performance. For more
information about the effects of Read Uncommitted versus Read Committed, see the online
help for this form and the Process Defaults form.
3 Save the definition.
Once you have the report definition file and the background task created for your report, you must
make the report available to users before they can actually use it. To do this, you must create or
modify a form. This chapter describes the steps needed to do that. The steps are organized so that
they continue setting up the example report used in the previous two chapters.
Most reports are launched from "criteria" forms. Criteria forms typically have several editable fields for
the report’s parameters. These fields can include criteria such as date ranges, selection of customers
or vendors, and selection of particular criteria either to include or not include in the report output.
Criteria forms also typically have two buttons: a Preview button that allows you to preview the report
output before committing it to a more permanent output; and a Print button that actually sends the
command to generate the report using the designated print options.
This is an example of a typical report criteria form:
Note: The caption should be a string that begins with the letter "f". In the string that
follows, each capital letter causes the system to start a new word in the title/caption
display of the form. For example, fUserTaskReport, when saved as a string,
appears as User Task Report in the title bar of the form.
7 When the system queries whether you want to create a new string, click Yes.
8 In the String Properties dialog box, verify that the String Value is correct, and then click OK.
9 Save the form.
10 If you are using a source control system, check the form in to your source system and then check
it out again immediately.
2 Use the mouse to draw a rectangle on the form, or just click in the form to create the component,
and resize it later.
3 In the Component properties sheet, the Name field, specify a name for the component, (for our
example, UsernameStarting).
4 In the Data Source section of the Component properties sheet, create a variable with the name
UsernameStarting:
a Click Binding and then click the associated ellipses (...) button.
b In the Edit Component Data Binding dialog box, in the Type field, specify Variable.
c Click Edit.
d In the Edit Variable Binding dialog box, Variable field, specify UsernameStarting as the
name of the variable.
e Click OK repeatedly until you return to the form.
The Binding field should now display: variables.UsernameStarting
5 In the Component properties sheet, the Inheritance > Component Class field, specify
UserName.
6 Repeat Steps 1 through 5 to create three more components. Name the components and their
associated variables:
UsernameEnding, with component class UserName.
TaskNameStarting, with component class TaskNameVar.
TaskNameEnding, with component class TaskNameVar.
7 Repeat Steps 1 through 5, using DateCombo component types, to create date-range fields.
Name the components and their associated variables:
RemindDateTimeStarting, with component class DateVar.
RemindDateTimeEnding, with component class DateVar.
8 Save the form.
At this point, your form should look something like this, where:
The top two fields are the UsernameStarting and UsernameEnding combo boxes.
The middle two fields are the TaskNameStarting and TaskNameEnding combo boxes.
The bottom two fields are the RemindDateTimeStarting and RemindDateTimeEnding date
combo boxes.
Notice that, as with the Increment Date check box, setting this component class
automatically creates and displays the check box label.
2 Save the form.
At this point, the form should look similar to this:
If the parameter list is too long to fit into a single variable, break it into two or more variables and
set the value of BGTaskParms to those variables. For example, set the value of BGTaskParms to
V(BGTaskParms1)V(BGTaskParms2), with BGTaskParms1 and BGTaskParms2 containing the
actual report parameters. The actual report parameters can include the TaskMan keywords
described in the system administration guide for your system.
8 Select and assign values to the BGTaskName and BGTaskParms variables:
This adds the task to the Background Queue and sets the BGTaskStatus variable on the parent
form to WAITING. When the scheduled time arrives, TaskMan automatically sends the command
to print the scheduled report.
5 When the scheduled time arrives, verify that the report generated correctly.
This chapter includes only information specific to modifying an existing report in an Infor Mongoose-
based application application environment. It does not include everything you might need to know to
modify a report.
Note: For the procedures to create a new report—that is, a report not based on an already existing
report definition—see Chapter 2, “Creating Reports."
Note: Visual Studio 2010 does not have the options to build reports at this time. You must use Visual
Studio 2008.
10 Click the new folder and once inside that folder, click Upload File. Browse to the new logo file that
you created in step 3: \\ServerName\Mongoose-based
application\Report\Reports\configuration folder\SLHeaderLogo.bmp. If you have done this
more than once, make sure to select the Overwrite item if it exists check box.
11 Click OK. This uploads the new graphic to the SSRS report server. You should not have to restart
the TM server or the SSRS server for this to take effect. When you print reports for the selected
configuration, the new logo displays.
12 If you have multiple configurations with different logos, repeat steps 9 and 10 for each
configuration folder.
For information about using the settings in Visual Studio 2008 or Report Builder 3.0, refer to the
documentation provided those applications.
This chapter describes how to troubleshoot problems with printing reports, previewing reports, or
using TaskMan in conjunction with reports. The information here is presented for developers, with
solutions that might include fixing stored procedures or performing SQL queries. Some of the same
troubleshooting information is also presented, without the developer-related sections, in the system
administration guide for your system.
The list of problems is organized according to general area. You might find it easier to locate a
specific problem or error by using the Acrobat Reader "Find" feature with this online document.
Error Log
If the SQL Server Reporting Service (SSRS) generated an error message, see the error log for
additional information. The error log is located in the \Reports\Errors\userID subdirectory, in the
base installation directory on the server where TaskMan resides.
Event Viewer
TaskMan runs as a service under Windows and generates event messages that you can view in the
Microsoft Event Viewer. Some common event messages are listed in the system administration guide
for your system. If you are having problems with a background task, you can run TaskMan in debug
mode, which generates additional messages. (See the section on running Infor Framework TaskMan
in debug mode in the system administration guide for your system.)
Report Problems
Several common problems can occur when users try to preview or print a report.
Symptoms
Run-time users cannot print reports.
Possible Solutions
Make sure the Infor Mongoose TaskMan service is started on the utility server.
Verify that TaskMan is set up as a Windows service that logs on as with a user account created to
access printers.
Verify that the user account configured as the owner of the Infor Mongoose TaskMan service has
print privileges under Windows for the default printer, plus all printers listed on the Report
Options form.
Verify that a default printer has been configured for the server on which TaskMan resides.
If the report being printed requires a printer other than the default printer on TaskMan's server,
verify that the correct printer is defined for the report on the Report Options form.
Verify that the user account that was used to run the Infor Mongoose TaskMan service is the
same user account that was used to map the printers on the TaskMan machine.
Verify that the printer was mapped using the printer name, not the share name.
Use SQL Profiler to verify that only one instance of TaskMan is monitoring the application
database. For more information, see the section on using SQL Profiler to trace TaskMan
instances in the system administration guide for your system.
Symptoms
Tasks that have been scheduled to run as background tasks using the Background Queue form are
submitted but do not get processed when scheduled. The report task status remains WAITING.
Possible Solution
Verify that the SQL Server Agent service is running on the report server. If necessary, reset the
properties of the SQL Service Agent service to start automatically.
Symptoms
The report output for predefined reports or reports based on a supplied template do not display the
name of the company in the footer. Instead, they display the name of the variable
BG~COMPANYNAME~ or the space is blank.
Possible Solutions
The system looks for the value to replace this variable from a field on System Parameters form. If
this field is null or missing, there is no value to pick up.
Note: In some Mongoose-based applications, the System Parameters form is known as the General
Parameters form.
If your application has a System Parameters form, check and verify that there is a Company or
Company Name field and that it has a value specified. If the field is there, but there is no value,
specify a value for the field. If the field is missing, perform these procedures:
a. Use the Sql Columns form to add a column to the "parms" table.
This column must be named company, set to the nvarchar data type, be 40 characters in
length, and be nullable.
b. Starting with the IDOs form, create a new IDO to extend and replace the "Parms" IDO.
c. Create a new property for the IDO you just created.
This property must be bound to the "par.company" column you created earlier.
d. Modify the System Parameters form by adding an Edit field component bound to the
"company" property.
Symptoms
With some report output types—notably HTML and MHTML—the company logo in the upper right
corner does not display at all or it displays incorrectly (at the wrong size, for instance).
Possible Solutions
This is caused by known bugs and, at this time, we have not been able determine a resolution to the
problems. Our best recommendation is to use the Acrobat Output (PDF) format until a resolution has
been found.
If, however, you determine that you really want or need to use HTML or MHTML outputs, then you
can use Visual Studio 2008 or Report Designer to actually embed the logo graphic in the report
definition file.
Symptoms
Field contents for reports is being truncated.
Possible Solutions
This problem is specific to Crystal Reports. For information and solutions, see the earlier
documentation that came with your system and/or the Crystal Reports documentation.
File Not Found – Occurs for Certain (But Not All) Reports
Symptoms
Some reports (but not all) generate a "File not found" error message.
Possible Solutions
This error message usually indicates an error in the programming of the report. Check for messages
generated when the task ran in the Background Task History form, or check the reports error log
(TaskMan_Path\Report\Errors\user_directory). Either of these might give more information about
the problem.
There are a number of things that can cause this error:
The report's stored procedure was changed, but the report definition file was not resynchronized
with the stored procedure.
For Crystal-specific solutions to this problem, see the earlier documentation that came with your
system and/or the Crystal Reports documentation.
A Transact-SQL error occurred in the stored procedure.
To get a more meaningful error message for a T-SQL error, run the report stored procedure
through the SQL Server Management Studio. The easiest way to do this is to print the report and
copy the report parameters from the Background Task History form. Paste these in as the
parameters for the report stored procedure in SQL Server Management Studio, making these
changes:
Enclose character and date parameters in single quotes.
Replace empty parameters with NULL.
If there is a T-SQL error, this will give a line number and error description. The most common SQL
errors in report stored procedures are data truncation errors. Many report stored procedures use
temporary tables created using SQL data types. These tables are often populated from variables
declared with user-defined data types. The lengths of many of these UDFs have been increased
(for example, address fields for an internationalized site ID). This can cause a SQL exception by
executing INSERT or UPDATE statements against the temporary tables using these variables, or
applying the CONVERT function to them.
The parameters passed by the report form are in the wrong order or are of the wrong data type,
which can produce a T-SQL error.
For example, if a string or date parameter is plugged into an integer parameter, SQL generates an
exception. Following the remedial steps in the preceding item catches these errors as well.
You should also check the Background Task History form to make sure there are no
uninterpreted V(…) or P(…) keywords in the parameters.
Finally, subreports are linked to the main report by parameters on the subreport. When Notes
subreports are linked in, the ShowInternal, ShowExternal, Rowpointer, and
pConnectionString subreport parameters must be linked back to the appropriate main report
fields (typically, two main report parameters). In addition to these four parameters, any other
parameters used in the subreport must also be linked in the properties. Finally, the parameters
linked in the properties should allow Null values or have Null as their default values.
If this is not done, the system expects these values to be passed from the originating form. If the
wrong types of values are passed, the system generates an error. If no values are passed, the
report usually "hangs" when run through TaskMan, while the report engine tries to prompt for
these values on the TaskMan machine.
The stored procedure makes a call to RaiseErrorSp or raiserrorsp.
RaiseErrorSp and raiserrorsp are used to generate a SQL exception with a user-specified error
message. Neither of these two stored procedures should be used in report stored procedures.
Symptoms
All attempts to generate a report result in a "File not found" error message.
Possible Solutions
The computer responsible for running reports probably has not been configured properly.
This machine must have access to the TaskMan folder (where TaskMan.exe and RunReport.exe
are installed) on the machine where TaskMan is running, or the TaskMan URL if previewing over
the internet. The easiest way to check this is to select Run from the Windows Start menu and try
to run a report.
In rare cases, this error occurs if the RunReport.exe has become corrupted. If this is the case,
running the report through TaskMan produces an error code of -1,073,741,819 and the report
fails.
Symptoms
Users and customers outside your network are not receiving automatically forwarded reports.
Possible Solutions
If only certain users are not receiving the reports, but others are, verify that report options are set
correctly for those users, by performing the following actions:
a. On the Background Task Definitions form, click Report Options.
b. For the report and user you are checking, verify that the Email Notification option is set to
Yes.
If Attach Report is set to Yes, you must also set Email Notification to Yes.
If no users outside your network are getting the reports, verify that the Exchange Server through
which the system routes email is set to relay email, by performing the following actions:
a. Open the Intranets form, Reports/TaskMan tab, and make note of the contents in the
following fields:
SMTP Server
SMTP Server Port
SMTP From Email
a. Click Start > Run.
b. In the Open field, specify cmd, and then click OK.
c. The system displays a Windows Command Prompt window.
d. At the command prompt, enter the command: telnet
e. At the Microsoft Telnet command prompt, enter the command: set localecho
f. At the prompt, enter the command: o SMTPserver SMTPport
or open SMTPserver SMTPport
where SMTPserver is the name of the SMTP server you collected from the SMTP Server field
and SMTPport is the port number you collected from the SMTP Port field in Step a.
g. At the SMTP server prompt, enter the command: hello
On some systems, this command might vary; for instance, you might have to enter the
command as HELO or some other variation.
The SMTP server responds with a message that ends with Hello, followed by the IP address.
h. Enter the command: mail from:<SMTPfrom>
where SMTPfrom is the email address you collected from the SMTP From Email field in Step
a.
The SMTP server responds with a message ending in ...Sender OK.
i. Enter the command rcpt to:<recipient_email>
where recipient_email is the email address of the user you are trying to relay the reports to.
If the SMTP Exchange server is not set up to relay email, the server displays a message
similar to the following:
550 5.7.1 Unable to relay for recipient_email
If you see this type of message, configure your SMTP Exchange server to relay the email.
For the procedure, see your Exchange server documentation.
If the SMTP Exchange server is set up to relay email, the server displays a message
similar to the following:
250 2.1.5 recipient_email
If you see this type of message, continue with the next step.
j. Enter the command: data
k. Type a test message to send to the recipient. When you are finished with your message,
press the Enter key, followed by a period ( . ), followed by the Enter key again. This
terminates the message and queues it for sending.
l. To exit the SMTP server session, enter quit, followed by any other key press.
m. To exit the Microsoft Telnet session, enter quit.
n. To exit the command prompt window, enter exit.
o. Confirm with the recipient that the test message was received.
Note: If you receive the error "Could not open connection to the host, on port [port #]" check the
firewall and virus software on the mail server to see if they are blocking the email.
Symptoms
Labels on report outputs are not correct or are not being translated correctly.
Possible Solutions
Verify that the report is configured to use the correct Strings table. It might be that the system has
been incorrectly configured and the report cannot find the correct Strings table.
To select the correct String table record on the Sites form, use the Site Name field on the System
Parameters form. Make sure that, for this site, there is a value in the Forms Database Name
field of the Sites form (in some versions, labeled as the Strings Table Specification field). If the
forms database is on a different server than the application database, the value for this field
should also indicate the linked server name, using this format: server_name.Forms_database
Note: In some applications, the Sites form is known as the Sites/Entities form, and
the System Parameters form is known as the General Parameters form.
TaskMan then determines the proper Strings table name by searching the specified forms
database for the Strings table associated with the current session.
Find the Strings table value using a query.
You can check this using the SQL Server Management Studio. Run the following query against
the application database:
SELECT i.intranet_name, p.site, i.tm_path , s.strings_table
FROM parms p
INNER JOIN site s ON s.site = p.site
INNER JOIN intranet i ON i.intranet_name = s.intranet_name
If this SELECT does not return any rows, then some piece of initialization data required by
TaskMan is missing.
Validate the Strings table name using a query.
To test the Strings table name using the SQL Server Management Studio, run the following
statement against the application database to return the number of strings in the Strings table:
DECLARE
@StringSQL AS NVARCHAR(255),
@FormsDB AS NVARCHAR(255),
@OwnerPos INT
SELECT @FormsDB = s.strings_table
FROM parms p INNER JOIN site s ON s.site = p.site
SELECT @OwnerPos = CHARINDEX( N'.dbo.', @FormsDb)
IF @OwnerPos <= 0 SELECT @OwnerPos = CHARINDEX(N'..', @FormsDb)
IF @OwnerPos > 0 SELECT @FormsDb = LEFT(@FormsDb, @OwnerPos - 1)
SELECT @StringSQL = N'SELECT COUNT(*)FROM ' + @FormsDB + N'.dbo.' +
l.StringTableName
FROM LanguageIDs l
WHERE l.LanguageID = 1033
EXEC (@StringSQL)
If the Strings table specification is invalid, this SQL code returns something similar to the
following:
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'String_Table_Specification'.
Verify that you are using the correct version of TaskMan.
One indicator that you might not be using the correct version of TaskMan is an error message that
says "Invalid String Table Name" followed by a number.
Symptoms
Attempts to generate a report instead generate a missing RPT file error message, such as "Missing
RPT file" or "RPT file missing".
Possible Solutions
These error messages indicate a problem with a Crystal Reports file. For information and solutions,
see the earlier documentation that came with your system and/or the Crystal Reports documentation.
No Report Output
Symptoms
Reports might be marked as Started and Completed in the Background Task History form, but
there is no output in the TaskMan\Reports\Output Files folder.
Possible Solutions
There are probably two or more instances of TaskMan monitoring the same database. To verify this,
shut down the instance of TaskMan you think should be monitoring the database and resubmit the
report. If the Background Task History record still gets updated, then there is at least one more
instance of TaskMan monitoring the database. To find out if this is the case, launch the SQL Profiler
against the database to see what hosts were polling.
Intermittent Errors
Symptoms
The same report is run a number of times, sometimes running successfully, and other times failing
with errors. This happens for all reports. Whether it succeeds or fails appears to be random.
Possible Solutions
This could occur because of the same issues described under the “No Report Output" section.
Alternatively, there might be two instances of TaskMan: one has the privileges needed to run reports,
but the other does not.
Symptoms
Reports fail to process and return an error code of 1,073,741,819.
Possible Solutions
If you see this return code, an executable might have become corrupt. Try double-clicking on the
RunReport.exe file. If it does not open dialog boxes, the EXEs have been corrupted, possibly by a
virus. Delete them and copy them again from the installation CD.
Symptoms
You print a report, but the notes do not print along with it.
Possible Solutions
Verify that notes are set up correctly to print with the report.
Symptoms
There is a data type mismatch between either what is passed from the form to the report file, or from
the report file to the stored procedure.
Possible Solutions
This can occur if the form passes the parameters in the wrong order, or a parameter is not defaulted
correctly. For example, a form might be passing in a blank for the Show Header check box. If you get
this error, try selecting the check box and running it again.
If this does not work, try selecting every check box and putting a value in every field.
Finally, try running the stored procedure through the SQL Server Management Studio with the same
parameters as those in BGTaskHistory, replacing blank parameters with NULL, and putting single
quotes around strings, dates, and guids.
Symptoms
Reports fail with the message:
Error running report. This field name is not known.
Possible Solutions
Verify that the report field was correctly mapped to the appropriate stored procedure field. The
solution is similar to the solution for type mismatches. For more information, see “Error 13: Type
Mismatch."
Symptoms
Running a report produces the error: "This field name is not known."
Possible Solutions
Having a report field that was not successfully mapped to a stored procedure field, can sometimes
cause this. In these cases, the unmapped stored procedure field will be part of the error message; for
example:
This field name is not known : {Rpt_Ap01FRISp;1.TcAmtAmtPaid}
Make sure the report field is in the stored procedure’s result set, and set the datasource location as
described in the previous bullet.
Symptoms
No users are receiving email messages about background tasks (including reports).
Possible Solutions
Verify that TaskMan is set up as a Windows service that logs on as a user account. If TaskMan is
configured as a Local System Account, email notification cannot be sent.
Verify that the user account configured for the Infor Mongoose TaskMan service under Windows
has email privileges in your mail system.
On the Intranets form, verify that the Send Email Notification field is selected. TaskMan gets
the value that is set here for the first database TaskMan is configured to use, and then uses that
value for all databases to which it connects from the utility server.
If you do not know which database is the "first" database, you can select the Send Email
Notification field for another database; then no email will be sent and no error messages appear
in the event logs. You must either determine what the "first" database is and set the flag there, or
set the flag in all databases. Conversely, to stop email notifications, either clear the flag in the
"first" database or clear the flag in all databases.
Verify that the recipient's user ID specifies an email address in the Users form.
The system requires a default email profile, or a profile called "TaskMan," on the server where
TaskMan resides. To verify this, if Microsoft Outlook is installed, open its properties (right-click on
the Outlook icon and select Properties). Click Show Profiles. If there is no TaskMan profile,
copy one that already exists, copy it, and rename it TaskMan.
If the notification concerns a Crystal Report, verify that email access is set up correctly for the
report you are troubleshooting.
Infor Mongoose TaskMan launches a system process (RunReport.exe) to generate a report. The
RunReport application then connects to the application database.
Once connected, RunReport queries any user options for running the report, for example, output
format or printer name. Once these options are set, RunReport prints the report.
Generally, RunReport is called from the application; however, you can also run RunReport from a
command line, specifying connection options, the report name, and report options. This could be
used, for example, to run reports directly from an add-on product, or to run reports immediately from a
workflow on a client (without having to put the report on a background queue) and then do something
with the report’s output in the workflow.
Keep in mind, however, that if you execute RunReport from a command line, you cannot take
advantage of TaskMan’s task history and management features.
MGReportProcessor
Core report processing is handled by MGReportProcessor, for which RunReport is a wrapper to call
methods in MGReportProcessor. This allows you to create your own executable, being processed by
TaskMan, which could access report execution functionality using MGReportProcessor.
Syntax
The command line syntax is this:
RunReport.exe switches
where switches must be preceded by either a minus sign ( - ) or a forward slash ( / ). If the -m switch
is used, it must be the last switch; the order of the other switches does not matter. Any switch that is
used must be followed by the appropriate value. All switches, other than -m, require their values to be
enclosed in parentheses if the value contains blank spaces. The value following -m must not be
enclosed in parentheses.
Switches
These are the switches that can be used in the RunReport.exe command line:
Switch Description
Switch Description
-session Session identifier, passed when TaskMan calls RunReport, to indicate the session
(optional) for which variables can be accessed by the report's stored procedure.
-s Name of the Strings table used to translate report labels.
(optional) RunReport uses an ODBC connection to the application database to query the
Strings table, so the table name must be qualified enough for the query to work.
If the Strings table is in a forms database on the same server as the application
database, then the Strings table name must include that database name (for
example, Formsdb.dbo.StringTable.)
If the Strings table is in a database on a different server, then this server must be a
linked server, and the Strings table name must include both the server name and
the forms database name (for example, Server.Formsdb.dbo.StringTable).
If this parameter is omitted, the report runs, but the labels are not translated and
display as the literal string name; and a warning message is placed in the error log.
-f Integer code for the report output format:
(optional) 1 - Crystal Report (RPT)
2 - Acrobat Format (PDF)
3 - Comma Separated Values (CSV)
4 - Excel 8.0 (format used with Excel 97 and Excel 2000)
5 - Excel 8.0 extended (format used with Excel XP and Excel 2003)
6 - HTML 4.0
7 - Printer
8 - Rich Text Format (RTF)
9 - Word for Windows (DOC)
10 - XML
11 - Text
12 - MHTML
13 - TIFF
-o Output file name.
(optional) If this is omitted, RunReport uses the format
HomeDir\Report\OutputFiles\UserName\TaskName_Site_TaskNum.Extension
-n Number of copies to print, if the report output is sent directly to a printer (output
(optional) format 7). The default value is set with the printer settings.
-e Error file name.
(optional) If a file name without a path is passed in, RunReport prepends to the path:
HomeDir\Report\Errors\UserName\
If this parameter is omitted, RunReport uses the format:
HomeDir\Report\Errors\UserName\TaskName_TaskNum.txt
TaskMan puts the contents of this file in the error message field on the
Background Task History form and then deletes the file.
Switch Description
Examples
When TaskMan and MGCore generate reports, they format and then execute command lines like the
ones in these examples.
If TaskMan is run with the debug startup parameter, this command line is printed to the Application
Event log. Reports can be tested by putting this command line in a batch file and executing it. The ****
-p parameter should be replaced by the appropriate password.
Substitution Keywords
RunReport also support several keywords. These keywords are replaced with values if they occur in
the text of formulas used in reports.
Keyword Description
Debug Mode
RunReport can be run in debug mode. To set this up, use TaskMan start parameter debugrep. The
output from debug mode is explained in the section on running TaskMan in debug mode in the
system administration guide for your system.
Executables
Executable Description
Taskman.exe Runs as a service on the utility server. It monitors the queue of tasks.
See Chapter 3, “Configuring TaskMan to Process and Generate
Reports." It references MGReportProcessor to generate the task
parameter (XML) file, which is passed to RunReport as its command-
line input parameter.
RunReport.exe Used to launch reports. Can also be run from a command line. See
Appendix B, “Using RunReport.exe."
DLLs
DLL Description
Tables/IDOs/Forms
Table IDO Form Description
When RunReport sees this parameter, it passes the Session ID to the stored procedure.
2. In the stored procedure, immediately after the call to InitSessionContextSp, add this code:
-- Copy the session variables referenced by @BGSessionId to the current
-- session created by the call to InitSessionContextSp.
EXEC CopySessionVariablesSp
@SessionId = @BGSessionId
This copies the MessageLanguage session variable to the current session context, so when
MsgAppSp is called, it uses the correct language ID.
3. Perform a database verification on the associated report after the stored procedure has been
updated.
SET ANSI_NULLS ON
GO
There is a block of code setting current session values, starting a transaction, and setting the
session.
Example:
-- Transaction management.
BEGIN TRANSACTION
SET XACT_ABORT ON
DECLARE
@RptSessionID RowPointerType
, @LowDate DateType
, @LowCharacter HighLowCharType
, @HighCharacter HighLowCharType;
NULL input parameters used to specify ranges are set to minimum and maximum values. Use the
SQL user-defined functions for this: LowDate, LowInt, LowString, HighDate, HighInt, HighString,
and so on. There is also the function ExpandKyByType for parameters of type NUMSORTCHAR.
Example:
-- Set the low and high values used for defaulting.
SET @LowDate = dbo.LowDate();
SET @LowCharacter = dbo.LowCharacter();
SET @HighCharacter = dbo.HighCharacter();
Many report stored procedures use temp tables for the report's record set. These should be
created by selecting variables into a temp table, so that User Defined Types can be used.
Example:
-- Declare variables used to create the temp table.
DECLARE
@UserId TokenType
, @Username UsernameType
, @TaskName MessageSubjectType
, @RemindDateTime DateTimeType
, @TaskDescription NoteType
, @RowPointer RowPointerType;
WHERE 1=0;
At the end of the stored procedure, the report record set is returned, the transaction is committed,
and the session is closed.
Example:
-- Return the report data.
SELECT
UserId
, Username
, TaskName
, RemindDateTime
, TaskDescription
, RowPointer
FROM #ReportOutput
ORDER BY Username, RemindDateTime, TaskName;
COMMIT TRANSACTION
EXEC CloseSessionContextSp @SessionID = @RptSessionID;
GO
Document Profiles
In some Mongoose-based applications, the Customer Document Profile and Vendor Document
Profile forms enable you to send certain reports to customers and vendors. When defining the report
parameters, select the Use Profile field to trigger use of the document profiles when you print the
report (document profiles are ignored when previewing).
The Customer Document Profile form and Vendor Document Profile form are subject to record
collection caps. For example, if your collection cap is set at 100, and you attempt to send a report to
150 customers, only the first 100 will be processed. For more information, see the “About Caps on
Collection and Drop-Down Lists” topic in the online help.
The following flowchart shows how report output is sent using the document profile forms.
Splitting Up of Tasks
All reports that use the Language Code and/or the Customer/Vendor Doc Profile are split up into
smaller tasks prior to being submitted to TaskMan. The Active Background Tasks form and the
Background Task History form show multiple entries based upon the split.
L R
labels, modifying for localization 2-37 Rectangle container class 2-36
languages used in reports C-94 Report Builder 3.0, using for RDLs 2-19, 5-63
localization, modifying labels for 2-37 Increment Date field, adding 4-53
Max Concurrent field, Background Task Defini- configuring the report layout 2-35
tions form 3-47 creating 2-19, 2-20
MGCore.ActiveBGTasks.BackGroundQueueDe- creating from a template 2-21, 2-29
leteSP C-89
creating the report project 2-20, 2-29
MGReportProcessor B-81
creating, example for stored procedure-based
Microsoft Event Viewer error messages A-67 reports 2-20, 2-29
modifications to reports 5-63 defined 1-7
N deploying 2-39
numeric formats used in reports C-94 modifying 5-63
O populating with data 2-28
output paths, defaults for reports 3-45 setting the report title 2-27, 2-33
overview of this guide 1-7 testing the report configuration 2-28, 2-35
Preview button, adding and configuring 4-57 tools required for modifying 5-63