Implementation of Crystal Report Sort

xiaoxiao2021-03-06  151

The entire report consists of three parts

XXXX.ASP // Used to receive functions and from the database, basically each report has a file, which calls cyheader.asp and cyfooter.asp.

Cyheader.asp

Funcsort.inc

?

If you want to sort the original report, it is found that there are a variety of methods, but ideally double-click Crystal Report, which is not easy to implement in the Crystal Report 8.5 Web version.

In order to reduce the workload of the designer when the ordering function is achieved, it has the least workload.

Current sorting does not support Group, only support normal RECORD

?

?

How to use, in the report to implement:

(1) ??? Introducing in the head

(2) Insert the following block:

AddSortfield "Name", "{viw_recruit_simply.appname}", 0? 'Note that Sortorder written in this point is the initial sort type of the field.

AddSortfield "Archive", "{viw_recruit_simply.recordcode}", 0 ??????? '

?

'Sorting

ProcessSort

?

?

The implementation process is described as follows:

In order to facilitate trouble, set OptiOn Explicite in the master document, mandatory variable declaration

Do the following work:

1. CyHeader.asp adds the following sections at the Server end script:

Public Sortfieldcount

Sortfieldcount = 0

Public Sortfields (10, 3) 'Defines the sort domain name, up to ten

?

?

Public Sortfield, SortDesc, Sortorder

Public CsortDesc

?

Public Defaultsortfield, Defaultsortorder, DefaultsortDesc

Defaultsortfield = "" "

?

Defaultsortorder = "" "

?

Public RFINDSORTFIELD

RFINDSORTFIELD = -1

?

2. In addition to Cyfooter.asp's table (top), add the following