The ReaderwareVW Report Writer

The ReaderwareVW Report Writer allows you to easily define your own custom reports in virtually any format, with images. You can view, print and save the output.

The input to the Readerware report writer is an HTML template which defines the layout and formatting options. Readerware then merges in your data to create an HTML file. As the output is in HTML format you can view it any browser, print it or save the output to a file and upload it to a web site.

Printing a custom report

The easiest way to get started is to use one of the templates that are shipped with Readerware. To produce a report do the following:
Search to establish the content for your report. The Readerware report writer uses the current search results as input. So you could search for all titles to produce a full report, search by a given author or category etc.

Open the Readerware Report Writer Window by selecting the File->Report Writer menu item.

Select the Readerware basic image report, (BasicImageReport.html), from the list. You will see the template displayed in the window, but instead of data, you will see text like [[$ARTIST]], [[$TITLE]] etc. The [[$----] fields identify which Readerware database fields will be displayed and where.

Click on the Create Report button. Readerware will then populate the report template with the contents of the current search results and display the output in your browser. You can view, print or save the report from your browser.
That is how you print a report with the Readerware Report Writer.

Creating a report template

A ReaderwareVW Report Writer template file is in HTML format so you do need to understand a bit about HTML to take full advantage of all the customization and formatting options available.

The basic idea is that you simply create the HTML to produce the desired report, but instead of using real data you use predefined ReaderwareVW keywords that determine where ReaderwareVW will insert the data. Consider the template for the basic table example:

<HTML>
<HEAD>
   <TITLE>ReaderwareVW Basic Table Example</TITLE>
</HEAD>

<BODY>
<CENTER><FONT COLOR=#0000FF><H2>ReaderwareVW Basic Table Example</H2></FONT></CENTER>

<TABLE ALIGN=CENTER BORDER=3 CELLPADDING=5>
<TR>
<TH>Title</TH>
<TH>Actor</TH>
<TH>Actor</TH>
<TH>Actor</TH>
<TH>UPC</TH>
<TH>Est. Value</TH>
</TR>

[[$BEGIN_READERWAREVW]]
<TR>
<TD>[[$TITLE]]</TD>
<TD>[[$ACTOR1]]</TD>
<TD>[[$ACTOR2]]</TD>
<TD>[[$ACTOR3]]</TD>
<TD>[[$UPC]]</TD>
<TD>[[$VALUE]]</TD>
</TR>
[[$END_READERWAREVW]]

</TABLE>
</BODY>

</HTML>
 

This is fairly standard HTML, the interesting part is between the [[$BEGIN_READERWAREVW]] and [[$END_READERWAREVW]] lines. These lines mark the section of code that ReaderwareVW will duplicate, once for each video to be displayed. You can see that between these lines the HTML statements define a new row within the table. So if you have five videos in your result set, ReaderwareVW will duplicate this section five times creating a five row table.

Within this section you can see several ReaderwareVW database column names, for example [[$TITLE]] indicates this is where ReaderwareVW is to place the video title, ReaderwareVW simply substitutes these keywords with the database values. That's really all there is to it. Here is the HTML file that ReaderwareVW might generate from the above template

<HTML>
<HEAD>
   <TITLE>ReaderwareVW Basic Table Example</TITLE>
</HEAD>

<BODY>
<CENTER><FONT COLOR=#0000FF><H2>ReaderwareVW Basic Table Example</H2></FONT></CENTER>

<TABLE ALIGN=CENTER BORDER=3 CELLPADDING=5>
<TR>
<TH>Title</TH>
<TH>Actor</TH>
<TH>Actor</TH>
<TH>Actor</TH>
<TH>UPC</TH>
<TH>Est. Value</TH>
</TR>
 

<TR>
<TD>Inspector Morse: The Wolvercote Tongue</TD>
<TD>Thaw, John</TD>
<TD>Whately, Kevin</TD>
<TD></TD>
<TD>066805985171</TD>
<TD>$16.99</TD>
</TR>

<TR>
<TD>Lady and the Tramp 2: Scamp's Adventure</TD>
<TD>Roussel, Jeannine</TD>
<TD>Wolf, Scott</TD>
<TD>Milano, Alyssa</TD>
<TD>786936140446</TD>
<TD>$22.98</TD>
</TR>

<TR>
<TD>Lilith Fair: A Celebration of Women in Music</TD>
<TD>Colvin, Shawn</TD>
<TD>Crow, Sheryl</TD>
<TD>Girls, Indigo</TD>
<TD>014381985023</TD>
<TD>$19.98</TD>
</TR>

<TR>
<TD>Poirot: Death in the Clouds</TD>
<TD>Suchet, David</TD>
<TD>Jackson, Philip</TD>
<TD></TD>
<TD>054961362691</TD>
<TD>$19.98</TD>
</TR>

<TR>
<TD>Trial and Error</TD>
<TD>Sellers, Peter</TD>
<TD>Attenborough, Richard</TD>
<TD>Reid, Beryl</TD>
<TD>720917505725</TD>
<TD>$9.98</TD>
</TR>
 

</TABLE>
</BODY>

</HTML>


Accessing Disk and Episode/Track Information

Each entry in a ReaderwareVW database is made up of the basic video information like title and credits. It then has one or more disk entries that you can use for contents just like a music album. For movies you may not use these, for a TV season on DVD you might want to include all the episodes. If you want to display disk and episode information in your report, you must include a disk and episode section in your template. ReaderwareVW will then automatically handle any number of disks and episodes. The disk template section is repeated for each disk and the episode template section for each episode, just like in the example above.

The disk and episode sections of the template are identified by special keywords. For example:

[[$BEGIN_READERWAREVW]]
<TR>
<TD>[[$IMAGE]]</TD>
<TD>[[$TITLE]]<BR>[[$DIRECTOR]]</TD>
</TR>

[[$BEGIN_READERWAREVW_DISKS]]
<TR>
<TD>DISK [[$DISKNUMBER]]:</TD>
</TR>
[[$BEGIN_READERWAREVW_EPISODES]]
<TR COLSPAN=2>
<TD>[[$TITLE]]</TD>
</TR>
[[$END_READERWAREVW_EPISODES]]
[[$END_READERWAREVW_DISKS]]
[[$END_READERWAREVW]]

The above is not a complete template, but it illustrates how you would display disk and episode information. The [[$BEGIN_READERWAREVW]] ... [[$END_READERWAREVW]] identifies the complete ReaderwareVW template, this section will be duplicated once for each video you are displaying. There is HTML to display the cover image, title and credits information.

The [[$BEGIN_READERWAREVW_DISKS]] ... [[$END_READERWAREVW_DISKS]] identifies the section that will be duplicated once for each disk within each entry. In this example it displays the disk number.

Finally the [[$BEGIN_READERWAREVW_EPISODES]] ... [[$END_READERWAREVW_EPISODES]] identifies the section that will be duplicated once for each episode or track, within each disk, within each video. This section displays the title information. Note that this section is within the disk section of the template. This is the normal way you would code this, you want the episodes listed for each disk. If you use the episodes section on it's own, ReaderwareVW will display episode information for the first disk only.

Getting Started

You might want to start with one of the examples included with Readerware and adapt them for you own use, or you can start from scratch.

To start with an existing template, select it in the report writer window. Copy/Paste the template into a text editor like Notepad or TextEdit.

To install your template select the File->Install template menu item.

To remove a template you no longer use select the File->Remove template menu item.

If you develop custom reports that you think might be useful to other users, please consider sending them in. They may be placed on the Readerware web site where others can use and learn from them. Full credit will be given to the author or you can remain anonymous if you prefer. Just e-mail any templates to support@readerware.com.

You can browse user contributed templates in the Readerware Knowledge Base.

Report Writer Templates

Report writer templates are standard HTML files with an embedded section that is duplicated for each database record displayed. This section is marked by the following statements:

[[$BEGIN_READERWAREVW]]
.
.
.
[[$END_READERWAREVW]]

Sometimes you need to display multiple records within the marked section. Consider a two column table where you want each column to display a record from the database. Effectively you want to duplicate a table row for each two records. You do this with the [[$INCR_READERWAREVW]] statement. It tells ReaderwareVW to fetch the next record from the database. For example:

<TABLE>
[[$BEGIN_READERWAREVW]]
<TR>
<TD>[[$TITLE]]<BR>[[$DIRECTOR]]</TD>[[$INCR_READERWAREVW]]
<TD>[[$TITLE]]<BR>[[$DIRECTOR]]</TD>
</TR>
[[$END_READERWAREVW]]
</TABLE>

 

Report Writer Keywords

The following is a full list of the keywords recognized by ReaderwareVW. These will be replaced by the appropriate data from the database.
 
[[$TITLE]] Video Title
[[$ALTTITLE]] Alternate Video Title
[[$ACTOR1]] -
[[$ACTOR5]]
Actors 1 - 5
[[$ACTORS]] All Actors
[[$PRODUCER]] Producer
[[$DIRECTOR]] Director
[[$WRITER]] Writer
[[$SCREENWRITER]] Screenwriter
[[$PHOTOGRAPHER]] Director of Photography
[[$COMPOSER]] Composer
[[$EDITOR]] Editor
[[$SERIES]] Video series
[[$UPC]] UPC (Bar code)
[[$ASIN]] Amazon Standard Identification Number
[[$UPC/ASIN]] UPC (Bar code). If there is no UPC, this keyword returns the ASIN instead.
[[$STUDIO]] Studio
[[$FORMAT]] Video format, VHS, DVD, LaserDisc etc.
[[$PLACE]] Where produced
[[$DATE]] Video release date
[[$COPYDATE]] Copyright date
[[$REGION]] DVD or Blu-ray region code
[[$CERTIFICATION]] National certification or rating, MPAA, BBFC etc.
[[$ASPECTRATIO]] Aspect ratio
[[$ANAMORPHIC]] Anamorphic? True or False
[[$CC]] Close captioned? True or False
[[$SUBTITLED]] Subtitled? True or False
[[$LANGUAGE]] Language
[[$SOUND]] Sound format
[[$COLOR]] Color format
[[$RUNNINGTIME]] Running time
[[$COPIES]] Number of copies owned
[[$RATING]] Personal video rating
[[$TRANSFERRATING]] Transfer quality
[[$CONDITION]] Condition
[[$COVERCONDITION]] Cover Condition
[[$CATEGORY1]] -
[[$CATEGORY3]]
Categories
[[$PLAYED]] Played count
[[$LASTPLAYEDDATE]] Last played date
[[$VALUE]] Estimated value of this video
[[$VALUEDATE]] Valuation date
[[$SALEPRICE]] Sale price
[[$SALEDATE]] Date sold
[[$NEWPRICE]] New copy price
[[$NEWCOUNT]] Number of new copies available
[[$USEDPRICE]] Used copy price
[[$USEDCOUNT]] Number of used copies available
[[$COLPRICE]] Collectible copy price
[[$COLCOUNT]] Number of collectible copies available
[[$SALESRANK]] Sales rank
[[$WEIGHT]] Item weight
[[$PLAYLIST]] Is the video on the playlist?
[[$PRODUCTINFO]] Synopis, revoews etc.
[[$EXTRASINFO]] DVD extras
[[$COMMENTS]] Personal comments
[[$DATEENTERED]] Date entered into the ReaderwareVW database
[[$DATEUPDATED]] Date last updated in the ReaderwareVW database
[[$ROWKEY]] The Video ID, this is a unique ID alocated to each video automatically as it is added to the database
[[$LCCN]] LCCN (Library of Congress)
[[$DEWEY]] Dewey decimal number
[[$DEWEYLABEL]] Dewey decimal number. Standard format, Library of Congress extensions removed.
[[$CALLNUM]] The Library of Congress call number
[[$USERNUM]] User defined video number
[[$BARCODE]] Barcode
[[$TYPE]] Display type
[[$LOCATION]] Video location
[[$BOOK]] Book the video is based on
[[$AUTHOR]] Author of the book
[[$KEYWORDS]] Video keywords
[[$FAVORITE]] Is this a favorite video?
[[$OUTOFPRINT]] Is this video out of print?
[[$MEDIAURL]] Local copy of media
[[$OWNER]] Owner of this video
[[$STATUS]] Video status
[[$SOURCE]] Source of import
[[$PURCHASEPRICE]] Price paid
[[$PURCHASEDATE]] Date purchased
[[$PURCHASEPLACE]] Where purchased
[[$LISTPRICE]] List price
[[$EXTERNALID]] External ID for this video
[[$INVENTORY]] Video inventory count
[[$DISKCOUNT]] Number of discs
[[$IMAGE1]] IMG tag for the first image
[[$IMAGE2]] IMG tag for the second image
[[$LARGEIMAGE1]] IMG tag for the first large image
[[$LARGEIMAGE2]] IMG tag for the second large image
[[$BESTIMAGE1]] IMG tag for the first image. Looks for the large image, if not found uses the normal image
[[$BESTIMAGE2]] IMG tag for the second image. Looks for the large image, if not found uses the normal image
[[$USER1 - USER10]] User defined fields
[[$LOANTO]] Loaned to
[[$LOANDATE]] Loan date
[[$LOANDUE]] Loan due date
[[$LASTLOANDATE]] The last date this video was loaned out
[[$LOANCOUNT]] The number of times this video has been loaned out
[[$CURRENTDATE]] The current date
[[$TEMPLATESDIR]] URL pointing to the templates directory

All keywords must be in uppercase as shown above. They can be in any order, but must appear between the [[$BEGIN_READERWAREVW]]  and [[$END_READERWAREVW]] lines otherwise they will be ignored.

Report Writer Disk Keywords

The following is a full list of the disk section keywords recognized by ReaderwareVW. These will be replaced by the appropriate data from the database.
 
[[$DISKNUMBER]] Disk Number
[[$DISKTITLE]] Disk Title
[[$DISKSIDEBREAK]] For formats like LaserDiscs and DualDiscs, the first episode/track on side 2
[[$UNITNUM]] Unit number, the changer number, book number etc. where this video is stored
[[$SLOTNUM]] Slot number, the slot number, sleeve number etc. where this video is stored
[[$RUNNINGTIME]] Disk running time
[[$USER1 - USER2]] User defined disk fields


All keywords must be in uppercase as shown above. They can be in any order, but must appear between the [[$BEGIN_READERWAREVW_DISKS]]  and [[$END_READERWAREVW_DISKS]] lines otherwise they will be ignored.

Report Writer Episode Keywords

The following is a full list of the episode section keywords recognized by ReaderwareVW. These will be replaced by the appropriate data from the database.
 
[[$EPISODENUMBER]] Episode Number
[[$TITLE]] Episode Title
[[$PRODUCER]] Producer
[[$DIRECTOR]] Director
[[$WRITER]] Writer
[[$SCREENWRITER]] Screenwriter
[[$PHOTOGRAPHER]] Director of Photography
[[$COMPOSER]] Composer
[[$EDITOR]] Editor
[[$ARTIST]] Artist
[[$CONDUCTOR]] Conductor
[[$ORCHESTRA]] Orchestra
[[$SOLOIST]] Soloist
[[$WORK]] Work
[[$SONGWRITER]] Song writer
[[$RUNNINGTIME]] Episode/Track running time
[[$USERRATING]] Personal rating
[[$FAVORITE]] Favorite?
[[$PLAYLIST]] Episode/Track on playlist
[[$PLAYED]] Number of times the episode has been played
[[$COMMENTS]] Comments
[[$MEDIAURL]] Local copy of media
[[$USER1 - USER2]] User defined fields

All keywords must be in uppercase as shown above. They can be in any order, but must appear between the [[$BEGIN_READERWAREVW_EPISODES]]  and [[$END_READERWAREVW_EPISODES]] lines otherwise they will be ignored. Normally the epidode section itself is embedded within the disks section.

Keyword Modifiers

The following is a full list of the modifiers that can be applied to any of the report writer keywords. These will modify the database values, i.e. display the database value in uppercase.
 
-U Display the value in uppercase
-L=n Limit the value displayed to at most n characters
-S=n Display the value starting at the nth character. This is relative to 0.
-Y Used with date fields, this will display the year only instead of the full date.
-H Hide if empty. Do not display anything if this field is empty. For example [[$IMAGE]] will display the default image if there is no cover art. [[$IMAGE-H]] will display nothing if there is no image.
-H=text Display the specified text if the database field is not empty. If the field is empty, nothing is output. Suppose you want to display the release date in brackets, but you don't want to display empty brackets if there is no date. Use [[$DATE-H=(]][[$DATE]][[$DATE-H=)]]

The modifiers must immediately follow the report writer keyword. For example:

[[$TITLE-U]]

This will display the title in uppercase.

You can apply multiple modifiers to a keyword. For example:

[[$TITLE-U-L=20]]

This will display the first 20 characters of the title in uppercase.

Top of Page


Copyright © 1999-2018 Readerware Corporation