Results 1 to 4 of 4

Thread: [RESOLVED] how to use grouping in datareport and to use shape command

  1. #1

    Thread Starter
    Hyperactive Member binilmb's Avatar
    Join Date
    Nov 2005
    Location
    Kochi
    Posts
    472

    Resolved [RESOLVED] how to use grouping in datareport and to use shape command

    how to use grouping in datareport and to use shape command

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: how to use grouping in datareport and to use shape command

    Not sure, but it should be similar to the mshflexgrid:

    Shaped msHflexgrid

  3. #3
    Lively Member
    Join Date
    Oct 2004
    Posts
    91

    Re: how to use grouping in datareport and to use shape command

    First initialize the dataEnviroment like DataEnviroment1 using the tables that you like, and then create then data report with groupHeader like you want..

    this code is for datareport.
    VB Code:
    1. Private Sub DataReport_Initialize()
    2.  
    3. Printer.Orientation = vbPRORLandscape
    4. DataReport1.Orientation = rptOrientLandscape
    5.  
    6.   'define as variáveis usadas no projeto
    7.   Dim strSQL As String
    8.  ' Dim strFin As String
    9.  ' Dim strInicio As String
    10.   Dim oConn As New ADODB.Connection
    11.   Dim oRS As New ADODB.Recordset
    12.  
    13.   oConn.CursorLocation = adUseClient
    14.   'estou usando a conexão que ja foi criada no dataenvironment
    15.   oConn.ConnectionString = DataEnvironment1.Connection1
    16.   'abre a conexão com o banco de dados Norhtwind.mdb em d:\teste
    17.   oConn.Open
    18.  
    19.    'define o titulo do relatório
    20.   DataReport1.Title = "TODO SOBRE QUIEN ES QUIEN"
    21.  
    22.   'define o comando SHAPE
    23.    
    24.   strSQL = "SHAPE {select * from basicos WHERE ID = " & Val(FrmQuienEsQuienONTS.Text29) & " " & "} AS Command1 APPEND ({select * from judicializacion} AS Command3 RELATE 'ID' TO 'ID_PROFILE') AS Command3"
    25.   MsgBox strSQL 'ESTE SE DEBE QUITAR
    26.  
    27.   oRS.Open strSQL, oConn, adOpenForwardOnly
    28.  
    29.   'atribui o recordset gerado ao datareport
    30.   Set DataReport1.DataSource = oRS
    31.  
    32. End Sub









    Added [vbcode][/vbcode] tags for clarity -
    Hack
    Last edited by Hack; Dec 11th, 2005 at 07:30 AM.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: how to use grouping in datareport and to use shape command

    Moved to Reporting section.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width