Thursday, March 22, 2012

Suppress Crystal Reports Section in VB .Net 2003

Hello everyone. When I had VS .Net 2002, I could use the following code to suppress a section in my crystal report.crpt.Section6.SectionFormat.EnableSuppress = True
Now that I have moved to plain VB .Net 2003 with Crystal Reports 10, this command will not work.

Anyone know the correct syntax for this line in VB .Net for Crystal 10?

Here is my initial code in my web page.
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports System.IO

Dim crpt As New ReportDocument

crpt.Load("C:\inetpub\wwwroot\McClure\CigUnitsRpt.rpt")

ThanksBump
For anyone interested, this is the way to do it with VB .Net 2003 and Crystal 10
dim crpt as New ReortDocument()
crpt.Load("PathAndFileName")
crpt.ReportDefinition.Sections(6).SectionFormat.EnableSuppress = True

0 comments:

Post a Comment