MyWraps pagination

You can separate the MyWraps output into pages using the pageSize parameter. You can include only a certain page using the page parameter. Reports are automatically truncated after 500 wraps (data rows), as set by the MaxRows parameter to limit the results from the primary filters.

With improper filtering, a MyWraps report can become very long. The maximum number of rows is determined by the MaxRows parameter, which defaults to 500 rows after primary filtering.

Pagination is controlled by the pageSize parameter. You can filter the output to include only one of the pages using the page parameter.

The MaxRows parameter

MyWraps retrieves data from the database in two steps:

  1. It requests wraps based on the primary filters: unique keys, State, Creation Date and User, and Last Modified Date and User (more detail below).
  2. It filters the result above using secondary filters like individual field values, First, Last and LastFrozen.

To ensure that you create manageable reports, step 1 above stops after having retrieved 500 wraps by default.

When your report reaches the limit you will see the following warning at the top of the report

*** NOTE: MyWraps is capped at MaxRows = 500 ***

The wrap limit can be adjusted using the MaxRows option in the MyWraps link:

...&Options.MaxRows=100...

In the example above, the result from the primary filters will be limited to the first 100 wraps.

Use better primary filters

If you reach the row limit inadvertently, you need to reduce the number of rows through better filtering. The MaxRows limit applies to primary filters only. These are high-speed filters used in the database already when extracting the source data for the report. Primary filtering of wraps is based on several things:

  • The Unique Keys for the Wrap offer a very fast way of removing wraps you don’t need. Zoom in to the subset of data that you are really interested in by filtering on essential parts of the Unique Key.
  • The State of the wraps, live or frozen. What is your report trying to show – work in progress or only completed work? Removing the frozen wraps often reduces the number of wraps considerably.
  • The Creation properties, date, and user. Are you only interested in wraps that were created during a particular period? If you’re only looking for wraps created by yourself? These are very good primary filters that often remove a lot of wraps.
  • The Last-modified properties, date, and user. The last-modified date for a frozen Wrap essentially tells you when it was frozen. The user that last modified the wrap can be used as a progress indicator if you’re only looking for wraps at a certain step of a process. Both these filters can reduce the number of wraps in the report dramatically.
  • If the IsLastFrozen property of a wrap is true, it tells you that this wrap was the one most recently frozen. This is often used when filtering for the most recent complete period of automatically saved KPIs. If your report has an AutoNumber=LastFrozen filter, this is a secondary filter that will be applied on the records returned by primary filtering and restricted by MaxRows. A simple way to avoid reaching the MaxRows limit when filtering for AutoNumber=LastFrozen is to always also filter the wraps for IsLastFrozen, e.g. Options.AutoNumberFilter=LastFrozen&Filter.IsLastFrozen=true. Read more in the help for the AutoNumber filter.

Once the designated subset of wraps has been extracted, secondary filtering takes place on individual field values. This is done in memory on the server and is much slower than primary filtering. Secondary filtering is unaffected by the MaxRows setting.

Increase MaxRows or turn it off

MyWraps can handle an unlimited amount of rows. If you expect your report to include more than 500 wraps, just increase the MaxRows parameter in the link. If you need all available data to be included, MaxRows can be completely disabled by setting it to -1 or 0.

...&Options.MaxRows=0...

A word of caution: anyone can make mistakes. With MaxRows disabled, you have no protection if an adjusted filter suddenly requests a ridiculously long report, that takes ages to generate.

If your MyWraps report is intended to be used with the WrapStack widget to manipulate a bulk of wraps, we recommend that you adjust the MaxRows parameter quite precisely to your expectations, to avoid overloading the server and the database if an inadequate filter setting in MyWraps results in an enormous update job that you most certainly will want to undo later.

I had MaxRows at 500 but got only 160 wraps!

MaxRows only applies to the primary filters. Your secondary filters were applied to the 500 wraps returned for the primary filters, and the result was 160 wraps.

MyWraps pagination

pageSize

The pageSize setting defines the number of wraps that appear on each page of the report. It has a Wrapsite default setting, see below.

You can override the default value using the pageSize=n parameter in the MyWraps link. If n exceeds the maximum value set for the Wrapsite (see below), the maximum value is used instead of n.

page

The page setting requests a particular page in the report, e.g. page=2. You cannot specify a range or a list of pages, only a single, positive integer.

The first wrap on each page is (page-1)*pageSize+1, e.g. if page=2 and pageSize=10, the report will start with wrap (2-1)*10+1=11.

Special cases

  • The default for page is 0, meaning “include all pages in the report”.
  • If pageSize=0, pagination is disabled and all the wraps appear on page 1. If you request page 2 or later, the report will be empty.
  • If pageSize is equal to or greater than the number of wraps, all the wraps appear on page 1. If you request page 2 or later, the report will be empty.
  • If pageSize is equal to or greater than MaxRows, all the wraps appear on page 1. If you request page 2 or later, the report will be empty.

Pagination settings

The pageSize setting has a Wrapsite default setting on the Administration dashboard > Settings page.

Screenshot of the pageSize default setting for a Wrapsite

You can override the default value using the pageSize=n parameter in the MyWraps link. If n exceeds the maximum value set on the Administration dashboard > Settings page, the maximum value is used instead of n.

Screenshot of the Max pageSize setting for a Wrapsite