cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to identify the Detail section in code

first_last
Participant
0 Kudos

I wrote a PowerShell script to resize fields in the details section and their associated headers:

$reportDocument = New-Object CrystalDecisions.CrystalReports.Engine.ReportDocument
$reportDocument.Load($file)

# process each 'Detail' section
$reportDocument.ReportDefinition[0].Areas.Sections | Where-Object { $_.Kind -eq 'Detail' } | ForEach-Object {

  # process each object in the Detail section
  $_.ReportObjects | ForEach-Object {
    ...
  }
}

Questions:

  • What is the syntax for identifying the Detail section. While the looping approach works, I'd rather refer to it more concisely.
  • Why does a report contain more than one ReportDefinitions?

Plug: PsCrystal

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

FYI - Power Shell is not supported

For CR for VS .NET go here:

https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

On that page is a link to a Parameter test app, it has a routine for finding Section's and Area's

Don

Answers (0)