Report.Sections.Add gets an error, why?
Visual Basic
1
Posts
1
Posters
0
Views
1
Watching
-
Hi, I'm using VB6 with Crystal Reports 8.5 ActiveX Designer Run Time Library I am trying to add a new section to the report at runtime. I'm using the following code: (CRXReport is defined as: CRAXDRT.Report)
Dim CrSection As CRAXDRT.Section Set CrSection = CRXReport.Sections.Add()
I get the "Invalid procedure call or argument" error, I also get it when I use:Set CrSection = CRXReport.Sections.Add(index)
When I just get an existing section it worksSet CrSection = CRXReport.Sections(index)
Any ideas why this isn't working and how to solve this? thanks.