how to sort the “order information report” from the service “print acquisitions records...

17
How to sort the “Order Information report” from the service “Print Acquisitions Records acq- 03” Yoel Kortick

Upload: corey-holland

Post on 08-Jan-2018

225 views

Category:

Documents


0 download

DESCRIPTION

3 The form The service “Print Acquisitions Records acq-03” prints the form order-info-report. By default there is no option to select the format in the service No field to choose format of report

TRANSCRIPT

Page 1: How to sort the “Order Information report” from the service “Print Acquisitions Records acq-03” Yoel Kortick

How to sort the “Order Information report” from the service “Print Acquisitions Records acq-03”

Yoel Kortick

Page 2: How to sort the “Order Information report” from the service “Print Acquisitions Records acq-03” Yoel Kortick

2

Introduction• The sorting method employed here are not Ex

Libris inventions nor are they unique to Aleph.• We use here standard xsl sort parameters and

show examples of where this information may be found on the internet.

• We do two different types of sorts here, while the user may build several more local examples.

Page 3: How to sort the “Order Information report” from the service “Print Acquisitions Records acq-03” Yoel Kortick

3

The form• The service “Print Acquisitions Records acq-03” prints

the form order-info-report.• By default there is no option to select the format in the

service

No field to choose format of report

Page 4: How to sort the “Order Information report” from the service “Print Acquisitions Records acq-03” Yoel Kortick

4

The report• The output file by default is not sorted by any of the fields

chosen to print (Not by Sublibrary, Vendor or title)

Page 5: How to sort the “Order Information report” from the service “Print Acquisitions Records acq-03” Yoel Kortick

5

The raw xml• If we look at the raw xml we see that each of the three fields

we printed are called “data-1”, “data-2” and “data-3”.

If we would want to sort the xsl by, for example, vendor code then we would sort it by “data-2”

Page 6: How to sort the “Order Information report” from the service “Print Acquisitions Records acq-03” Yoel Kortick

6

Sorting the xsl• Here is the xsl standard for sorting a report• This is from http://www.w3schools.com/xsl/el_sort.asp

Page 7: How to sort the “Order Information report” from the service “Print Acquisitions Records acq-03” Yoel Kortick

7

The edited xsl form• We add one line to the xsl form with the desired sort field.• In this case we edit the form order-info-report-01.xsl

This is the only line we need to add to the xsl

Page 8: How to sort the “Order Information report” from the service “Print Acquisitions Records acq-03” Yoel Kortick

8

Choosing the new format via the service

• One option is just to have one format number and have every user use it.

• Another more “attractive” option is to make a pull down box in the service to choose the new format which sorts by the second value

• We will now add this option to the service interface

Page 9: How to sort the “Order Information report” from the service “Print Acquisitions Records acq-03” Yoel Kortick

9

The form• The format number option already exists in the service

but by default it is “hidden”

Page 10: How to sort the “Order Information report” from the service “Print Acquisitions Records acq-03” Yoel Kortick

10

The form• Now we have added the option to choose a format.• We removed the “hidden” tags and made a dropdown box..• This is file $aleph_root/pc_b_eng/p-acq-03.xml

Page 11: How to sort the “Order Information report” from the service “Print Acquisitions Records acq-03” Yoel Kortick

11

Running the service• Here we run the service “Print Acquisition Records (acq-03)”

and print fields sub library, vendor code and Title.

Now we can choose format 01

Page 12: How to sort the “Order Information report” from the service “Print Acquisitions Records acq-03” Yoel Kortick

12

The report is sorted

Format 01

Sorted by vendor code

Page 13: How to sort the “Order Information report” from the service “Print Acquisitions Records acq-03” Yoel Kortick

13

Another format• Now we will add format 02 to p-acq-03.xml.• It is for descending order sort for the third parameter (in this

case title)

Page 14: How to sort the “Order Information report” from the service “Print Acquisitions Records acq-03” Yoel Kortick

14

The xsl form• Here is $data_root/form_eng/order-info-report-02.xsl

This format is sorted descending by the third value

Page 15: How to sort the “Order Information report” from the service “Print Acquisitions Records acq-03” Yoel Kortick

15

The xsl form• Now we run the service choosing format 02

Page 16: How to sort the “Order Information report” from the service “Print Acquisitions Records acq-03” Yoel Kortick

16

The descending order report• The output is sorted by the third value (title) descending

Title descending order

Page 17: How to sort the “Order Information report” from the service “Print Acquisitions Records acq-03” Yoel Kortick

Thank You!Yoel Kortick