At 12:41 AM 11/24/2010, Michael J. Sinclair wrote:

Hi All,

I have to make a report. It does not to look too fancy. The app that use the
report creates a bunch of variables, all text. Each variable can be from 0
charters long to a few hundred characters. Each Variable represents a paragraph
on the report. Variable v1 is always the first paragraph, v2 is always the
second paragraph etc. some of the variables are equal to null, so I want to skip
those paragraphs, but not have a big space on my report. Each line in each
paragraph should be no more than 80 characters, and the paragraphs should
support word wrapping in case the length of the variable exceeds 80 characters.
No line should be any longer than 80 characters.

No need for headers, footers. might be nice to have page numbers but even that
is not critical.

This was easy to do in Rbase for DOS, but now I want to do it in Rbase for
windows, version 7.6.

I need to be able to print the report to file that I can read with Notepad.

How do I create such a report? Is there a sample that is similar??

Mike


Mike,

Here's how:

01. Define a variable (NOTE/VARCHAR data type) that combines all variables as
    concatenated expression, to be evaluated/calculated on appropriate band.

    Example:

    vCombined = (.vVar1+(CHAR(013))+.vVar2+(CHAR(013))+.vVar3+(CHAR(013)))

    This will keep each variable as separate line.

02. Place a Variable Memo control on appropriate band and make sure to check
    the following properties:

    Right-click on Variable Memo Control and select the following options:

    . Stretch
    . Suppress Empty Values
    . Transparent (Default)
    . Visible (Default)

03. When printing report to a file, use "Report Emulation Text File" or
    "Text File" accordingly, to achieve your goal.

    Example: (ETXT)

    PRINT reportname OPTION ETXT +
    |FILENAME reportname.TXT +
    |SHOW_CANCEL_DIALOG OFF +
    |OPEN ON
    RETURN

The Report Emulation Text File (ETXT) option allows you to print the exact
    report as plain readable text including all bands, such as Report Header,
Page Header, Break Headers, Break Footers, Page Footers and Report Footers,
    if any.

    Example: (TXT)

    PRINT reportname +
    OPTION TXT +
    |FILENAME reportname.TXT +
    |SHOW_CANCEL_DIALOG OFF +
    |OPEN ON
    RETURN

The TXT "Text File" option allows you to define a particular band to print
    the data as Comma Delimited, Tab Delimited or Fixed Length file. This is
    the perfect option to export selective and/or summarized data used in a
    report band.

    Caution:

This option requires the report setup to define the exact band to be print
    as text file.

    Report Designer | File | Print to Text File Setup ...

    If a user attempts to PRINT the report as Text File (OPTION TXT) without
    first having defined the Text File Setup in Report Designer, the program
    will return an -ERROR- message and not just write a zero length file.

The same rule applies when printing the report as Text File using the Print
    to a File option from the Database Explorer.

    Database Explorer | Reports | Run Report | Print Target .. File

That's all there is to it!

Very Best R:egards,

Razzak.


Reply via email to