Developer Interview: Working with POS receipts and reports

Updated: October 26, 2007

Kevin Pham

Kevin Pham, a Microsoft Software Design Engineer in Test (SDET) who works on the Microsoft Dynamics Retail Management System (RMS) development team has the answers you’ve been waiting for.

We want to thank everyone who took the time to send in their questions and comments for this question and answer page. We received many great questions, and Kevin was a champ. He answered as many as his busy schedule would allow.

If you don't see your question answered here, we suggest you post it in the Microsoft Dynamics RMS newsgroup. You’ll find this public newsgroup frequented by many Microsoft experts, employees, and partners who are happy to help.

Q: I would like to be able to strike out the deleted, adjusted, or voided items in the printed receipt and on the screen. How can I do this?

Kevin Pham: It is not possible to strike out the deleted, adjusted, or voided items in a printed receipt or on screen.

Q: I would like to see the items I strike out, delete, or void in a daily report setup. How can I do this?

KP: There is no report that lists the items that have been struck out, deleted, or voided.

Q: How I can set up a receipt for returned items? I would like to print several copies for the same action. I also would like one copy stating the reason for the return to be placed with the returned product itself, and one copy for the customer.

KP: The easy way is to use the Reprint Receipt function. Pressing Shift-F11 will let you print as many receipts as you want.

Adding the code block below to receipt.xml will add code that states the return reason to the receipt:

<IF>
  <CONDITION>
    Transaction.Type = transactionSales &amp; (Entry.Quantity &lt; 0) amp; Len(Entry.ReasonReturn.Description)
  </CONDITION>
  <THEN>
    <ROW>
      "|Reason: |" Entry.ReasonReturn.Description "|"
    </ROW>
  </THEN>
</IF>

Q: If it is not answered in the documentation, how do you add the Account type to a receipt if the Tender type is Account? I have tried to access the Customer.AccountTypeID as I would by using QSRules, but it doesn’t seem to be defined. I can only assume that the QSRules interface is not what is being used in the receipts. Is that true? If so, how do I get to the data that I need?

KP: You are correct. The QSRules interface is not what is being used in the receipts. That is why Customer.AccountTypeID cannot be used in the receipts.

However, there is a workaround:

Open Manager -> Database -> Customer. Click the Additional tab, and enter the customer’s account description in the Custom Text 1 text box. For instance, if the Account type is Revolving, type Revolving in Custom Text 1 (the first text box). Now you can use Customer.CustomText1 in the receipts.

Q: Our receipts print out with our customers’ account numbers. We would also like their names printed on the receipt. I see an option in the receipt properties for printing out the customer address but not the customer name. Am I out of luck on this?

KP: Please use Customer.Name in the receipts.

Q: We use our manufacturers’ UPCs for the item lookup codes. Also, we use a simple (cheap!) pricing gun to ticket the inventory. Is there a report available that would provide retail prices for items on a particular purchase order?

KP: Modify the template for Alias List. Change its name to Custom - PO Item Price.qrp. The report can be retrieved by selecting Reports -> Custom -> PO Item Price after you create the .qrp file.

You can use the following SQL query to create this report:

TablesQueried = "from item inner join purchaseorderentry on item.id = purchaseorderentry.itemid inner join purchaseorder on purchaseorderentry.purchaseorderid = purchaseorder.id"

Begin Column

    FieldName = "Item.ItemLookupCode"

    DrillDownFieldName = ""

    DrillDownReportName = ""

    Title = "Item Lookup Code"

    VBDataType = vbString

    Formula = ""

    ColHidden = False

    ColNotDisplayable = False

    FilterDisabled = False

    ColWidth = 1965

    GroupMethod = groupmethodNone

    ColFormat = ""

    ColAlignment = flexAlignLeftCenter

End Column

 

Begin Column

    FieldName = "Item.Description"

    Title = "Description"

    VBDataType = vbString

End Column

 

Begin Column

    FieldName = "Item.BinLocation"

    Title = "Bin Location"

    VBDataType = vbString

End Column

 

Begin Column

    FieldName = "Item.Price"

    Title = "Price"

    VBDataType = vbCurrency

End Column

 

This would allow you to ticket all items in the receiving area when there isn’t a PC available to do a lookup.

Template: Get the entire Purchase Order Item Price report template that Kevin created.

Q: I have been notified by a manufacturer and the appropriate government agency about a safety recall on a toy that I have sold. I need a report listing all customers who have purchased this item so that I can inform them of the recall.

I would like to see the following account information: name, address, phone number, and date of purchase of the item. Is this possible?

KP: Modify the template for Customer List. Change its name to Custom - Recall List.qrp.

Use the following SQL query to create that report:

TablesQueried = "from customer inner join [transaction] on customer.id = [transaction].customerid inner join transactionentry on transactionentry.transactionnumber = [transaction].transactionnumber inner join item on item.id = transactionentry.itemid"

 

Begin Filter

    FieldName = "[Transaction].Time"

    FilterOp = reportfilteropBetween

    FilterLoLim = "<YearStart>"

    FilterHilim = "<Today>"

End Filter

 

Then add the following columns, and remove any unnecessary columns of your Customer List:

 

Begin Column

    FieldName = "Customer.Address"

    DrillDownFieldName = ""

    DrillDownReportName = ""

    Title = "Address"

    VBDataType = vbString

    Formula = ""

    ColHidden = False

    ColNotDisplayable = False

    FilterDisabled = False

    ColWidth = 1580

    GroupMethod = groupmethodNone

    ColFormat = ""

    ColAlignment = flexAlignLeftCenter

End Column

 

Begin Column

    FieldName = "Customer.Address2"

    (same as above)

    Title = "Address 2"

End Column

 

Begin Column

    FieldName = "Customer.City"

    Title = "City"

End Column

 

Begin Column

    FieldName = "Customer.State"

    Title = "State"

End Column

 

Begin Column

    FieldName = "Customer.Zip"

    Title = "Zip"

End Column

 

Begin Column

    FieldName = "Item.ItemLookupCode"

    Title = "Item Lookup code"

End Column

 

Begin Column

    FieldName = "[Transaction].Time"

    Title = "Date Sold"

    VBDataType = vbDate

End Column

 

Template: Get the entire Recall List report template that Kevin created.

Q: On Microsoft Retail Management System, how do we store the serial numbers of computer products larger than 20 characters? On Microsoft Axapta, we can store up to 40 characters for serial numbers in our system.

KP: Microsoft Dynamics RMS limits the maximum length of a serial number to 20 characters.

Kevin Pham is a Software Design Engineer in Test (SDET) on the Microsoft Dynamics RMS development team. He works in the United States in Redmond, Washington.



Was this information useful?