Search to establish the content for your report or select the videos you want to include in the table view. The Readerware report writer uses either the current search results or the selected videos as input. So you could search for all titles to produce a full report, search by a given actor or category etc.That is how you print a report with the Readerware Report Writer.
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.
Select either the All Records or Selected Records option to determine which videos are included in the report.
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.
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>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.
<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>
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>
The disk and episode sections of the template are identified by special keywords. For example:
[[$BEGIN_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.
<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 [[$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.
[[$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>
[[$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 allocated 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 |
[[$VIDEOID]] | The Video ID, this is a unique ID allocated to each video automatically as it is added to the database |
[[$USERNUM]] | User defined number |
[[$ID]] | If a user defined number is present it is used, otherwise the Video ID is used |
[[$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, borrower name |
[[$LOANTO_EMAIL]] | Loaned to, borrower e-mail |
[[$LOANTO_PHONE]] | Loaned to, borrower phone |
[[$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. This tag can be used outside of the BEGIN/END tags and is designed to be used as a report date. |
[[$ITEM_COUNT]] | The number of videos printed. This tag must be used outside of the BEGIN/END tags, it can appear at the top or bottom of the report. |
[[$ITEM_VALUE_TOTAL]] | The total value of the videos printed. This tag must be used outside of the BEGIN/END tags, it can appear at the top or bottom of the report. |
[[$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.
[[$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 |
[[$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.
-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.