RETURN TO THE ENTRANCE HOME PAGE

REPORT
Use REPORT to change the way Entrance formats results from a SQL SELECT statement.  The general form of a REPORT is:

    REPORT  report_type
           ... report setup instructions ...
    SELECT
         ... rest of MySQL select statement 

This example demonstrates the use of column types:
 
   REPORT  
      AUTO, SCIENTIFIC, PLAIN, DECIMAL "#.000", MONEY
   SELECT
      jan AS 'auto',  mar AS 'scientific', apr AS 'plain', may AS 'decimal', 
         june * 100000000000 AS 'money'
     FROM CPI LIMIT 5;
and here is the output it produces:

    auto  scientific  plain  decimal  money                  
    ----  ----------  -----  -------  --------------------   
      9.8       9.8E0     10    9.700    980,000,000,000.00   
       10       9.9E0     10    9.900    990,000,000,000.00   
     10.1       9.9E0     10   10.100  1,010,000,000,000.00   
     10.4      1.05E1     11   10.700  1,080,000,000,000.00   
     11.7       1.2E1     13   12.800  1,300,000,000,000.00   

REPORT Syntax 

  REPORT  [TEXT, HTML, TABBED, CSV, RAWHTML, RAWTEXT]
    [AUTO | TEXT | SCIENTIFIC | PLAIN | DECIMAL (format) | MONEY] [,...]
  [WITH]
    [TITLE "string"] [,...]
    [NOTE  "string"] [,...]
    
    [MARGINS n]
    [NO HEADING]
    [NO BLANKLINE]
    [FONT font_family  font_style  font_size]
    [FOREGROUND (color)]
    [BACKROUND (color)]

    [PAGENAME "(name)"]
    [STYLE "<style>...</style>"]
    [ID    "string"]
    [CLASS “string”]
    [HEAD  "<head>...</head>"]
SELECT 
   (MySQL select statement body);

Report Types
The report type determines the overall look of a single table.  

By default, Entrance makes simple tables using a monospaced font.  This is the TEXT report type.  Use keywords  FOREGROUND and BACKGROUND to change colors to any of the colors listed here.  Change the font using FONT. 

Use REPORT HTML to generate an HTML TABLE.  Entrance will use the HTML  tags:  <table>, <tr>, and <td> to format the table.  You can change its look using CSS styles.  Use the STYLE keyword to insert a single CSS style into the HTML HEAD section, or use HEAD to completely replace the HEAD section.

TABBED generates columns separated by tabs.

CSV generates columns separated by tabs.

Both RAWHTML and RAWTEXT generate “raw”  query output.  Use RAWHTML when you want the text displayed using an HTML container, use RAWTEXT when you want it displayed as simple text.

Column Types
The list of report series types, which can also be omitted, specifies formats to use for columns in the report.  

Each report_series_type can be:
 AUTO | SCIENTIFIC | PLAIN | MONEY | DECIMAL (format)

AUTO is the default and means "make a reasonable choice".

SCIENTIFIC shows double values in scientific format.

PLAIN  shows integer values without a decimal point

MONEY shows double values comma formatted with two decimals using the current locale format.  You can override the locale formats from the Misc panel in the Preferences dialog.

DECIMAL formats values using a DecimalFormat 

The last type in the list becomes the default for columns without a type.

Titles and Notes
Titles go above the table and notes go below it.

All of the text in a chart is generated using a single font, which can be specified using the FONT keyword:

      FONT (family) (style) (size)

MONOSPACED,  SERIF and SANSSERIF are font families available on all platforms.   Style can be BOLD, ITALIC or PLAIN.  Size is the font size in points.

Other Report Settings
MARGINS sets the number of blank spaces to leave for the left and right margins.

NO BLANKLINE omits the blank line that normally precedes the first line in a report block.

NO HEADING omits the column names and underline heading.




MySQL is a registered trademark of MySQL AB in the United States, the European Union and other countries.  
Copyright (c) 2007- 2009 dbEntrance Software, All Rights Reserved
 
MySQL is a registered trademark of MySQL AB in the United States, the European Union and other countries.  
Java is a trademark or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.

 
 



















http://dbentrance.com/http://dbentrance.com/docs/Colors.htmlhttp://dbentrance.com/docs/Colors.htmlhttp://dbentrance.com/docs/Colors.htmlshapeimage_1_link_0shapeimage_1_link_1shapeimage_1_link_2shapeimage_1_link_3