Print Preview ActiveX Active Users: 58 / Visits Today: 85
Highest Active Users: 99
Print Preview ActiveX
Home | Profile | Register | Active Topics | Members | Search | FAQ | RSS
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Print Preview
 Help file
 NewColumn - Method
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic: OddEven - Property Topic Next Topic: GetStyle - Method  

emiel
Administrator

Belgium
327 Posts

Posted - 07/19/2005 :  13:47:04  Show Profile
Method NewColumn

Action:

This method adds a new column definition to the report.

Syntax:

NewColumn (strId As String, strTitle As String, vColWidth As Variant, vColSpaceLeft As Variant, vColSpaceRight As Variant, vDecSpace As Variant, eAlign As eColAlign, vFormat As Variant, eFormatType As eFormatType, eCalcType As eCalcType)


Parameter         Description                                       
  • strId Identifier for column
  • strTitle Title to appear at head of column
  • vColWidth Printable width of column
  • vColSpaceLeft Space added to left of column
  • vColSpaceRight Space added to right of column
  • vDecSpace Position of decimal point from right of ColWidth
  • eAlign Alignment within column
  • eFormat Format specification
  • eFormatType Type of format
  • eCalcType Calculation to be used on column
    The eAlign parameter can contain the following values:

    Constant       Value  Description  
    
  • prCALeft 1 Left align
  • prCARight 2 Right align
  • prCACenter 3 Center align
  • prCADecimal 4 Decimal align
    The eFormatType parameter can contain the following values:
    Constant        Value   Description     
    
  • prFMGeneral 1 Format$
  • prFMPercent 2 FormatPercent
  • prFMNumber 3 FormatNumber
  • prFMDateTime 4 FormatDateTime
  • prFMCurrency 5 FormatCurrency
    The eCalcType parameter can contain the following values:
    Constant       Value  Description            
    
  • prCCNone 1 None
  • prCCCount 2 Number of rows in range
  • prCCSum 3 Sum of rows in range
  • prCCMin 4 Minimum of rows in range
  • prCCMax 5 Maximum of rows in range
  • prCCAverage 6 Average of rows in range
    Remarks:

    This method adds a new column to the report.

    If vertical lines are requested (see ShowVerticalLines in ModifyReport) they are placed in between the ColSpaceRight and ColSpaceLeft positions.

    See Reports in the Introduction for a description of the Reports facility in Print Preview5 version

    Example:

    To add a new column:

    sConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\db1.mdb;Persist Security Info=False"
    oConnection.Open sConnection
    oRecordset.Open "table1", oConnection
    preview.NewReport
    ....................................
    Preview.RecordsetReport oRecordset, False, True

    See also:

    Constants Reports
    ReportHeaders
    ModifyReport
    RecordsetReport
    NewReport -------->http://www.ppreview.net/forum/topic.asp?TOPIC_ID=401

    Come and visit :
    www.immoassist.com
    www.ppreview.net
    www.vbdiamond.com
    www.d2dsources.com
    www.mandix.com

    Edited by - emiel on 07/20/2005 10:56:46
    Go to Bottom of Page
      Previous Topic: OddEven - Property Topic Next Topic: GetStyle - Method  
     New Topic  Topic Locked
     Printer Friendly
    Jump To:
    Print Preview ActiveX © Mandix Go To Top Of Page
    This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000 Version 3.4.02