Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting record using CRPEAuto object

Status
Not open for further replies.

JBats

Programmer
Aug 3, 2003
127
PH
Hello people,

I have a problem in my vb/crystal report when sorting record. I have to sort the record according to its given field but the my code doesn't work. I'm using the Crystal Report Engine object (CRPEAuto) and i think there is a problem in declaring objects. Please help me to find solutions with this. Below is my code.

Dim crw_Report As CRPEAuto.Report
Dim crw_Sorts As CRPEAuto.SortFields
Dim crw_Sort As CRPEAuto.sortfield
Dim fldDef As CRPEAuto_Object

Set app_Crw = CreateObject("crystal.crpe.application")
Set crw_Report = app_Crw.OpenReport("c:\status.rpt")
Set crw_Sorts = crw_Report.RecordSortFields

crw_Sorts.Add crDescendingOrder, "{Status_ttx.Name}"
Set crw_Sort = crw_Sorts.Item(1)
Set fldDef = crw_Sort.Field


I'm using this objects
1. CR8.0 object library
2. CR8.5 ActiveX designer and runtime object library.

I was wondering that when i declare the object flddef to CRPEAuto.object, this reference does not exist from the popup window. When i tried to load the program, my declaration change to

Dim fldDef As CRPEAuto_OLEObject
instead of...
Dim fldDef As CRPEAuto_Object

Is there a problem in my object compatibility that i've set in my reference window? or am i using the CR object that is not capable of handling this matter?

Any help would be highly appreciated.

Thanks a Lot...

JBats
Good is not better if not than best...


JBats
Good is not better if not than best...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top