|
-
Mar 6th, 2008, 04:20 AM
#1
Thread Starter
Junior Member
CR.GroupSortFields(0) --- problem
I m using VB 6.0 with Crystal report 10.
i have created object for crystal report as objReport
im using following code in VB to sort the group field.
i hv grouped my report on Party_Code...i want same report to be sorted on Party Code or InvoiceAmount...
im trying to use the following code but its showing error SUBSCRIPT OUTOF RANGE....
objReport.GroupSortFields(0) = "Sum({@Amount}, {KC_PARTY_M.PARTY_CD})"
while debuging only in VB its giving an error. what could be the problem??
-
Mar 6th, 2008, 07:34 AM
#2
Re: CR.GroupSortFields(0) --- problem
-
Mar 6th, 2008, 02:47 PM
#3
Re: CR.GroupSortFields(0) --- problem
Well first off, GroupSortFields is a Collection and collections are 1 based.
In order to Add/Change a GroupSortField the report must have an existing Summary field. You then add the summary field to the collection.
oReport.GroupSortFields.Add oReport.SummaryFields(1), crDescendingOrder
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
|