|
-
Mar 6th, 2003, 12:06 AM
#1
Thread Starter
New Member
Report in code (Insert Group Section)
'Crystal Report 8.5
'Report in code (Insert Group Section)
'-----------------------------------------
Dim Report As New CrystalReport1
Dim DB_Cnn1 As ADODB.Connection
Dim Cmd1 As ADODB.Command
Private Sub Form_Load()
Dim CnnStr1 As String
Dim fldName As FieldObject
Dim txtObj As TextObject
Dim GroupSection As GroupNameFieldDefinition '????
'Open DataBase
Set DB_Cnn1 = New ADODB.Connection
CnnStr1 = DataEnvironment1.Connection1.ConnectionString
DB_Cnn1.Open CnnStr1
'Insert Query
Set Cmd1 = New ADODB.Command
Set Cmd1.ActiveConnection = DB_Cnn1
Cmd1.CommandText = "Select * From Tables"
Cmd1.CommandType = adCmdText
'Bind Database with Report
Report.Database.AddADOCommand DB_Cnn1, Cmd1
'Report Design
Set txtobj = Report.PageHeader.AddTextObject(" Name", 500, 500)
Set fldName = Report.ReportDetails.AddAddFieldObject("{ado.Name}", 530, 100)
- - - - - -
- - - - - -
- - - - - -
Report.AddGroup 0, fldName.Field, crGCAnyValue, crDescendingOrder
End sub
In this way i can not identify what is my group sections(GroupHeader..)
I also donot know about GroupNameFieldDefinition and how can i use it.
Please anybody expert help me with source code..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|