We are using MS RMS 2.0. I have a copy of the Customization Guide and have been figuring out how to modify my receipts. Here is what I'm trying to do. My stores need:
- Customer copy of the receipt (printing from printer 1)
- Store copy of the receipt (printing from printer 1)
- Packing list (printing from printer 2 at the cashier's option)
I have found out that I can:
- Set a reciept to print multiple copies.
- Define a receipt to have multiple pages. (I used the FullPagewithPackingList from MS as a basis)
- Set up printer 1 and printer 2 to output to the same printer.
What I'm trying to figure out is how do I create a single multipage receipt layout that would print both a "CUSTOMER COPY" and a "STORE COPY". I can create the multipage layout but I can't get the title in "DrawHeader" to change from "CUSTOMER COPY" to "STORE COPY."
I've created and initialized the following variable: <SET name="PageName" type="vbString"> "CUSTOMER COPY" </SET>
In the "DrawHeader" I have modified the heading to use the variable. I changed: <TEXT> Transaction.ReceiptTransactionName </TEXT> to <TEXT>PageName</TEXT>
The use of the variable works fine.
In the "Document" section I have:
<!--
===========================
Document
===========================
-->
<DOCUMENT>
<!--
===========================
First page
Transaction Details
===========================
-->
Process the entries for the "CUSTOMER COPY" (FOR loop)
Then I try to change the value of the "PageName" variable
SET name="PageName" type="vbString"> "STORE COPY" </SET
Next I call the "DrawLastFooter" SUB to finish off the "CUSTOMER COPY"
<CALL> "DrawLastFooter" </CALL>
Now I start a new page which causes the automatic calling of the "DrawHeader" SUB
<NEWPAGE></NEWPAGE>
<!--
===========================
Second page
Transaction Details
===========================
-->
Process the entries for the "STORE COPY" (FOR loop)
</DOCUMENT>
According to the Customization Guide for the SET command:
Remarks
This element declares and sets a variable for the receipt template. The variable can then be used in an expression as if it were predefined receipt template variable. The value of a variable can be changed during receipt processing by adding a SET element with the same name attribute.
Based on this I would think that the second iteration would have a new title of "STORE COPY" since the value of the variable is supposedly changed before the new page is generated. But that isn't happening. The second iteration still says "CUSTOMER COPY"
Could someone please explain to me how or what I can do to make this work?
Thanks,
Terry
*This post is locked for comments