Frequently Asked Questions

Content

  1. Does RTFReport work with C++ Builder 3.0?
  2. Which version of BDE does the demo require?
  3. Where can I find RTF format description?
  4. I use SQL server for data storage. How can I organize data access with SQL queries rather than direct tables looping?
  5. How can I turn off these annoying data replacements with minus sign?

  1. Does RTFReport work with C++ Builder 3.0?

    No, TRTFReport works with C++ Builder 4.0 and greater (when it will be available). This is because it uses some features available in Delphi 4 or greate. I'm not plan to re-write sources to be compatible with previous versions of Delphi or C++ Builder

  2. Which version of BDE does the demo require?

    There are three demos included into distribution (Demo folder). Two of them (Demo\Builder\ and Demo\Delphi.BDE\) requires BDE to be installed and configured. As for the question: All samples were tested on BDE v4.0, 5.0 and 5.01. And I believe there should be no problem with later BDE versions.
    The third demo (Demo\Delphi.DBF\) uses TDBF component, which implements MS® FoxPro .DBF access engine. So you need no additional tools or components to run this demo. Click here to download compiled DemoDBF demos.

  3. Where can I find RTF format description?

    You may find detailed RTF info and RTF renderer demo in Microsoft® Developer Network (MSDN). A part of MSDN documentation is also included in TRTFReport distribution (see DOCs\ folder).

  4. I use SQL server for data storage. How can I organize data access with SQL queries rather than direct tables looping?

    You may follow in a number of ways. Below you will find two of them:

    1. Create TQuery component for each of SQL statement you use in template and return it by alias from OnGetTable event handler as it was implemented in DelphiBDE and Builder samples. This requires a bit of code but makes your program rigid for templates development because of each new query requires program modification

    2. Another way I would recommend is to create program-independent query subsystem. The steps are:

    • Create "variables" subsystem by inplementing SET('VariableName', Value); tag in OnTag event handler. SET registers VariableName into internal collection and/or assign Value to it.
    • At the end of OnTag handler implement searching through collection and return values if requested variable was found.
    • In a handler of OnGetTable event search for requested table name in variables collection. If such a variable is found, dynamically create TQuery object and assign variable's value to TQuery.SQL property. That's all

    Working with a queries in a such manner give you a lot of attractive features. First, you may use variables in your templates. Then, you may access SQL database using this scenario ("hidden" text is grayed):

    ...
    SET('CID',10);
    ...
    Customer id: CID;
    SET('Customer',strCat('SELECT * FROM customers 
      WHERE CustomerID=',CID));
    Customer name: Customer.Name;
    Customer address: Customer.Address;
    ...
    
  5. How can I turn off these annoying data replacements with minus sign?

    Starting with version 1.02 of RTFReport there are two syntaxes for accessing data tables: TableName.FieldName and TableName..FieldName

    • TableName.FieldName returns data in a ready-to-print form. This means that empty values (Nulls) are replaced with minus sign ('-'). So if you use these values as a parameters for function calling, there are errors possible.
    • TableName..FieldName always returns correct data. Any null's are to be replaced with default values of zero (0), false, current date/time or empty string ('') according to field data type.

RTF Report
Home
RTF Report
F.A.Q.
Download
  
  
 Mobile

©1998-24
Alexander Eltsyn