PDA

Click to See Complete Forum and Search --> : Crystal Reports in VB problem ! Help


perryk
Aug 28th, 1999, 12:31 AM
Hi Folks.
I have a problem.
I don't know how to sort my Database before I print it in the Crystal Reports.

This is a part of it.

cr.DataFiles(0) = workdir
cr.SortFields(0) = "+djmm.Artist"
cr.ReportFileName = "printdoc1.rpt"

The MDB struct is

djmm.Artist
djmm.Title
djmm.BPM
Found in the help file how to do the SortFields, but for some reason it's not working.
Who knows what I'm doing wrong ?
Many Thanks.... Perry

Diego
Aug 29th, 1999, 04:25 AM
Hi!!! Try with
Crystalreport1.sortfields(0)="+{tablename.fieldname}"
Crystalreport1.sortfields(1)="+{tablename.anotherfieldname}"
To deactivate sort with a fields do:
Crystalreport1.sortfields(0)="- {tablename.fieldname}"

See Ya!!