User manual BUSINESS OBJECTS CRYSTAL REPORTS 9 TECHNICAL REFERENCE GUIDE
DON'T FORGET : ALWAYS READ THE USER GUIDE BEFORE BUYING !!!
If this document matches the user guide, instructions manual or user manual, feature sets, schematics you are looking for, download it now. Diplodocs provides you a fast and easy access to the user manual BUSINESS OBJECTS CRYSTAL REPORTS 9. We hope that this BUSINESS OBJECTS CRYSTAL REPORTS 9 user guide will be useful to you.
Manual abstract: user guide BUSINESS OBJECTS CRYSTAL REPORTS 9TECHNICAL REFERENCE GUIDE
Detailed instructions for use are in the User's Guide.
[. . . ] Crystal ReportsTM 9 Technical Reference Guide
Crystal Decisions, Inc. Palo Alto California, USA 94301
Copyright © 2002 Crystal Decisions, Inc. , 895 Emerson St. , Palo Alto, California, USA 94301. No part of this documentation may be stored in a retrieval system, transmitted or reproduced in any way, except in accordance with the terms of the applicable software license agreement. This documentation contains proprietary information of Crystal Decisions, Inc. , and/or its suppliers. [. . . ] If oCrossTabGroups. Count > 1 Then sFieldName = oCrossTabGroups. Item(2). Field. Name oCrossTabGroups. Delete (2) MsgBox "The CrossTab Group based on the field" & sFieldName & _ " has been deleted. " Else MsgBox "There is only one CrossTab group in this CrossTab Object. " _ + "This CrossTabGroup can NOT be deleted. " End If ` Refresh the viewer. CRViewer91. Refresh End Sub Private Sub Command2_Click() ` Get the Region field and add it to the cross tab. Set oDBFieldDefinition = oReport. Database. Tables(1). Fields(12) oCrossTabGroups. Add oDBFieldDefinition MsgBox "A new CrossTabGroup Column Group based on the " _ & oDBFieldDefinition. Name & _ " has been added to the CrossTab object. " ` Refresh the viewer. CRViewer91. Refresh End Sub Private Sub Command3_Click() ` Create an array of headings and groups ` to use as specified groups in the report group ` and the crosstab group. varSpecifiedGroups(0, 0) = "England" varSpecifiedGroups(0, 1) = "Canada" varSpecifiedGroups(0, 2) = "Germany" ` Column groups. varSpecifiedGroups(1, 0) = "{Customer. Country} = `England'" varSpecifiedGroups(1, 1) = "{Customer. Country} = `Canada'" varSpecifiedGroups(1, 2) = "{Customer. Country} = `Germany'" Set oCrossTabGroup = oCrossTabGroups. Item(1) ` Set the group to use a specifed order and groups. oReport. Areas("GH"). SortDirection = crSpecifiedOrder oReport. Areas("GH"). SpecifiedGroups = varSpecifiedGroups ` Format the crosstab. With oCrossTabGroup . BackColor = vbGreen . Condition = crGCAnyValue . EnableSuppressLabel = False . EnableSuppressSubtotal = False
Crystal Reports Technical Reference Guide
199
Examples
. SortDirection = crSpecifiedOrder ` Set the crosstab group to use a specifed order and groups. . SortDirection = crSpecifiedOrder . SpecifiedGroups = varSpecifiedGroups MsgBox "The CrossTab Group that is being formatted is based on the " & _ . Field. Name & " field. " End With ` Refresh the viewer. CRViewer91. Refresh End Sub
How to format a group in the section format event
This example changes the color of the text displayed in the group header based on the value of the group. The value is checked through the Value and NextValue properties of the GroupNameFieldDefinition Object. CrystalReport1 is connected to the xtreme. mdb database found in the \Program Files\Crystal Decisions\Crystal Reports 9\Samples\En\Databases folder. The report is using the Customer table and is grouped on the Country field and then the Last Year's Sales field.
` Create a new instance of the report. Dim oReport As New CrystalReport1 ` Declare a GroupNameFieldDefinitions collection. Dim cGroupNameFieldDefinitions As CRAXDRT. GroupNameFieldDefinitions ` Declare a GroupNameFieldDefinition object. Dim oGroupNameFieldDefinition As CRAXDRT. GroupNameFieldDefinition ` Declare a Section object with events. Dim WithEvents oSection As CRAXDRT. Section Dim x As Integer Private Sub Form_Load() ` Set the section to the Last Year's sales group header. Set oSection = oReport. Sections("GH2") ` Get the collection of group name fields. Set cGroupNameFieldDefinitions = oReport. GroupNameFields ` Set the report source of the viewer and view the report. CRViewer91. ReportSource = oReport CRViewer91. ViewReport End Sub
` Note: You can also place code for a section format ` event in a Report form (for example CrystalReport1) found ` under the Designer folder. Double-click the desired section
200
Crystal Reports Technical Reference Guide
3 : Report Designer Component Object Model
` and place the code in the code window. If your report ` is a file (*. rpt) then you must decalre a section ` object with events and select the section object and then ` format in the forms code window. [. . . ] 137 Report Designer SummaryFieldDefinition Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 SetText method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 shortcuts, keyboard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 ShowGroup Event. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [. . . ]
DISCLAIMER TO DOWNLOAD THE USER GUIDE BUSINESS OBJECTS CRYSTAL REPORTS 9
Click on "Download the user Manual" at the end of this Contract if you accept its terms, the downloading of the manual BUSINESS OBJECTS CRYSTAL REPORTS 9 will begin.