A5 Template load

I have just been helping a new user and I got into problems associated with loading A5 templates.

Can I suggest that we rename templates.xml to templatesA5.xml and add a version edited to load A4 templates and call it templatesA4.xml

We would also need to tweak the readme.txt to read as follows:

1.7 Document Templates

  Document templates used for invoices, payments etc., are located in <OPENVPMS_HOME>/reports.
  These need to be loaded prior to use.
  This can be done using the 'templateload' script. E.g:

  > cd <OPENVPMS_HOME>/bin
  > templateload ../reports/templatesXX.xml

where XX is A5 if you want to use A5 invoices etc, and A4 if you want to use A4.

  For users in the US, templates in LETTER format can be loaded by running:
  > cd <OPENVPMS_HOME>/bin
  > templateload ../reports/US/templates.xml

If this sounds sensible, yell and I will build and test the templatesA4.xml file (unfortunately it is not as simple as change all A5 to A4).

We would also need to tweak the CSH text a little - that talks about how to switch A5 to A4.

Regards, Tim G

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: A5 Template load

I think having a seperate template load to setup for A5 printing is smart.   Its an implementation step of course.  

Sincerely Ben

 

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Re: A5 Template load

I have created the A4 file and it is attached.

Points to note:

1.  In places the file naming convention is poor - most of the items jrxml's are called '....tems A5.jrxml' for the A5 versions but the A4 versions are just '....items.jrxml'.  I have not corrected this because it would require file name changes.

2. In the standard (A5) file, the Till Balance description is 'description="Till balance - A5"'.  In fact the report is A4 format.  In the A4 xml, I have changed it to 'description="Till balance - A4"'.
[Again the naming conventions as regard paper size are not consistent - for example the Work In Progress report does not have A4 in its description, but Bank Deposit does.]

3. Apart from the samples, the following items are not loaded by the standard templates.xml:

Delivery A5.jrxml
Delivery Items A5.jrxml
grouped reminders postcard.jrxml
Prescription.odt
reminder card single.odt

I understand why the reminder ones are not loaded (they are variants), but it seems to me that the delivery ones and the prescription should be loaded.

 

The new templatesA4.xml is attached (renamed to .txt so it will attach).

If this goes ahead then the 1.8 CSH text needs to be adjusted to reflect that you can load either the A4 or A5 set, but in both cases not everything is in A4 or A5 size. That is, if you load the A5 set, then things that need the space use A4 format; and if you lead the A4 set, then some things use A5 because the information printed will fit on A5 and cannot usefully be expanded to A4.

Points 1 & 2 need not be addressed, but I think that 3 should be - ie we need to add the delivery and prescription documents to the templates xml files.

Regards, Tim G

AttachmentSize
templatesA4.txt 21.8 KB

Re: A5 Template load

Sorry - I screwed up and edited ithe initial post.  I have corrected that.

----------------------------------------------------------------------------------

Testing revealed that the templatesA4.xml had an error - countersaleItemsA4.jrxml rather than countersaleItems.jrxml - the corrected version is attached (as .txt)

Regards, Tim G

AttachmentSize
templatesA4.txt 21.8 KB

Re: A5 Template load

It may be time separate reports along the lines of:

  • required templates by format
    • A4
    • A5
    • US letter
  • optional templates (e.g. SQL reports)
  • examples

Each of A4, A5, and US would provide their own templates.xml. Where there is no specific template, fall back to the A4 version.

A possible directory structure:

<OPENVPMS_HOME>/reports

A4/

A5/

US/

sql/

examples/

Re: A5 Template load

Good idea - but in order to simplify both maintenance and to make it as easy as possible for the new user, do the following:

  • have the templateXX.xml files in the reports directory
  • put the examples/samples in their own directory
  • put the remainder in directories by page size

Hence all the templatesXX.xml files will have the same number of lines (because they all load the same suite).

Thus the templateUS.xml would grab the US sized stuff from the US directory for those that have US versions, and the others from either the A4 or A5 directory.

From a maintenance point of view, this is simpler because, for example, the US folder contains only the US sized stuff and not also copies of those templates that do not have a specific US size.

If it helps I have an excel spreadsheet that generates the XML from a table of information (and thus helps maintainability because it is easier to find errors and inconsistencies in tabular data). It generates one line of XML per template.

Note that the above scheme assumes that templateload can handle a path in the path directive, eg

<template name="Stock Adjustment" archetype="act.stockAdjust" reportType="WORKFLOW" description="Stock Adjustment A4" path="A4\stockAdjustmentA4.jrxml" mimeType="text/xml" docType="document.other"/>

and that it can handle the \ as the directory separator in the windows environment.

Regards, Tim G

Re: A5 Template load

After playing with the spreadsheet to generate the required xml, I have come to the conclusion that things would be simpler if we adhered to the convention that the paper size of the content file is implied by the directory in which it is located, and not by its file name. Thus all the items in the A5 directory are A5 and we remove the A5's for their names, ditto for the US and A4 directories. Furthermore we should adopt the 'filename has no spaces' convention so as to make things easier for the linux based servers.

We should also adopt the convention that where other than A4 is being used the description includes the paper size in brackets - eg Invoice (Letter) and Credit Items (A5).

I am happy to do this cleanup (which will also require adjustment of the sub-report names in some reports).

Regards, Tim G

 

Re: A5 Template load

That would be great thanks.

Can the archetype templates also be organised in directories by type? If you are loading templates via Upload, it makes it easier to determine what is required.

E.g:

<OPENVPMS_HOME>/reports

A4/

Appointment/

Appointment.jrxml

Invoice/

Invoice.jrxml

Invoice Items.jrxml

Invoice Reminders.jrxml

A5/

Invoice/

Invoice.jrxml

Invoice Items.jrxml

Invoice Reminders.jrxml

US/

examples/

Note that I prefer spaces in the names for readability. I don't think users will be accessing templates via the command line.

 

Re: A5 Template load

Good idea - I started building the directory structure, but have come to the conclusion that it would be better under each paper size (ie A4, A5, US) to partially replicate the menu structure, ie

Customers
    Counter Sale
    Credit
    Credit Adjustment
    Debit Adjustrment
    Documents (ie forms and letters)
    Invoice
    Receipt
    Refund
    ...etc.

Patients
    Documents (ie forms and letters)
    Medical Records

Supplier
    Credit
    Invoice
    Delivery
    Order
    ...etc

Workflow
    Appointment
    Task

Products
    Stock Adjustment
    Stock Transfer

Reporting
    Till Balancing
    Deposits
    Debtors
    Work In Progress
    Reports
        Customer
        Financial
        Patient
        Product
        Supplier
        Workflow
 

This makes the directory structure one level deeper but it make it easier to find things.

The directory structure would be the same for all paper sizes, and thus for say A5, there would be nothing in the Reports directories because there are (currently) no A5 reports.

What do you think?

Note that I think we problably also need to add 'Labels' at the 'paper size' level - I will see how things go when I build the spreadsheet to generate the XML.

Regards, Tim G 

Syndicate content