FastReport Studio Programmers Manual EN
FastReport Studio Programmers Manual EN
FastReport Studio
Programmer's
manual
Edition 1.09
Table of Contents
Foreword...........................................................................................................................................5
FastReport objects review................................................................................................................ 6
TfrxReport object......................................................................................................................... 6
Most significant methods of the TfrxReport object..................................................................6
Way to export........................................................................................................................... 7
Access to the Report Variables.................................................................................................9
Other useful methods of the TfrxReport object:.......................................................................9
Properties of the TfrxReport object........................................................................................ 11
Events of the TfrxReport object............................................................................................. 19
TfrxUserDataset..........................................................................................................................20
Properties................................................................................................................................ 20
Events..................................................................................................................................... 21
Builtin ADO Components.......................................................................................................... 22
TfrxADODatabase object....................................................................................................... 22
TfrxADOTable object.............................................................................................................23
TfrxADOQuery object............................................................................................................23
ActiveX objects.......................................................................................................................... 24
TfrxPreviewX ........................................................................................................................ 24
TfrxActivePreviewForm.........................................................................................................26
TfrxGzipCompressor object....................................................................................................... 27
TfrxReportClient object..............................................................................................................27
Working with TfrxReport object.................................................................................................... 30
Configuring and setting environment ........................................................................................ 30
Visual C++..............................................................................................................................30
C#.NET and Visual Basic.NET.............................................................................................. 30
Creation of the TfrxReport object.............................................................................................. 30
Visual C++..............................................................................................................................30
C#.NET...................................................................................................................................30
Visual Basic.NET................................................................................................................... 31
Loading and saving a report....................................................................................................... 31
Visual C++..............................................................................................................................31
C#.NET, Visual Basic.NET, and others................................................................................. 31
Designing a report...................................................................................................................... 31
Running a report......................................................................................................................... 31
Previewing a report.....................................................................................................................32
Printing a report.......................................................................................................................... 32
Loading and saving a prepared report........................................................................................ 32
Exporting a report.......................................................................................................................32
Visual C++..............................................................................................................................33
C#.NET, Visual Basic.NET, and others................................................................................. 33
Using default connection............................................................................................................ 36
Using in multithreading environment.........................................................................................36
Building a composite report (batch printing)............................................................................. 36
Numbering of pages in a composite report.................................................................................37
FastReport Studio – Programmer’s manual 4
Foreword
This documentation consists of several related chapters that describe different aspects of using
FastReport.
“FastReport object review” chapter describes FastReport Studio co-classes. These classes may be
created directly by application without using another FR Studio classes or interfaces. In addition,
this chapter gives description of interfaces and disipinterfaces that are not descendant of
IfrxComponent, so these interfaces are not matches to objects hierarchy.
“Working with TfrxReport object” chapter is analogue of Quick Start guide. This chapter gives
some examples, advices and recommendations how to accomplish simple functions. It includes
examples for C++, C#, and VB.NET emvironments. Generally, most examples are shown for
managed and unmanaged code.
“Objects hierarchy” chapter provides an object’s inheritances relation information. If you are not
familiar with original Fast Report Delphi, then it is only place to get information about interfaces
relation. In other words, this chapter describes all interfaces that are successors of IfrxComponent
interface.
FastReport Studio – Programmer’s manual 6
TfrxReport object
This object is the main one. One TfrxReport object contains one report. The object has all
necessary properties and methods for report loading and saving, design and viewing.
Clears a report.
Displays the report, which was a previously built via the “PrepareReport”
call.
Loads the previously prepared and save report from file. This report can be
freely displayed or exported.
Prints a report. Print options can be set by the PrintOptions property of the
report object.
Way to export
Following methods useful for export prepared report into number of external formats. These
methods implemented as additional interface of TfrxReport co-class:
interface IfrxBuiltinExports : IUnknown
{
};
The TfrxReport object provides methods for access to the report variables:
Sets variable’s value. Where Index is the variable name and Value is the value
of variable.
This method is useful for dynamic report creation. It provides functionality of creation of a report
internal object and linking it to a parent object. ObjectType argument is a GUID. The list of
FastReport Studio – Programmer’s manual 10
allowed GUIDs described in “Working with TfrxReport” chapter “Creating a report from code”
topic.
This method registers a user defined function, which called by OnUserFunction event. The
FunctionDefinition argument has the format of selected script language. Several possible
examples follow:
The Category argument allows logically group function in designer’s list of available functions.
The Description argument set short description of function, which showing in designer tool.
This method saves prepared report into COM or .NET stream. Method can be used for saving
prepared report into database or sending prepared report over network, or sending prepared report
into any protocol or storgae that support streams.
HRESULT _stdcall Version([out, retval] BSTR* Value);
This method gets FR Studio version as a string value. It obtains only major and minor versions
but not a build number.
HRESULT _stdcall Get_Page(
[in] long Index,
[out, retval] IfrxPage** Value);
Get report page object by its number. Return value has an IfrxPage type.
HRESULT _stdcall PagesCount([out, retval] long* Value);
Get report’s pages count. This value is a template pages count, not prepared pages.
FastReport Studio – Programmer’s manual 11
Searches report for object with a given ObjectName and return its IfrxComponent interface.
IfrxComponent interface is described in the “Objects hierarchy” chapter. Note that the
ObjectName is a case sensitive string.
HRESULT _stdcall PreviewPages([out, retval] IfrxCustomPreviewPages** Value);
Returns interface on the preview pages storage. This storage holds all prepared pages that are
generated by PrepareReport method. See description on IfrxCustomPreviewPages interface
below.
HRESULT _stdcall ClearDatasets();
Gives access to the report script. This script executes at report preparation time.
FastReport Studio – Programmer’s manual 12
The CR\LF terminated string of errors, occurring during one or another operation.
Provides write-only access to the window handle of the main window of the application. Use this
property to set a parent window for designer and viewer. This property makes such windows part
of the application, so that they are minimized, restored, enabled, and disabled with the
application.
This property is useful for batch-based environments and it disables report built-in dialogs.
FastReport Studio – Programmer’s manual 13
Converts the “Null” value of the DB field into “0,” “False,” or empty string,
depending on the field type.
The maximum size of memory in Mbytes, allocated to the report pages’ cache. It
becomes useful in cases when the “UseFileCashe” property is equal to “True.”
If a report begins to occupy more memory during construction, caching of the
constructed report pages into a temporary file is performed. This property is
inexact and allows only approximate determination of the memory limit.
“Silent” mode. Thus all messages about errors are stored in the
“TfrxReport.Errors” property, without displaying any messages on the screen.
Defines, whether it is necessary to use report pages caching into the file
(see the “MaxMemSize” property).
};
FastReport Studio – Programmer’s manual 14
pbPrint - printing
pbLoad – loading from a file
pbSave – saving into a file
pbExport - export
pbZoom - zooming
pbFind - search
pbOutline – report outline enabling
pbPageSetup – page properties
pbTools - tools
pbEdit - editor
pbNavigator - navigation
A double-buffer mode for the preview window. If enabled (by default), the
preview window will not flicker during repainting, but the process speed would
be reduced.
Defines whether the preview window is MDIChild (for MDI interface organizing).
};
FastReport Studio – Programmer’s manual 16
Printer name.
};
FastReport Studio – Programmer’s manual 17
Report author.
Report description.
Report name.
Show help.
This method is useful for selection of the national language for user
interface of Designer and Viewer. The FileName argument must be a full path to
the file in the FastReport language resource format (files with .frc
extension). The default language set to English.
};
Interface that controls the storage that holds all prepared pages that are generated by
PrepareReport method. Use this interface carefully, because it provides an internal low-level
methods and properties.
interface IfrxCustomPreviewPages : IDispatch {
Add an emty page with index that set by the ‘Index’ argument.
Get page by its index. Return value is an page described by IfrxReportPage interface.
This interface described in ‘Objects hierarchy’ chapter
};
There are several events are defined in the TfrxReport object. Most of events
have a ‘sender’ argument that points to the object, which the event source.
The ‘sender’ argument is a base object’s interface. It is possible to detect
an object type by using BaseName property.
This event occurs when user clicks on the object in the preview window. The
Sender argument is the interface on clicked object. See description below. The
Button argument is the identifier of clicked the mouse button.
HRESULT OnUserFunction(
[in] BSTR MethodName,
[in] VARIANT Params,
[out, retval] VARIANT* ResultValue);
FastReport Studio – Programmer’s manual 20
Event occurs when calling a function, added with the help of the “AddFunction”
method. See more in the corresponding chapter.
HRESULT OnProgress(
[in] IfrxReport* Sender,
[in] long ProgressType,
[in] int Progress);
HRESULT OnProgressStart();
HRESULT OnProgressStop();
TfrxUserDataset
Object for data access. The FastReport Studio uses this object for navigation
and reference to the data set fields. The TfrxUserDataSet object allows
constructing reports, which are not related to the database data, but do
receive data from other sources (for example, array, file, etc.). At the same
time, a programmer should provide navigation in such source. (See events
below). This object also used in ADO NET wrapper classes to provide
communication layer between ADO NET objects and FastReport objects. This
object does not have any methods, but have properties and events.
Note for ADO NET programmers: FastReport terminology is slightly differs from
ADO NET terminology. In terms of ADO NET the DataSet consist of number of
Tables, Views and Relations, but FastReport dataset is analogue to the ADO NET
table. Please do not be confused with terminology.
Properties
A symbolic name, under which the dataset will be displayed in the designer.
};
This object is inherited from TfrxDataSet, see Objects hierarchy issue for the
description IfrxDataSet.
Events
The following events are defined for the TfrxUserDataSet object. These events
must be handled by application program to provide data to the report.
This event’s handler must return the Value of the VarName variable.
This event’s handler must return the Eof = True parameter, if the end of
the data set is reached.
This event’s handler must move the cursor to the beginning of the data set.
This event’s handler must move the cursor to the next record.
This event’s handler must move the cursor to the previous record.
};
FastReport Studio – Programmer’s manual 22
TfrxADODatabase object
}:
FastReport Studio – Programmer’s manual 23
TfrxADOTable object
Specifies the currently active index. Use IndexName to activate an index and
cause it to actively order the dataset’s rows. At runtime, set IndexName to a
string containing the name of the index.
Indicates the base table operated on. Use TableName to specify the base table
in a database on which the ADO table component operates.
A symbolic name, under which the dataset will be displayed in the designer.
};
TfrxADOQuery object
TADOQuery provides the means for issuing SQL against an ADO data store and
showing results on report pages. This object’s default interface is a
descendant IfrxDataSet interface.
Contains the text of the SQL statement to execute for the ADO query.
A symbolic name, under which the dataset will be displayed in the designer.
Specifies timeout value for a SQL statement. In some rare cases, you may need
to increase this value to allow execute long time processing query.
};
ActiveX objects
FR Studio includes two ActiveX objects – preview window and preview form. The
difference between them is a user graphical control set. Preview window displays only a
report preview window without any controls, and preview form is a form, which includes
the preview window and some control objects such as zoom, exports, navigation buttons,
and other controls.
TfrxPreviewX
TfrxPreviewX ActiveX control provides the means to display preview window to display
prepared reports. It does not include any additional user interface controls.
TfrxPreviewX object implements two interfaces IfrxPreview and IfrxPreview events.
dispinterface IfrxPreview {
Loads prepared report from a file, which name set by FileName argument.
};
TfrxActivePreviewForm
TfrxActivePreviewForm ActiveX control provides the means to display preview form to
display prepared reports. It includes additional user interface controls such as zoom,
exports, navigation buttons, and other controls. TfrxPreviewX object implements two
interfaces IfrxActivePreviewForm and IfrxActivePreviewFormEvents events.
dispinterface IfrxActivePreviewForm {
VARIANT_BOOL AutoScroll();
void AutoScroll([in] VARIANT_BOOL rhs);
VARIANT_BOOL AutoSize();
void AutoSize([in] VARIANT_BOOL rhs);
TxActiveFormBorderStyle AxBorderStyle();
void AxBorderStyle([in] TxActiveFormBorderStyle rhs);
BSTR Caption();
void Caption([in] BSTR rhs);
OLE_COLOR Color();
FastReport Studio – Programmer’s manual 27
Methods and properties above are ActiveX related methods. Refer to ActiveX
documentation for detail description.
IfrxReport* Report();
};
TfrxGzipCompressor object
TfrxGzipCompressor provides the means to compress and decompress streams. It
supports two types of streams - COM streams and .NET streams. This object
implements IfrxCustomCompressor interface with two methods.
This method compress stream from InputStream into OutputStream. Compression rate is the
value which of compreesion rate. Zero means no compression and 3 means maximum
compression. FileName argument is the name of file which is stored into archive as
original file name.
This method decompresses input stream to a disk file with name, which set by
FileName argument of CompressStream method.
TfrxReportClient object
FastReport Studio – Programmer’s manual 28
IfrxReportServerConnection* ReportServerConnection();
The property that gets the server connection interface, which describes all
connection’s properties between client and FR server. See description below.
void PrepareReport();
void ShowReport();
BSTR ReportName();
This property controls the host name of FR Server. Value can be either the domain name
or IP address.
This property controls the login name for the connection authorization access to the FR
Server
This property controls the password for the connection authorization access to the FR
Server
This property controls TCP port number for TCP connection to FR Server
This property controls the port of proxy server (in case of proxy server is using)
This property controls the proxy server host name or (in case of proxy server is
using). Empty string value disables using proxy.
This property controls of retry count in case of communication problems with FR Server.
};
FastReport Studio – Programmer’s manual 30
Visual C++
We suggest using ATL for report development. Following code shows example of
report object creation for Visual C++:
Visual C++
Use header described in previous chapter. After that you’d able to use
following code inside function body. Internally, it uses ATL AutoPtr
functionality:
IfrxReportPtr pReport(__uuidof(TfrxReport));
C#.NET
Use steps described in previous chapter. After that you’d able to use
following code to create report object:
TfrxReportClass report;
report = new TfrxReportClass();
FastReport Studio – Programmer’s manual 31
Visual Basic.NET
Use steps described in previous chapter. After that you’d able to use
following code to create report object:
Visual C++
// Loads report from file "1.fr3"
pReport->LoadReportFromFile("c:\1.fr3");
// Saves report to file "1.fr3"
pReport->SaveReportToFile("c:\2.fr3");
Furthermore, we will simply show only .NET notations in examples. C++ developers must
remember to change examples into pointer addressing.
Designing a report
Running a report
In most cases, it is more convenient to use the first method. It displays the preview
window right away, while a report continues to be constructed.
The Boolean ClearLastReport parameter is convenient to use in case when it is necessary to add
another report to the previously constructed one (such technique is used for batch report
printing).
FastReport Studio – Programmer’s manual 32
Previewing a report
It is possible to display a report in the preview window in two ways: either by calling the
“TfrxReport.ShowReport” method (described above), or with the help of the
“TfrxReport.ShowPreparedReport” method. In the second case, the report construction is not
performed, but a prepared report is displayed. That means that you should either construct it
beforehand with the help of the “PrepareReport” method, or load a previously constructed report
from the file (see chapter “Loading/saving a prepared report”).
if (report.PrepareReport(true) == S_OK)
{
frxReport1.ShowPreparedReport();
}
In this case, report construction is accomplished first, and after that the prepared report is
displayed in the preview window. Construction of a large report can take a lot of time, and that is
why it is better to use the asynchronous the “ShowReport” method. It is possible to assign
preview settings by default via the “TfrxReport.PreviewOptions” property.
Printing a report
In most cases, you will print a report from the preview window. To print a report
manually, you should use the “TfrxReport.Print” method, for example:
report.Print();
At the same time, the dialogue, in which printing parameters can be set, will appear. You
can assign settings by default, and disable a printing dialogue with the help of the
“TfrxReport.PrintOptions” property.
It can be executed from the preview window. This also can be performed manually with
the help of the methods:
report.SavePreparedReportToFile("PreparedReports//MyNewReport.FP3");
report.LoadPreparedReportFromFile("PreparedReports//MyHugeReport.FP3");
A file, which contains the finished report, has “FP3” extension by default.
Note, that the pepared report loading is completed, its previewing is executed via the
“ShowPreparedReport” method!
Exporting a report
FastReport Studio – Programmer’s manual 33
Note: Starting from build 3.21.50 the PageNumbers property of IfrxPrintOptions interface also
affects to all exports.
The using of export slightly different for C++ and .NET managed environments.
Visual C++
To use these abilities from the C++ application code the IfrxBuiltinExports interface
required. This interface should be obtained from the report object.
pRepot->PrintOptions->PageNumbers = _bstr_t("");
IfrxBuiltinExports* pExp;
pReport->QueryInterface(__uuidof(IfrxBuiltinExports), (void**) &pExp);
pExp->ExportToPDF( "export.pdf", true, true, true);
pExp->ExportToHTML( "export.html", true, true, true, true, true, false);
pExp->ExportToRTF( "export.rtf", true, true, true);
pExp->ExportToXLS( "export.xls", true, true, true, false, false);
pExp->ExportToXML( "export.xls", true, true, true, false);
pExp->ExportToBMP( "export.bmp", 96, true, true, true);
pExp->ExportToTIFF( "export.tif", 96, true, true, true);
pExp->ExportToJPEG( "export.jpg", 96, 50, false, true, true);
pExp->Release();
frx.PrintOptions.PageNumbers = "";
frx.ExportToPDF( "export.pdf", true, true, true);
frx.ExportToHTML( "export.html", true, true, true, true, true, false);
frx.ExportToRTF( "export.rtf", true, true, true);
frx.ExportToXLS( "export.xls", true, true, true, false, false);
frx.ExportToXML( "export.xls", true, true, true, false);
frx.ExportToBMP( "export.bmp", 96, true, true, true);
frx.ExportToTIFF( "export.tif", 96, true, true, true);
frx.ExportToJPEG( "export.jpg", 96, 50, false, true, true);
Please note that export under IIS application may not be available due to disabled write access to
the working directory. Therefore, you should prepare some place to export at application design
time.
HRESULT ExportToPDF(
[in] BSTR FileName,
[in] VARIANT_BOOL Compressed,
[in] VARIANT_BOOL EmbeddedFonts,
[in] VARIANT_BOOL PrintOptimized);
HRESULT ExportToXML(
FastReport Studio – Programmer’s manual 34
HRESULT ExportToRTF(
[in] BSTR FileName,
[in] VARIANT_BOOL Pictures,
[in] VARIANT_BOOL PageBreaks,
[in] VARIANT_BOOL WYSIWYG);
HRESULT ExportToHTML(
[in] BSTR FileName,
[in] VARIANT_BOOL Pictures,
[in] VARIANT_BOOL FixedWidth,
[in] VARIANT_BOOL Multipage,
[in] VARIANT_BOOL Navigator,
[in] VARIANT_BOOL PicsInSameFolder,
[in] VARIANT_BOOL Background);
Exports prepared report into Portable Document Format. Refer to table below for
arguments description:
Name Type Description
FileName String The name of file(s) for export
Pictures Boolean Enable or disable export pictures
FixedWidth Boolean If true then exported pages has a fixed width
Multipage Boolean Put report pages into separated HTML files
Navigatur Boolean If true then export additional navigator page
PicsInSameFolder Boolean If true then place pictures into same folder
Background Boolean If true then export report background too
HRESULT ExportToXLS(
[in] BSTR FileName,
[in] VARIANT_BOOL Pictures,
[in] VARIANT_BOOL PageBreaks,
[in] VARIANT_BOOL WYSIWYG,
[in] VARIANT_BOOL AsText,
[in] VARIANT_BOOL Background);
Exports prepared report to the MS Excel format. This type export requires the MS Excel
installed on computer.
HRESULT ExportToBMP(
[in] BSTR FileName,
[in] int Resolution,
[in] VARIANT_BOOL Monochrome,
[in] VARIANT_BOOL CropPages,
[in] VARIANT_BOOL SeparatePages);
HRESULT ExportToJPEG(
[in] BSTR FileName,
FastReport Studio – Programmer’s manual 35
HRESULT ExportToTIFF(
[in] BSTR FileName,
[in] int Resolution,
[in] VARIANT_BOOL Monochrome,
[in] VARIANT_BOOL CropPages,
[in] VARIANT_BOOL SeparatePages);
HRESULT ExportToCSV(
[in] BSTR FileName,
[in] BSTR Separator,
[in] VARIANT_BOOL OEMCodepage);
HRESULT ExportToGIF(
[in] BSTR FileName,
[in] int Resolution,
[in] VARIANT_BOOL Monochrome,
[in] VARIANT_BOOL CropPages,
[in] VARIANT_BOOL SeparatePages);
HRESULT SendMail(
[in] BSTR Server,
[in] int Port,
[in] BSTR User,
[in] BSTR Password,
[in] BSTR From,
[in] BSTR Recipient,
[in] BSTR Subject,
[in] BSTR Text,
[in] BSTR FileName,
[in] BSTR AttachName);
Sends E-mail. This gives ability of sending E-mail by SMTP protocol. Refer table below
for arguments description:
Name Type Description Example
Server String URL or IP address of SMTP server "mail.fast-report.com"
Port Integer TCP port of SMTP server 25
User String User name for SMTP authorization "mailbot"
Password String Password for SMTP authorization "Hjk344Rd"
From String Sender E-mail address "[email protected]"
Recipient String Recipient E-mail address "[email protected]"
Subject String Mail subject string "Weekly report"
FastReport Studio – Programmer’s manual 36
One of abilities of the FR3 report format is storing the default connection name (alias)
into report body. TfrxADOTable and TfrxADOQuery uses default ADO connection if no any
TfrxADODatabase objects exist. Use standalone designer for editing default connections and
assigning it to report. Use View->Connections menu item in standalone designer for edit
connections. Use Report->Data menu item in standalone designer for selection connection in
context of the current report.
frx.ReportOptions.ConnectionName = "MyConnectionName";
Note: The default connection feature is NOT CAPABLE of multithreading environments. You
should create ADO connection by report designer and avoid using DafultConnection in report. If
you break, this rule for multithreading environments, then access violation will happen. See the
“Using in multithreading environment” issue for additional information.
Note: There is no check of availability of the ADO database by this property, so you can get error
on calling frx.PrepareReport() method.
Using FastReport in multitasking environment did not tested well. We assume that FastReport is
the pure single threading apartment model. That means what different threads can have one or
several report objects, but each report object has to be accessing within parent thread context
only.
Note: We found that ADO DB code is not fully multitasking compatible. Side effects raised on
reports that depend on DefaultConnection property.
FastReport, which allow building a new report in addition to an already existing one. The
«TfrxReport.PrepareReport» method has the optional «ClearLastReport» Boolean parameter,
which is equal to «True» by default. This parameter defines whether it is necessary to clear pages
of the previously built report. The following code shows how to build a batch from two reports:
frx.LoadReportFromFile("1.fr3");
frx.PrepareReport(true);
frx.LoadReportFromFile("2.fr3");
frx.PrepareReport(false);
frx.ShowPreparedReport();
We load the first report and build it without displaying. Then we load the second one into
the same «TfrxReport» object and build it with the «ClearLastReport» parameter, equal to
«false». This allows the second report to be added to the one previously built. After that, we
display a finished report in the preview window.
You can use the «Page,» «Page#,» «TotalPages,» and «TotalPages#» system variables for
displaying a page number or a total number of pages. In composite reports, these variables work
in the following way:
As it was said above, the «PrintOnPreviousPage» property of the report design page lets
you splice pages when printing, i.e. using free space of the previous page. In composite reports, it
allows to start creation of a new report on free space of the previous report’s last page. To
perform this, one should enable the «PrintOnPreviousPage« property of the first design page of
each successive report.
Interactive reports
There are two ways to make an interactive report. The first one is using built-in script and
catch events generated by dialog forms. The second one is catching event generated by report
into your application.
FastReport Studio – Programmer’s manual 38
Current version of FastReport Studio provides a wrapper classes for .NET data objects.
Following table shows correspondence between .NET data objects and wrappers:
// Object declaration
TfrxReportClass report;
FrxDataTable datatable;
Please, keep in mind that we cannot inherit FrxDataTable object from existing DataTable
object. That means that if you receive or create the DataTable object, then you cannot bind it to
report, nor convert to FrxDataTable object.
There is some issue on using data object with FastReport under managed environments.
Due to nature of object destroying by the NET garbage collector, the object lifetime is not fully
determinate. Furthermore, the FastReport engine uses global namespace of data objects within
application context. In some situations, these factors can cause for unexpected results.
Actually, this is not a problem if you follow main rule: Support unique name for each
data object within an application.
In order to support Master/Detail relation between .NET tables following algorithm may
be useful:
1. Each record of the master table has a unique key for the detail table.
2. Detail data must be a FrxDataView type.
3. Every navigation event between the master table records should set a new filter on the
detail table. Application must catch OnFirst, OnNext, and OnPrior events of master
FrxDataTable or master FrxDataView object.
4. In the event handler of these event set a filter on the detail DataView object.
Following code demonstrates how to set Master/Detail relation for ADO .NET objects. The
datatable is master FrxDataTable object and dataview is the detail FrxDataView object. Both
objects related by “id” field.
FastReport Studio provides ability of calling external functions from report. As you know,
FastReport shipped with built-in script engine, named FastScript, but sometime, due to some
reason, you need implement some function into your code. With FastReport it is very easy - you
just need to register that function and catch OnUserFunction event.
Registering function is very simple:
report.AddFunction(
"function SpellValue(Value: String): String;", // Function definition
"User functions", // Function category
"The value spelled out function"); // description
Catching event is slightly different for different platform. If you are using FR Studio
within not managed C++ projects, in this case you need to make wrapper for IfxrReportEvens
interface. We are strongly recommend use ATL IDispatchImpl for such wrapper (see
Demo/VisualC++/callbacks demo). In case of managed code, we are recommends use the
delegates object.
Now time to look into OnUserFunction event:
HRESULT OnUserFunction(
[in] BSTR MethodName,
[in] VARIANT Params,
[out, retval] VARIANT* ResultValue);
MethodName is the name of requested function. Event handler may implement several
functions, which distinguished by the MethodName argument.
Params is the parameters for the called function. The parameters shipped within
VARIANT SafeArray object. That means that the fist function’s argument is first the array
element, second is second, and so on. The .Net framework provides System.Aray object, which is
useful for fast and convenient access to the user function’s arguments.
ResultValue is the result returning by the function.
default:
return "Undefined user function: " + FunctionName;
}
}
Sometime you may need to set text or picture on report page from application program. There is
only one way to do it – use OnBeforePrint event. This event occurs for every report object every
time before drawing it on report page. This event conveys one parameter – Sender with type of
IfrxReportComponent. The IfrxReportComponent is base interface for every FastReport object.
Therefore, you can analyze the Sender parameter and detect which object generated
OnBeforePrint event.
Following example shows how to things works:
// Setting picture
if (Sender.Name == "Picture1")
{
bmp = new Bitmap(@"..\..\2.bmp");
IfrxPictureView pict = (IfrxPictureView) Sender;
In opposite to OnBeforePrint event, the OnAfterPrint event occurs after drawing it on report
page. Therefore, we can use this event for freed resources, which was allocated in OnBeforePrint
event.
private void Report_OnAfterPrint(IfrxComponent Sender)
{
if (Sender is FastReport.IfrxPictureView)
{
bmp = null;
}
}
Sometimes you need to access to report objects, such as memos, bands, and so on. You can
easily request interfaces to these objects by its names. FastReport provides two forms of
FindObject method. First, one is the FindObject method of TfrxReport object. It allows
requesting any object within report. Second, one is FindObject method of IfrxComponent. It
allows requesting any child object, which lies behind requested object, by its name.
FastReport Studio – Programmer’s manual 42
Visual C++
IfrxComponent * pComponent;
IfrxComponent * pMemoComp;
IfrxMemoView * pMemoObj;
IfrxReportPtr pReport(__uuidof(TfrxReport));
pReport->LoadReportFromFile("somereport.fr3");
pMemoObj->Release();
pMemoComp->Release();
pComponent->Release();
C#.NET,
TfrxReportClass report;
report.LoadReportFromFile("somereport.fr3");
Finally, new method added to IfrxReport interface – FindObject. This method allows finding any
report object by its name. For example, to find “Memo3” object just use following form:
Visual C++
/////////////////////////////////////////
FastReport Studio – Programmer’s manual 44
/////////////////////////////////////////
// base interfaces
IfrxComponent * pComponent = NULL;
IfrxComponent * pReportPageComponent = NULL;
/////////////////////////////////////////
// query base interface of IfrxReport
hr = pReport->QueryInterface(__uuidof(IfrxComponent), (PVOID*) &pComponent);
if (FAILED(hr)) _com_issue_errorex(hr, pReport, __uuidof(pReport));
/////////////////////////////////////////
// create report page object
pReportPageComponent = pReport->CreateReportObject(
pComponent, // parent object
__uuidof(IfrxReportPage), // new object type
"DynamicPage"); // new object name
Visual Basic 6
Creates report object with VB 6 is different. Due to impossibility of using UUID in VB6 the
CreateReportObjectEx must be used instead of CreateReportObject.
This method is similar to CreateReportObject except that the ObjectType argument is a string,
which represent object name. There a simple rule for convert interface name to an ObjectType.
All object type name make from interface name by changing leading ‘I’ character to the ‘T’
character. For example, IfrxMasterData -> TfrxMasterData, IfrxMemmoView ->
TfrxMemoView. Code below illustrates creatation report page.
Objects hierarchy
This topic describes an object’s hierarchy of Fast Report Studio interfaces. The means of this
topic is to provide the object’s inheritance relation information to the application programmer.
The FR Studio designed in manner that most interfaces implements only object specific
properties and methods. To use properties and methods that are more common you may need
request the parent object’s interface. Let us give somes examples how to request interface in a
different programming languages. The following examples imply that `memo` is an object that
defined by IfrxMemoView interface.
C#:
IfrxComponent * pComponent;
memo->QueryInterface(__uuidof(IfrxComponent), (void**) &pComponent);
pComponent->Height = 35.3;
pComponent->Release();
VB.NET:
VB6:
Finally, see the “Objects hierarchy” outline tree to see object inheritance layout.
IfrxComponent
The IfrxComponent is the base interface for many objects of the Fast Report. It consists of
several properties and methods that responsible for object’s position in the report. Thereferoe, to
set object size and position a programmer should obtain this interface from object and set it
properties. In addition, IfrxComponent has a name property, which stores an object user name
that assigned to object, f.e. “Memo1”, “Memo2”, “MasterData1”, and so on.
Finally, the createReportObject method of IfrxReport interface getd this interface for any newly
FastReport Studio – Programmer’s manual 46
created object. To set object specific properties you need to obtain object specific interface in
manner described above.
This method returns pointer to interface IfrxComponent of child object referenced by index.
Index is an integer variable in range from zero to objects count minus one.
HRESULT _stdcall BaseName([out, retval] BSTR* Value);
This method searches for object by its name. If object found then method returns interface
IfrxComponent to that object. Note that this interface шы able to find only child objects of object
that calling this method. That means that you cannot find report page if you call this method on
band object. We recommend use FindObject method of IfrxReport interface instead of this
method.
IfrxReport
This interface aggregates properties and methods of the TfrxReport object – the main one object
of FastReport. See “FastReport objects review” part “TfrxReport” chapter for detail description
of the TfrxReport and its interfaces. Examples on using TfrxReport could be found in “Working
with TfrxReport object” chapter.
IfrxDataSet
IfrxDataSet is the base interface for any data access object of the FastReport. It is not necessary
to use this interface to make report, but it can be usefult for access data through biltin
FastReport’s database engine.
NOTE for .NET programmers: Please keep in mind a differency of terminology between
FastReport and ADO.NET. The FR DataSet is analogue of DataTable.NET.
interface IfrxDataSet : IDispatch {
Gets value of field of current record of dataset. Field name is selected by Fieldname argument.
HRESULT _stdcall CurrentRecordNo([out, retval] long* Value);
IfrxUserDataSet
This interface aggregates properties of the TfrxUserDataSet object. See “FastReport objects
review” part “TfrxUserDataset” chapter for detail description of the TfrxUser dataset and its
FastReport Studio – Programmer’s manual 49
IfrxADOTable
This interface aggregates properties and methods of the TfrxADOTable object. See “FastReport
objects review” part “TfrxADOTable” chapter for detail description of the TfrxADOTable
dataset and its interfaces. This interface is descendant of IfrxDataSet interface.
IfrxADOQuery
This interface aggregates properties and methods of the TfrxADOQuery object. See “FastReport
objects review” part “TfrxADOQuery” chapter for detail description of the TfrxADOQuery
dataset and its interfaces. This interface is descendant of IfrxDataSet interface.
IfrxADODatabase
This interface aggregates properties and methods of the TfrxADODatabase object. See
“FastReport objects review” part “TfrxADODatabase” chapter for detail description of the
TfrxADODatabase object and its interfaces.
IfrxPage
This interface is the base interface for IfrxReportPage. It includes only single property, which
controls page visibility.
interface IfrxPage : IUnknown {
IfrxReportPage
This interface controls the report page layout and properties. This interface controls a page
template, not a prepared page. Note that single template page can generate many prepared page
because bands can include many data records.
interface IfrxReportPage : IDispatch {
FastReport Studio – Programmer’s manual 50
Contrls printer’s tray for priniting other pages. Other page can appear if DataBand includes lot of
records, so template page can generate many prepared pages.
HRESULT _stdcall BottomMargin([out, retval] double* Value);
HRESULT _stdcall BottomMargin([in] double Value);
Controls column’s position. The format of this property is a string with CR/LF terminated fields.
Each field is string representation of the foat number.
HRESULT _stdcall DataSet([out, retval] IfrxDataSet** Value);
HRESULT _stdcall DataSet([in] IfrxDataSet* Value);
Controls horizontal guides for designer mode. The format of this property is a string with CR/LF
FastReport Studio – Programmer’s manual 51
This property allows change page scale in design mode for manually fix bands that are exids of
the page bounds.
HRESULT _stdcall LeftMargin([out, retval] double* Value);
HRESULT _stdcall LeftMargin([in] double Value);
This property allows economizing on paper. For example, if two pages have bands that an
occupied only half page and this property set to TRUE, then FR will put both bands into single
page.
HRESULT _stdcall RightMargin([out, retval] double* Value);
HRESULT _stdcall RightMargin([in] double Value);
Controls subreport object that is IfrxView object, which embed IfrxReportPage object. See
IfrxSubreport description for additional information.
HRESULT _stdcall TitleBeforeHeader([out, retval] VARIANT_BOOL* Value);
HRESULT _stdcall TitleBeforeHeader([in] VARIANT_BOOL Value);
By default band’s title printed after band’s header. This property reverses order of band’s title
FastReport Studio – Programmer’s manual 52
Controls vertical guides for designer mode. The format of this property is a string with CR/LF
terminated fields. Each field is string representation of the foat number.
HRESULT _stdcall BackPickture([out, retval] OLE_HANDLE* Value);
HRESULT _stdcall BackPickture([in] OLE_HANDLE Value);
This property controls page background picture. Value type is a picture handle.
};
IfrxView
This is an ancestor interface for many report objects that printning on page or bands. It stores
properties that are common for descendant objects.
interface IfrxView : IDispatch {
Gets/sets an user defined tag. This tag is very useful for interactive reports.
For example, tag field can be filled in FastScript or in OnBeforePrint event whith unique value.
This value can be used later in OnClieckObject event. You can use this property for any other
purposes.
HRESULT _stdcall URL([out, retval] BSTR* Value);
HRESULT _stdcall URL([in] BSTR Value);
Gets/sets URL property. If this property is set and user click in preview window on an object,
which is descendant of IfrxView, then this URL opens in the default explorer window.
HRESULT _stdcall DataSetName([out, retval] BSTR* Value);
HRESULT _stdcall DataSetName([in] BSTR Value);
ms_DontShift
sm_ShiftAlways
sm_WhenOverlapped
This property determines the alignment of the object relative to band or page.
ba_None
ba_Left
ba_Right
ba_Center
ba_Width
ba_Bottom
ba_Client
};
IfrxMemoView
This interface describes the memo-view objects. The purpose of MemoView is displaying
text, database field values, expressions, and so on. This interface is descendant of IfrxView
interface. IfrxMemoView interface can be used as argument of CreateObject method of
IfrxReport interface, so MemoView object can be created dynamically by application.
Note that the memo-views that are located on the data bands are drawing as many times as
count of records in the dataset assigned to that band.
interface IfrxMemoView : IDispatch {
Gets/sets the automatical width attribute. If this property set to true, then memo’s width changed
to fit width of its text.
HRESULT _stdcall AllowExpressions([out, retval] VARIANT_BOOL* Value);
HRESULT _stdcall AllowExpressions([in] VARIANT_BOOL Value);
This property determines whether the text object may contain expressions inside the text. Default
value is true. If this properties is set to false, then no any expressions wil be calculated in this
field – it disables using variables, FastScript expressions, and other data transformation. I.e. this
FastReport Studio – Programmer’s manual 54
This property determines whether the text object may contain expressions inside the text.
HRESULT _stdcall BrushStyle([out, retval] TfrxBrushStyle* Value);
HRESULT _stdcall BrushStyle([in] TfrxBrushStyle Value);
The style of the brush used for object's background. Avaulable brush styles described in table
below.
SolidBrush
ClearBrush
GorizontalBrush
VericalBrush
FDiagonalBrush
BDiagonalBrush
CrossBrush
DiagCrossBrush
Determines whether the text should be clipped inside the objects bounds
HRESULT _stdcall Color([out, retval] long* Value);
HRESULT _stdcall Color([in] long Value);
Get/set color value of the memo’s text. Color is 32-bit value. See “MSDN Platform SDK”
document, “RGB” topic for description of this value.
HRESULT _stdcall DataField([out, retval] BSTR* Value);
HRESULT _stdcall DataField([in] BSTR Value);
This property specifies the field from which the object gets data.
HRESULT _stdcall DataSet([out, retval] IfrxDataSet** Value);
HRESULT _stdcall DataSet([in] IfrxDataSet* Value);
This propertн controls the text object that will show the text that not fit in the current object.
HRESULT _stdcall Font([out, retval] IfrxFont** Value);
The read-only property, which returns interface to the font attributes of the object. See
description of IfrxFont interface in ‘Auxilary interfaces’ chapter.
HRESULT _stdcall Frame([out, retval] IfrxFrame** Value);
The read-only property, which returns interface to the frame attributes of the object. See
description of IfrxFrame interface in ‘Auxilary interfaces’ chapter.
HRESULT _stdcall GapX([out, retval] double* Value);
HRESULT _stdcall GapX([in] double Value);
This property controls the left indent of the text inside memo.
HRESULT _stdcall GapY([out, retval] double* Value);
HRESULT _stdcall GapY([in] double Value);
This property controls the top indent of the text inside memo.
HRESULT _stdcall HAlign([out, retval] frxHAlign* Value);
HRESULT _stdcall HAlign([in] frxHAlign Value);
Controls horizontal align of the memo’s text. Align modes are described in the table below.
hAlignLeft Horizontal align memo’s text to left
hAlignRight Horizontal align memo’s text to right
hAlignCenter Horizontal align memo’s text in center
hAlignBlock Justify text in memo
This property controls displaying zeros on the memo. This property is meaningless for non-
numeric memos formats.
HRESULT _stdcall Highlight([out, retval] IfrxHighlight** Value);
The read-only property, which returns interface to the conditional highlight attributes. See
description of IfrxHighlight interface in ‘Auxilary interfaces’ chapter.
HRESULT _stdcall LineSpacing([out, retval] double* Value);
HRESULT _stdcall LineSpacing([in] double Value);
FastReport Studio – Programmer’s manual 56
This property holds memo text. Value could be any text or expression.
HRESULT _stdcall ParagraphGap([out, retval] double* Value);
HRESULT _stdcall ParagraphGap([in] double Value);
This property controls using parent object’s font for memo. If propery is set to true, then memom
using parent object’s font.
HRESULT _stdcall Rotation([out, retval] long* Value);
HRESULT _stdcall Rotation([in] long Value);
This attribute determines whether the text object inserts soft carriage returns so text wraps at the
right margin.
HRESULT _stdcall VAlign([out, retval] frxVAlign* Value);
HRESULT _stdcall VAlign([in] frxVAlign Value);
FastReport Studio – Programmer’s manual 57
Gets/sets vertical align mode. Align modes are described in the table below.
vAlignTop Vertical align memo’s text to the top.
vAlignBottom Vertical align memo’s text to the bottom.
vAlignCenter Vertical align memo’s text to the center.
Gets/sets view’s stretch mode. Stretch mode described in the table below.
sm_DontStretch Do not stretch view – use actual size of view
sm_ActualHeight Change view’s height to show all contents of the view.
sm_MaxHeight Maximize view’s height until top bound of the next object.
};
IfrxPictureView
This interface controls PictureView objects of the report. These objects used for displaying
pictures on the report. This interface is descendant of IfrxView interface. This interface can be
used as argument in CreateObject method of IfrxReport interface, so PictureView object can be
created dynamically by application.
interface IfrxPictureView : IDispatch {
This property provides access to picture by its handle. You can set pictures by means of
aplication by setting handle value in OnBeforePrintEvent of IfrxPictureView object.
HRESULT _stdcall LoadViewFromStream([in] IUnknown* Stream);
HRESULT _stdcall SaveViewToStream([in] IUnknown* Stream);
This interface provides access to picture over streams. You can set pictures by means of
application by calling LoadViewFromStream method in OnBeforePrintEvent of IfrxPictureView
object. This method supports COM and .NET streams.
};
IfrxChartView
This interface controls the built-in charts object, which implemented on top of TeeChart library.
This interface is descendant of IfrxView interface. IfrxChartView interface can be used as
argument of CreateObject method of IfrxReport interface, so ChartView object can be created
dynamically by application.
Note that ChartView interfaces provide limited base functionality. Most of properties you can set
only in FR Designer mode.
interface IfrxChartView : IDispatch {
FastReport Studio – Programmer’s manual 58
Get chart series item by its number. The out value is the IfrxSeriesItem interface to the series
object. See description of IfrxSeriesItem interface below.
HRESULT _stdcall AddSeriesItem(
[in] frxSeriesType SeriesType,
[out, retval] IfrxSeriesItem** NewItem);
Add new series item into ChartView and return its interface. Series item type is set by SeriesType
argument, which have one of following values:
frxSeriesLine, frxSeriesArea, frxSeriesPoint, frxSeriesBar, frxSeriesHorizBar,
frxSeriesPie, frxSeriesGantt, frxSeriesFastLine, frxSeriesArrow, frxSeriesBubble,
frxSeriesChartShape, frxSeriesHorizArea, frxSeriesHorizLine, frxSeriesPolar,
frxSeriesRadar, frxSeriesPolarBar, frxSeriesGauge, frxSeriesSmith, frxSeriesPyramid,
frxSeriesDonut, frxSeriesBezier, frxSeriesCandle, frxSeriesVolume,
frxSeriesPointFigure, frxSeriesHistogram, frxSeriesHorizHistogram, frxSeriesErrorBar,
frxSeriesError, frxSeriesHighLow, frxSeriesFunnel, frxSeriesBox, frxSeriesHorizBox,
frxSeriesSurface, frxSeriesContour, frxSeriesWaterFall, frxSeriesColorGrid,
frxSeriesVector3D, frxSeriesTower, frxSeriesTriSurface, frxSeriesPoint3D,
frxSeriesBubble3D, frxSeriesMyPoint, frxSeriesBarJoin, frxSeriesBar3D,
This read-only property gets count of series item into ChartView object.
HRESULT _stdcall View3D([out, retval] VARIANT_BOOL* Value);
HRESULT _stdcall View3D([in] VARIANT_BOOL Value);
This property controls the 3D depth visual effect for the chart walls.
HRESULT _stdcall LeftAxis([out, retval] IfrxChartAxis** Value);
HRESULT _stdcall BottomAxis([out, retval] IfrxChartAxis** Value);
These two properties return interfaces for Lft and bottom axis respectively.
};
The chart series defined by IfrxSeriesItem interface and controlled through it. The methods and
properties provided by IfrxSeriesItem are common for all series types.
interface IfrxSeriesItem : IUnknown {
This property controls charts’s dataset. Description of IfrxDataSet interface given in “Objects
hierarchy” chapter.
HRESULT _stdcall DataSetName([out, retval] BSTR* Value);
These properties controls data source for sieries item for X, Y, Z, and other dimensions
respectively.
HRESULT _stdcall XValues([out, retval] BSTR* Value);
HRESULT _stdcall XValues([in] BSTR Value);
HRESULT _stdcall YValues([out, retval] BSTR* Value);
HRESULT _stdcall YValues([in] BSTR Value);
HRESULT _stdcall ZValues([out, retval] BSTR* Value);
HRESULT _stdcall ZValues([in] BSTR Value);
HRESULT _stdcall FourthValues([out, retval] BSTR* Value);
HRESULT _stdcall FourthValues([in] BSTR Value);
HRESULT _stdcall FifthValues([out, retval] BSTR* Value);
HRESULT _stdcall FifthValues([in] BSTR Value);
HRESULT _stdcall SixthValues([out, retval] BSTR* Value);
HRESULT _stdcall SixthValues([in] BSTR Value);
These properties hold the values for series item for X, Y, Z, and other dimensions respectively.
Note that these functions are alternative for “Source” properties and can be used for manually set
values to series.
HRESULT _stdcall TopNCaption([out, retval] BSTR* Value);
HRESULT _stdcall TopNCaption([in] BSTR Value);
This property controls series item title. It will appear on legend window.
};
This property controls the automatic zoom of axis. The default value is true. Set value to false
before setting minimum and maximum values. Minimum and maximum values are usefule for
manual chart zooming.
HRESULT _stdcall Minimum([out, retval] double* Value);
HRESULT _stdcall Minimum([in] double Value);
IfrxShapeView
This interface controls the ShapeView object. This interface is descendant of IfrxView interface.
IfrxShapeView interface can be used as argument of CreateObject method of IfrxReport
interface, so ShapeView object can be created dynamically by application.
interface IfrxShapeView : IDispatch {
This property controls shape type. The ShapeType can take the one of the folowing values:
skRectangle, skRoundRectangle, skEllipse, skTriangle, skDiamond, skDiagonal1,
skDiagonal2.
The read-only property, which returns interface to the frame attributes of the object. See
description of IfrxFrame interface in ‘Auxilary interfaces’ chapter.
};
IfrxOLEView
This interface controls the OLEView object. This interface is descendant of IfrxView interface.
IfrxOLEView interface can be used as argument of CreateObject method of IfrxReport interface,
FastReport Studio – Programmer’s manual 61
This read-only propery gives interface to the OLE container which is standard ActiveX interface.
HRESULT SizeMode([out, retval] long* Value);
HRESULT SizeMode([in] long Value);
IfrxRichView
This interface controls the RichView object. This interface is descendant of IfrxView interface.
IfrxRichView interface can be used as argument of CreateObject method of IfrxReport interface,
so ShapeView object can be created dynamically by application.
interface IfrxRichView : IDispatch {
IfrxSubreport
This interface controls the Subreport object. Subreport object is a report page that embedded into
Subreport object. This interface is descendant of IfrxView interface. IfrxSubreport interface can
be used as argument of CreateObject method of IfrxReport interface, so Subreport object can be
created dynamically by application.
interface IfrxSubreport : IDispatch {
This property controls the subreport page object which given as IfrxReportPage interface.
IfrxReportPage interface described in “Object hierarchy” chapter.
HRESULT _stdcall PrintOnParent([out, retval] VARIANT_BOOL* Value);
HRESULT _stdcall PrintOnParent([in] VARIANT_BOOL Value);
};
IfrxBand
IfrxBand interface is an ancestor for all band objects. It stores properties that are common for
descendant objects.
interface IfrxBand : IDispatch {
This property determines whether the band may split its contents across pages
HRESULT _stdcall KeepChild([out, retval] VARIANT_BOOL* Value);
HRESULT _stdcall KeepChild([in] VARIANT_BOOL Value);
This property determines whether the band will be printed together with its child
HRESULT _stdcall OutlineText([out, retval] BSTR* Value);
HRESULT _stdcall OutlineText([in] BSTR Value);
This property controls the text that will be shown in the preview outline control
HRESULT Overflow([out, retval] VARIANT_BOOL* Value);
HRESULT Overflow([in] VARIANT_BOOL Value);
If this property is set, then it starts a new page before printing a band.
HRESULT _stdcall Stretched([out, retval] VARIANT_BOOL* Value);
HRESULT _stdcall Stretched([in] VARIANT_BOOL Value);
This property determines whether the child band will be printed if its parent band is invisible.
HRESULT Vertical([out, retval] VARIANT_BOOL* Value);
HRESULT Vertical([in] VARIANT_BOOL Value);
IfrxDataBand
This property determines whether the footer band should be shown after each data row
HRESULT _stdcall KeepFooter([out, retval] VARIANT_BOOL* Value);
HRESULT _stdcall KeepFooter([in] VARIANT_BOOL Value);
This property determines whether the band will be printed together with its footer
HRESULT _stdcall KeepHeader([out, retval] VARIANT_BOOL* Value);
HRESULT _stdcall KeepHeader([in] VARIANT_BOOL Value);
This property determines whether the band will be printed together with its header
HRESULT _stdcall KeepTogether([out, retval] VARIANT_BOOL* Value);
HRESULT _stdcall KeepTogether([in] VARIANT_BOOL Value);
This property determines whether the band will be printed together with all its subbands
HRESULT _stdcall PrintIfDetailEmpty([out, retval] VARIANT_BOOL* Value);
HRESULT _stdcall PrintIfDetailEmpty([in] VARIANT_BOOL Value);
This property determines whether the databand will be printed if its subband is empty
HRESULT _stdcall RowCount([out, retval] long* Value);
HRESULT _stdcall RowCount([in] long Value);
In opposite to DataSet property this method unlink dataset from the band.
FastReport Studio – Programmer’s manual 64
};
IfrxMasterData
The master data band object.
This interface does not provide any methods or or properties itself and used only for
CreateObject method of IfrxReport interface. In other words, this interface is mean for creation
the report title by application code. IfrxMasterData is a descendant of IfrxDataBand, so
IfrxDataBand interface can be requested and all its properties will be available.
IfrxDetailData
The detail data band object.
This interface does not provide any methods or or properties itself and used only for
CreateObject method of IfrxReport interface. In other words, this interface is mean for creation
the report title by application code. IfrxDetailData is a descendant of IfrxDataBand, so
IfrxDataBand interface can be requested and all its properties will be available.
IfrxSubdetailData
The subdetail data band object.
This interface does not provide any methods or or properties itself and used only for
CreateObject method of IfrxReport interface. In other words, this interface is mean for creation
the report title by application code. IfrxSubdetail is a descendant of IfrxDataBand, so
IfrxDataBand interface can be requested and all its properties will be available.
IfrxDataBand4
The 4-th level embedded data band.
This interface does not provide any methods or or properties itself and used only for
CreateObject method of IfrxReport interface. In other words, this interface is mean for creation
the report title by application code. IfrxDataBand4 is a descendant of IfrxDataBand, so
IfrxDataBand interface can be requested and all its properties will be available.
IfrxDataBand5
The 5-th level embedded data band.
This interface does not provide any methods or or properties itself and used only for
CreateObject method of IfrxReport interface. In other words, this interface is mean for creation
the report title by application code. IfrxDataBand5 is a descendant of IfrxDataBand, so
IfrxDataBand interface can be requested and all its properties will be available.
IfrxDataBand6
The 6-th level embedded data band.
This interface does not provide any methods or or properties itself and used only for
CreateObject method of IfrxReport interface. In other words, this interface is mean for creation
the report title by application code. IfrxDataband6 is a descendant of IfrxDataBand, so
IfrxDataBand interface can be requested and all its properties will be available.
FastReport Studio – Programmer’s manual 65
IfrxReportTitle
This interface does not provide any methods or or properties itself and used only for
CreateObject method of IfrxReport interface. In other words, this interface is mean for creation
the report title by application code. IfrxReportTitle is a descendant of IfrxBand, so IfrxBand
interface can be requested and all its properties will be available.
IfrxReportSummary
This interface does not provide any methods or properties itself and used only for CreateObject
method of IfrxReport interface. In other words, this interface is mean for creation the report
summary by application code. IfrxReportSummary is a descendant of IfrxBand, so IfrxBand
interface can be requested all its properties will be available.
IfrxHeader
This property determines whether the header band will be reprinted on new page
};
IfrxFooter
This interface does not provide any methods or properties itself and used only for CreateObject
method of IfrxReport interface. In other words, this interface is mean for creation the report
summary by application code. IfrxFooter is a descendant of IfrxBand, so IfrxBand interface can
be requested all its properties will be available.
IfrxPageHeader
interface IfrxPageHeader : IDispatch {
IfrxPageFooter
interface IfrxPageFooter : IDispatch {
IfrxColumnHeader
This interface does not provide any methods or properties itself and used only for CreateObject
method of IfrxReport interface. In other words, this interface is mean for creation the report
summary by application code. IfrxColumnHeader is a descendant of IfrxBand, so IfrxBand
interface can be requested all its properties will be available.
IfrxColumnFooter
This interface does not provide any methods or properties itself and used only for CreateObject
method of IfrxReport interface. In other words, this interface is mean for creation the report
summary by application code. IfrxColumnFooter is a descendant of IfrxBand, so IfrxBand
interface can be requested all its properties will be available.
IfrxGroupHeader
interface IfrxGroupHeader : IDispatch {
IfrxGroupFooter
interface IfrxGroupFooter : IDispatch {
IfrxChild
This interface does not provide any methods or properties itself and used only for CreateObject
method of IfrxReport interface. In other words, this interface is mean for creation the report
summary by application code. IfrxChild is a descendant of IfrxBand, so IfrxBand interface can be
requested all its properties will be available.
IfrxOverlay
This interface does not provide any methods or properties itself and used only for CreateObject
method of IfrxReport interface. In other words, this interface is mean for creation the report
summary by application code. IfrxOverlay is a descendant of IfrxBand, so IfrxBand interface can
be requested all its properties will be available.
FastReport Studio – Programmer’s manual 67
Auxiliary interfaces
This topic describes auxiliary interfaces that introduce to implement some extended properties of
report objects.
IfrxFont
IfrxFrame
IfrxHighlight
This read-only property gets IfrxFont interface, which controls highlite font.
};
FastReport Studio – Programmer’s manual 69
Deploying Applications
Deployment is the process by which you distribute a finished application to be installed on other
computers.
Before you run your application on another computer, which have no FR Studio installed, you
should copy the FastReport dynamic library and language resource file[s] on the that computer.
Default installation path: "C:\Program Files\FastReports\FastReport Studio\Bin\"
In addition, you should register dynamic library on target computer by following command at the
shell prompt:
regsvr32.exe FastReport.dll
Finally, you need set the FastReport language resource in the target computer registry:
[HKEY_CURRENT_USER\Software\Fast Reports\Resources]
"Language"="English"