Sorting Data for Publication

When you publish your CatBase data, it can be sorted any way you choose.

There are two main mechanisms for sorting:

 

Sorting by Category

If your data is organised into Categories, it can be sorted on any number of levels when it's published. You can sort by Category Name, Category Number, or Sort Field.

 

For example, in our Sweet Tooth Fairy example in the CatBase Demo Database, we have our Categories organised like this:

 

(Yours might look different!)

In this example there are two levels of Category. You can have any number of levels.

To sort your published data by Category:

  1. In your Publishing Stylesheet, go to the Preferences tab.

  2. Select the Organise by Category checkbox.

When the Organise by Category checkbox is selected, the Category Settings tab will appear in the row of sub-tabs:

Click the Category Settings tab to manage how the Categories will be organised and published.

As we have two levels in our example category hierarchy, there are two tabs at the top of the area: "Level 1" and "Level 2". You can choose the settings for each level.

Publish this level

By default, headings for all levels will be published. But you might want to omit the headings at certain levels, For example, suppose your top-level categories are Wholesale and Retail. Under each of those main headings you have a series of subheadings for different type of product. You set up two Publishing Projects based on this Publishing Stylesheet: one of rWholesale, in which you select just the Wholesale category to be included, and one for Retail, with just the Retail category included. But you don't want those two main headings to actually be published; they are just there for the sake of organisation. So you would un-check this checkbox.

Group all Categories under the highest-level Categories

Maybe you want to produce a version of your publication in which everything is simply included under the top-level Category headings, including the data under the subheadings without sorting the data by subheading. You can choose this option for that particular Publishing Stylesheet.

Main Category only / All Categories

The first Category that you add a record to will be marked as the Main Category. If you add the same record to additional Categories, you can choose one of those others to be the Main Category. Then if you want to produce a publication which includes, under each Category, only records for which that Category is selected as the Main Category, you can select the Main category only radio button.

Include Categories that have no entries listed under them

The default setting is that if any Category does not have any records listed under it, then its heading will be omitted. If you want all Category headings to be included, even if they are unpopulated, then select this checkbox.

Sort Categories by: Name / Number / Sort Field

The default sort order for Categories is alphabetically by name. They can also be sorted by Category Number or Sort Field.

The Sort Field option is useful for situations where you want specific control over how they are sorted: maybe by level of importance (eg "Major" comes before "Corporal"). Note that this is an alphanumeric field: if you want to snter numbers into the field, you must pad them with zeroes - eg instead of 1, 2, 3 you would enter 001, 002, 003 etc. - othersie they may not sort in the desired order.

Print Category Heading as:

Choose how you want the heading for the selected Category Level to be published. The choices are:

  • Category Name (default)

  • Picture

  • Name and Picture (Category name followed by picture)

  • Picture and Name (Picture followed by name)

  • Table

  • No headings

(For the Picture options, you can choose a picture for each Category. See the Managing Categories tutorial for more info.)

Stylesheet to apply to Category Names

Select the Stylesheet to style the Category Names with.

Print Descriptions using Stylesheet:

Each Category has an optional Description field, If you want that to be published after the category heading, select this checkbox. A dropdown menu will be displayed for you to choose the stylesheet to apply to the Description.

Print User Data 1 using Stylesheet:

There are 4 User Data fields available for each Category - these are optional additional text fields. Like the Description field, you can choose to publish any of these additional fields, and which Stylesheet to apply to each one.

Table of Contents entry (RTF)

If your Publishing Destination is RTF (Rich Text Format), you can select this checkbox to create a Table of Contents at the beginning of the document, listing all the Categories.

Index Entry

Select this checkbox to create an index entry for each Category.

Text to prepend to category names

You can add some static text to the beginning or end of each category name. for example, you could prepend the text "Main Category: " to the Level 1 Category names.

Sorting by Field Content

Whether you are sorting your data by Category or not, you'll need to specify how to sort the actual records.If you are sorting by Category, this means how the records will be sorted within their Categories.

You'll need to create a Sort Format for each Publishing Stylesheet, or select an existing one. 

In your Publishing Stylesheet, go to the Preferences tab.

Under General Options, select the Sort Format you want to use from the drop-down Sort Order menu, or create a new Sort Format.

See the Sort Editor tutorial for more info on creating Sort Formats.

Creating non-repeating (unique) headings

Here is a typical example.

You're producing a business directory. You want to organise the companies by town, and then by company name under each town. 

1. Create a Sort Format in which two fields have been added:

  • Town

  • Company name

So the data will be sorted as required ... but you do not want the town name to be repeated for every company; you just want it to appear once for each group.

2. Add a Paragraph to the Publishing Stylesheet; name it "Town" (or whatever is appropriate) and select the Stylesheet you want to style the town names in.

3. Add an Element to that Paragraph.

4. Select the Town name field for that Element.

5. Go to the Preferences tab in the Element window.

6. Select the Unique Group Entry checkbox in the Options area:

 
crown commercial service logo
Adobe technology partner logo
4D silver partner logo
  • Facebook Social Icon
  • Twitter Social Icon
  • YouTube Social  Icon

© Copyright 2019 CatBase Publishing Systems Ltd.