Search to establish the content for your report or select the albums you want to include in the table view. The Readerware report writer uses either the current search results or the selected albums as input. So you could search for all titles to produce a full report, search by a given artist 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 albums 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 ReaderwareAW keywords that determine where ReaderwareAW 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_READERWAREAW]] and [[$END_READERWAREAW]] lines. These lines mark the section of code that ReaderwareAW will duplicate, once for each CD 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 CDs in your result set, ReaderwareAW will duplicate this section five times creating a five row table.
<HEAD>
<TITLE>ReaderwareAW Basic Table Example</TITLE>
</HEAD><BODY>
<CENTER><FONT COLOR=#0000FF><H2>ReaderwareAW Basic Table Example</H2></FONT></CENTER><TABLE ALIGN=CENTER BORDER=3 CELLPADDING=5>
<TR>
<TH>Title</TH>
<TH>Artist</TH>
<TH>UPC</TH>
<TH>Est. Value</TH>
</TR>[[$BEGIN_READERWAREAW]]
<TR>
<TD>[[$TITLE]]</TD>
<TD>[[$ARTIST]]</TD>
<TD>[[$UPC]]</TD>
<TD>[[$VALUE]]</TD>
</TR>
[[$END_READERWAREAW]]</TABLE>
</BODY></HTML>
Within this section you can see several ReaderwareAW database column names, for example [[$TITLE]] indicates this is where ReaderwareAW is to place the CD title, ReaderwareAW simply substitutes these keywords with the database values. That's really all there is to it. Here is the HTML file that ReaderwareAW might generate from the above template
<HTML>
<HEAD>
<TITLE>ReaderwareAW Basic Table Example</TITLE>
</HEAD><BODY>
<CENTER><FONT COLOR=#0000FF><H2>ReaderwareAW Basic Table Example</H2></FONT></CENTER><TABLE ALIGN=CENTER BORDER=3 CELLPADDING=5>
<TR>
<TH>Title</TH>
<TH>Artist</TH>
<TH>UPC</TH>
<TH>Est. Value</TH>
</TR><TR>
<TD>Synchronistic Wanderings</TD>
<TD>Benatar, Pat</TD>
<TD>724349980327</TD>
<TD>$31.99</TD>
</TR><TR>
<TD>Whoa Nelly!</TD>
<TD>Furtado, Nelly</TD>
<TD>600445021723</TD>
<TD>$13.29</TD>
</TR><TR>
<TD>Tell Me Something: The Songs of Mose Allison</TD>
<TD>Morrison, Van</TD>
<TD>731453320321</TD>
<TD>$14.99</TD>
</TR><TR>
<TD>Faith and Courage</TD>
<TD>O'Connor, Sinead</TD>
<TD>075678333729</TD>
<TD>$14.99</TD>
</TR><TR>
<TD>Ancient Heart</TD>
<TD>Tikaram, Tanita</TD>
<TD>075992583923</TD>
<TD>$14.99</TD>
</TR></TABLE>
</BODY></HTML>
The disk and track sections of the template are identified by special keywords. For example:
[[$BEGIN_READERWAREAW]]The above is not a complete template, but it illustrates how you would display disk and track information. The [[$BEGIN_READERWAREAW]] ... [[$END_READERWAREAW]] identifies the complete ReaderwareAW template, this section will be duplicated once for each CD you are displaying. There is HTML to display the CD cover image, title and artist information.
<TR>
<TD>[[$IMAGE]]</TD>
<TD>[[$TITLE]]<BR>[[$ARTIST]]</TD>
</TR>[[$BEGIN_READERWAREAW_DISKS]]
<TR>
<TD>DISK [[$DISKNUMBER]]:</TD>
</TR>
[[$BEGIN_READERWAREAW_TRACKS]]
<TR COLSPAN=2>
<TD>[[$TITLE]]</TD>
</TR>
[[$END_READERWAREAW_TRACKS]]
[[$END_READERWAREAW_DISKS]]
[[$END_READERWAREAW]]
The [[$BEGIN_READERWAREAW_DISKS]] ... [[$END_READERWAREAW_DISKS]] identifies the section that will be duplicated once for each disk within each CD. In this example it displays the disk number.
Finally the [[$BEGIN_READERWAREAW_TRACKS]] ... [[$END_READERWAREAW_TRACKS]] identifies the section that will be duplicated once for each track, within each disk, within each CD. This section displays track 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 tracks listed for each disk. If you use the tracks section on it's own, ReaderwareAW will display track information for the first disk only.
There is an example template, awTrackReport.html included with the product.
This is a complete template that displays disk and track information.
[[$BEGIN_READERWAREAW]]
.
.
.
[[$END_READERWAREAW]]
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_READERWAREAW]] statement. It tells ReaderwareAW to fetch the next record from the database. For example:
<TABLE>
[[$BEGIN_READERWAREAW]]
<TR>
<TD>[[$TITLE]]<BR>[[$ARTIST]]</TD>[[$INCR_READERWAREAW]]
<TD>[[$TITLE]]<BR>[[$ARTIST]]</TD>
</TR>
[[$END_READERWAREAW]]
</TABLE>
[[$TITLE]] | Album Title |
[[$ARTIST]] | Artist in selected format |
[[$ARTISTLAST]] | Artist in Last, First format |
ARTISTBIOLINK | Display a link the use can click on to open the artist contributor dialog. Includes image, biography etc. |
[[$COMPOSER]] | Composer |
[[$CONDUCTOR]] | Conductor |
[[$ORCHESTRA]] | Orchestra |
[[$SOLOIST]] | Soloist |
[[$WORK]] | Work |
[[$LABEL]] | Album Label |
[[$DATE]] | Album release date |
[[$COPYDATE]] | Copyright date |
[[$RUNNINGTIME]] | Album running time |
[[$LANGUAGE]] | Language |
[[$COPIES]] | Number of copies owned |
[[$BARCODE]] | Barcode, normally the same as the UPC |
[[$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. |
[[$LCCN]] | LCCN Library of Congress Card Catalog Number |
[[$DEWEY]] | Dewey Decimal Number |
[[$DEWEYLABEL]] | Dewey Decimal Number. Standard format, Library of Congress extensions removed. |
[[$CALLNUM]] | Library of Congress Call Number |
[[$ALBUMID]] | The Album ID, this is a unique ID allocated to each album 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 Album ID is used |
[[$TYPE]] | Display type |
[[$FORMAT]] | Format |
[[$SERIES]] | Series |
[[$SOUND]] | Sound format |
[[$RATING]] | Rating |
[[$CONDITION]] | Condition |
[[$COVERCONDITION]] | Cover condition |
[[$CATEGORY1]] - [[$CATEGORY3]] |
Categories |
[[$LOCATION]] | Location where this album is stored |
[[$KEYWORDS]] | Keywords describing this album |
[[$PLAYED]] | Number of times the album has been played |
[[$LASTPLAYEDDATE]] | The last time the album was played |
[[$PLAYLIST]] | Is the album on the playlist? |
[[$PRODUCTINFO]] | Product information, reviews etc. |
[[$COMMENTS]] | Comments |
[[$DATEENTERED]] | Date entered into the ReaderwareAW database |
[[$DATEUPDATED]] | Date last updated |
[[$SOURCE]] | Source of import |
[[$CATALOGNUM]] | Album catalog number |
[[$RECORDINGTYPE]] | Recording type Studio, Live etc. |
[[$RECORDINGDATE]] | Date of recording |
[[$RECORDINGPLACE]] | Location recording was made |
[[$PURCHASEPRICE]] | Price paid |
[[$PURCHASEDATE]] | Date purchased |
[[$PURCHASEPLACE]] | Where purchased |
[[$LISTPRICE]] | List price |
[[$VALUE]] | Estimated value of this album |
[[$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 |
[[$FAVORITE]] | Is this a favorite album? |
[[$OUTOFPRINT]] | Is this album out of print? |
[[$MEDIAURL]] | Local copy of media |
[[$OWNER]] | Owner of this album |
[[$STATUS]] | Album status |
[[$EXTERNALID]] | External ID for this Album |
[[$INVENTORY]] | Album inventory count |
[[$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 |
[[$ROWKEY]] | The Album ID, this is a unique ID allocated to each album automatically as it is added to the database |
[[$DISKCOUNT]] | Number of discs |
[[$ARTISTURL]] | Artist web site |
[[$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 album was loaned out |
[[$LOANCOUNT]] | The number of times this album 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 albums 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 albums 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 |
[[$TIMERTOP]] | Tells Readerware to add the album play timer to the top of the summary view |
[[$TIMERBOTTOM]] | Tells Readerware to add the album play timer to the bottom of the summary view |
All keywords must be in uppercase as shown above. They can be in any order,
but must appear between the [[$BEGIN_READERWAREAW]] and [[$END_READERWAREAW]]
lines otherwise they will be ignored.
[[$DISKNUMBER]] | Disk Number |
[[$DISKTITLE]] | Disk Title |
[[$DISKSIDEBREAK]] | For LPs, the first track on side 2 |
[[$UNITNUM]] | Unit number, the changer number, book number etc. where this album is stored |
[[$SLOTNUM]] | Slot number, the slot number, sleeve number etc. where this album is stored |
[[$RUNNINGTIME]] | Disk running time |
[[$USER1 - USER2]] | User defined disk fields |
[[$TRACKNUMBER]] | Track Number |
[[$SIDEANDTRACKNUMBER]] | Display Side and Track Number for albums with a side break. i.e. A1, A2, B1 etc. |
[[$TITLE]] | Track Title |
[[$ARTIST]] | Track Artist |
[[$COMPOSER]] | Track Composer |
[[$CONDUCTOR]] | Track Conductor |
[[$ORCHESTRA]] | Orchestra |
[[$SOLOIST]] | Soloist |
[[$WORK]] | Work |
[[$WRITER]] | Track song writer |
[[$RUNNINGTIME]] | Track running time |
[[$FAVORITE]] | Favorite track |
[[$PLAYLIST]] | Track on playlist |
[[$BONUSTRACK]] | Bonus track, not on original album |
[[$PLAYED]] | Number of times the track has been played |
[[$BPM]] | Beats per minute |
[[$COMMENTS]] | Comments |
[[$MEDIAURL]] | Local copy of media |
[[$USER1 - USER2]] | User defined track fields |
All keywords must be in uppercase as shown above. They can be in any order,
but must appear between the [[$BEGIN_READERWAREAW_TRACKS]] and [[$END_READERWAREAW_TRACKS]]
lines otherwise they will be ignored. Normally the tracks 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:
[[$ARTIST-U]]
This will display the artist in uppercase.
You can apply multiple modifiers to a keyword. For example:
[[$ARTIST-U-L=3]]
This will display the first three characters of the artist in uppercase.