Cash Register keyboard layout

edited August 2010 in FastReport 4.0
Hi

I normally use MS Word 2007 to print a cash register keyboard layout. Currently the most common layout is a "table" of 12 columns and 13 rows.

Each cell is 1.6cm square.

Generally, each cell has from 1 to 3 lines of text. In the majority of cases the text (per line) is no more than 9-10 characters across, otherwise the text becomes too small for easy reading by the user.

Sometimes the layout can be an "L" shape, both layouts are shown on these cash registers here...

http://www.uniwell.com/unihtml/products/hosp/sx7k8k.php

The cells also need to be color coded, as they are not all to be a white background. Some of the cell text can remain constant in content and position, so these could be created as FR report templates (?).

The remaining table cells will have the item text describing the item sold (when that key is pressed).

The item sold on each key will be selected from a db table. The order of the items in the table will be by item number, but this number is unlikely to coincide with the keyboard layout. Therefore the selection of the item number to the key position would need to be done "manually" or by a relationship of item number to key position on the keyboard layout eg x-y coordinate to item number, maybe a separate field in the item table to associate the item to the key.

I am seeking advice on how to go about creating this relationship and applying the relationship to the keyboard layout or position.

I don't think there will be a need for a data band per se, as I expect the table would be drawn by "code" or FR script. The FR template used will already contain the cell borders, I have created a template by adding 156 memos, 1.6cm x 1.6cm in size.

I thought also that I could then do something like memo24.text := "Item 1" (syntax my require correction here). Such an approach my remove the need for keyboard layout coordinates.

By specifying the memo number, I would also be able to modify each memo, e.g. background color, etc.

How do I create the text content from a db description. For example the keyboard table cell text might be something like "CAESAR SALAD ENTREE" or "BACON EGG SPINACH TOASTIE", how do I set the text in the cell, over the three text lines? Should I set up three fields in a table, one for each line? But what if I only have one or two lines, how do I centre the one or two lines vertically in the cell?

Now to top this off, it would be VERY NICE if I could drag and drop the item from a table to the keyboard layout cell and choose all of the required cell settings. To do this I imagine I would need to "emulate" the keyboard layout and use such an emulation to do the required setup and then "translate" those settings to the template.

Should an emulation be used? If so do I create a table to contain the text, color settings etc for each cell and then process each FR report cell in column order one row at a time.

In my own mind I can picture the operation, but have no idea where to start with FR for such a project. Please keep in mind that I do have a FR template that I have checked for physical alignment on the cash register and it fits perfectly.


I hope someone can assist with at least some startup tips [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Thank you in advance...[/img]

Comments

  • edited 12:02AM
    Hi Again

    After thinking about this for ten minutes, I thought perhaps if I create my own class or object e.g. "TKbLayout" containing the required number of "speed buttons" for the necessary report template/layout, I could then use those speed buttons to save the data to a suitable table for the template.

    Then I thought perhaps I should create my own button or similar, e.g. "TKbButton" that I could enhance with some appropriate FR memo properties. This could then perhaps allow me to do something like

    FrxMemo1.color := KbLayout1.KbButton1.color.
    FrxMemo1.Text := KbLayout1.KbButton1.Text.

    Further to this I could then process all of this within an appropriate loop structure to iterate through each "cash register key".

    So another question, is there a FR object from which I could/should derive a "button", I am thinking along the lines of maybe the FR dialog buttons?

    Of course now I am thinking, "well why not make this class, data aware". Hmm? that would be good, but I have never created a data aware class, though I will now look into that option.

    If I can impose on the collective wisdom here, from what object should I derive my TKbLayout? I considered starting with a form, this way I could make it data aware and have suitable fields on the form. Would a TPanel be better for other reasons?

    Thank you again for any assistance...


Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.