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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Sort At Runtime 1

Status
Not open for further replies.
Brett,

Group your data on a formula based on a parameter the user chooses, something like:

If {?parameter}={db.field1} then
{db.field1}
else if {?parameter}={db.field2 then
{db.field2}
else if .... and so on.

Hope this helps

paulmarr
 
If your using RDC for generating Crystal report in your VB appication then use below code
You can put code like this in the General Declarations section.

Dim CRXReport As New CrystalReport1
Dim CRXDatabaseField As CRAXDRT.DatabaseFieldDefinition
Private Sub Form_Load()

Currently there is no sort in this Report. To add the sort field Customer Name, the application must first get the {Customer.Customer Name} field from the Customer Table. This code accesses the first table to get the 2nd field.

Set CRXDatabaseField = CRXReport.Database.Tables.Item(1).Fields.Item(2)

Now add the field to the SortFields Collection and set the Sort Order to ascending.

CRXReport.RecordSortFields.Add CRXDatabaseField, crAscendingOrder
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top