Advanced report designer and viewer
The designer and the viewer are standard tools for designing and showing reports. The program uses them for printing with advanced reports. This page describes what the program adds to them, what it removes from them, and what appears in their helper windows. The general design commands, such as inserting text, tables and pictures and setting fonts and borders, belong to the tool itself and appear on the ribbon under their own names.
For short steps, see Design an advanced report. For printing and previewing, see Print documents with advanced reports. For saving, exporting and importing templates, see Advanced reports management.
Opening the designer
The designer does not open from the Advanced Reports Management window. It opens from two places, with the advanced reports printing option turned on in Program Options > Display:
- The Design button in the advanced print options window, which appears when you print a document. See Print, preview and print options.
- The Design ... button in the print settings for points of sale and for restaurants. See Print design for points of sale and Restaurant print options.
The designer opens over the window that called it, and you cannot work in that window until you close it. It opens the template you chose in the list. If you chose none, it opens a new empty report of the document type you are printing.
Opening the viewer
The viewer opens from two places:
- The Preview button in the advanced print options window. It shows the template selected in the list.
- The Preview button in the bill windows, including the order and transfer windows, and in the journal entry and receipt/payment voucher windows, with printing by advanced reports turned on. It shows the template you chose earlier for this type of document. If you have no saved template for the type, the print options window appears instead of the viewer.
In the other windows, such as the shipment window, Preview opens the print options window every time. For details, see Print documents with advanced reports.
Advanced report designer
The designer opens maximized, always left to right, with no Ok or Cancel button at the bottom. Its title is "Advanced Report Designer - report name". It first shows a picture until it is ready, and then opens the report. If the report cannot be created, a message with the error text appears and the window closes.
The name of a new report is the document type name, a space and 1, such as "Invoice 1".
Ribbon
The ribbon is that of the standard design tool, and the program adds three buttons:
| Button | Where | What it does | When it is disabled |
|---|---|---|---|
| New... | First in the Report group | Opens the New window to start a new report. | Never. |
| Export | Last in the Report group | Saves the report to an .amnarx file. It opens the Export window, which is the template export window, and saves what is in the designer now, including unsaved changes. | If you opened the designer without choosing a template, and have not saved yet or clicked New.... |
| Change Data Source | Data group | A list of the data sources available for the document type. You choose one and it replaces the current source. | Shown only if the document type has more than one data source in the file. |
The rest of the ribbon is from the standard tool: the tabs Home, Page, View, Preview and the scripts tab, groups such as Report, Clipboard, Font, Alignment, Borders, Styles, Arrangement, Snapping, Page Setup, Bands and Show, and tool tabs that appear when you select an element: text, table, chart, pivot grid, barcode, shape, gauge, sparkline and character comb tools.
The Report group also has the standard commands New Report, Open..., Save and Save As.... New Report and Open... do not work in this designer because the program's template storage does not allow them; start a new report with the New... button. Save and Save As... work as described in Saving.
What the program removed:
- From the ribbon: the Localization group, the commands to add a data source and add a parameter, and, on the Preview tab, the file group and the parameters and editing fields commands.
- From right-click menus: add data source, add parameter, edit parameters, remove all parameters, configure connection, manage queries, manage relations, and rebuild, update and request the schema from the database.
- From the data source menu: delete, copy, cut, properties and add to gallery. From the parameter menu: delete. From the collection menus: paste. From the subreport menu: edit parameter bindings.
- A subreport does not open in a second designer when you try to open it.
Properties that are hidden: the Properties panel hides these properties:
- On the report: the right-to-left layout, the data source and its adapter, the filter string, the parameters, the localization, the expression language, and the XML data path.
- On the data source: the queries, relations, connection name, options and parameters.
- On the subreport: the report source, its URL and the parameter bindings.
You set the direction with the Right-to-Left Layout option when you save.
Panels
The designer shows the panels of the standard tool: Field List, Report Explorer, Properties and Group and Sort. The Field List has a search bar that is always shown and filters the fields together with their parents.
Data source and parameters
Each document type has a ready data source in the file, named prcPrintAR_, then the type name, then _Default, such as prcPrintAR_Bill_Default. The source receives the ID of the saved document you are printing and returns that document's data. So the preview and the print rely on the saved document, not on what you typed in the window and did not save. The name of the data source inside the report is CurrentDb.
The program puts a hidden parameter named CurrencyId in the report, with the document currency. It is available in expressions, with the NumberToText function for example. Vouchers have a second parameter named FirstItemCurrencyId with the currency of the first line. The program adds no parameters for the packing list.
Al-Ameen functions
In the expression window, under the Al-Ameen category, are functions the program adds. The description of each appears when you select it:
| Function | What it returns |
|---|---|
ToQuantity(Value) | The value with the number of decimal places set for quantities on the Numbers tab in the program options. |
ToPrice(Value) | The value with the number of decimal places set for prices. |
ToExchangeRate(Value) | The value with the number of decimal places set for the exchange rate. |
ToBalance(Value) | The value by the balance display format: the number with the price decimals, followed by "Debit" if the balance is zero or more and "Credit" if it is less, as a full name, an abbreviation or a custom sign by the program option. If the balance is zero, the function shows the zero text if that is turned on. |
ToDate(Value) | The date only, in the date format of the options. |
ToDateTime(Value) | The date and time, in the date format. |
ToTime(Value) | The time only. |
NumberToText(Value, CurrencyId) | The value in words, for the currency given by its ID. |
IsAdmin() | True or false, by whether the current user is an administrator. |
GetDatabaseDescription() | The current database description. |
GetDatabaseName() | The current database name. |
GetDatabaseFullName() | The name, including the server name. |
GetServerName() | The server name. |
GetUserName() | The current user's name. |
GetLanguage() | The current program language, such as ar and en. |
Subreport
When you select a subreport in the design, its smart tag window shows the Template box. Click the browse button in it to open the Select Template window and choose a template of the same type. Its name then appears in the box.
Saving
- Save for a report that was saved before (you opened it from the list or saved it earlier): saves the design and its thumbnail in the same template, and does not change its name or options. The program does not check the owner of the template: anyone who sees a shared template can save it.
- Save for a new report not yet saved, and Save As...: the Save window appears. When you click Ok, the program creates a new template in the file, assigns it to the current user and updates the designer title. If you opened the designer from the print options window, then when you close it you find the new template added to its list and selected.
- The program creates the thumbnail on every save by running the report on the current document and taking a picture of its first page.
- The designer saves the favorite properties and the report gallery in two files inside a folder named
Report Designerin the program data folder.
New window
This appears when you click New... in the designer. If the designer has unsaved changes, the program first asks "The document has been modified. Do you want to save the changes?" with the title Save: Yes saves and continues, and No continues without saving.
| Item | Description |
|---|---|
| Search box | At the top of the window. Filters the cards by name. Press Ctrl+F to move the cursor to it. |
| Blank Document card | Always the first card. Starts an empty report from the ready data source of the type. |
| Ready template cards | Templates published on the online template service for the document type. Each card has a picture and a name. A spinning mark shows in place of the picture until it downloads. |
Click a card to select it. Ok is disabled until you select a card. Double-clicking a card selects it and closes the window. You can maximize the window. While the list loads, a progress bar shows at the bottom, and closing the window stops the loading.
| Button | What it does |
|---|---|
| Ok | Blank Document: opens a new report named like "Invoice 1". A ready template: opens the Download window, then opens the downloaded template in the designer as a new, unsaved report. |
| Cancel | Closes the window and changes nothing in the designer. |
Download window
A small window with no title bar and no buttons at the bottom. It shows the template name in bold at the top, under it "Downloading template..." and a progress bar, and then a Cancel button. The window closes by itself when the download ends. If you click Cancel, it closes and nothing changes in the designer. If the download fails, a message with the error text appears.
Save window
This appears when you save a new report or click Save As... in the designer, and when you click Edit and Create a Duplicate in Advanced reports management. Its title is Save As in the designer, Edit when editing and Create a Duplicate when duplicating. The fields are the same in all cases.
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Name | The template name. The cursor is in it when the window opens. | Yes | Starts with the current report name. It must not be empty, and must not be used by another template of the same type. |
| Right-to-Left Layout | Prints and shows the template right to left, including the subreports. | No | Starts with the current report's value, and unticked for a new report. |
| Shared | Makes the template available to all users of the file. | No | Starts with the current report's value, and unticked for a new report. |
When you save a template you downloaded from the service, the fields start with the name and the two options stored in the template.
| Button | What it does |
|---|---|
| Ok | Checks the name and saves. Disabled while the name is empty. |
| Cancel | Closes the window without saving. |
Select Template window
This appears from the Template box of a subreport. Its size is seventy-five percent of the screen, and you can maximize it.
| Item | Description |
|---|---|
| Tile View and Details View | Switch between cards and a table. |
| Search | Shows the search bar. |
| List | The templates of the same type that you created or others shared, each with a thumbnail and a name. Details view has only the Name column. |
| Message "You have not added any reports yet." | Appears with a picture if no template of the type exists. |
While loading, a fading picture shows, and the toolbar and the list are not shown. Ok is disabled until a template is selected. When you click Ok, the program sets the chosen template as the source of the subreport. Cancel closes the window.
Advanced report viewer
The viewer opens maximized and with no buttons at the bottom. Its title is "Preview - document name", such as "Preview - Sales Invoice 5". It shows a picture until the report is ready. If the report cannot be created, a message with the error text appears, and then the viewer closes. The viewer applies the Right-to-Left Layout option saved with the template.
The viewer toolbar is the standard preview toolbar. These are its visible commands:
| Command | What it does |
|---|---|
| Print... | Opens the print window so you choose the printer. |
| Quick Print | Prints directly. |
| Page Setup | Changes the paper, margins and orientation. |
| Scaling | Changes the print scale. |
| Find command | Searches for text in the report. |
| Zoom In, Zoom Out and the zoom list | Set the display size: Page Height, Page Width, Whole Page, Two Pages. |
| First Page, Previous Page, Next Page and Last Page | Move between pages. |
| Thumbnails and Document Map | Show the navigation pane of the document. |
| Show Cover Page | Shows the cover page. |
| Hand Tool, Select Tool and Copy | Moves the page, selects a part, or copies it. |
| Export... | Saves the report to a file in one of these formats: PDF File, HTML File, MHT File, RTF File, DOCX File, XLS File, XLSX File, CSV File, Text File, Image File. |
| Send... | Sends the report by email attached in one of the same formats, except HTML. |
| Watermark | Adds text or a picture behind the page content. |
The viewer does not show Open and Save, parameters or editing fields: the program removed them.
Messages
| Message | When it appears | What to do |
|---|---|---|
| The document has been modified. Do you want to save the changes? | You clicked New... and the designer has unsaved changes. It has the buttons Yes and No. | Yes saves the report and continues. No continues without saving. |
| The template name is already in use. Choose another name | The name in the Save window is used by another template of the same type. | Type another name. |
| The error text returned by the system | The report or the data source could not be created in the designer, a template could not be downloaded, the report could not be created in the viewer, or saving to the file failed. | Read the text and fix the cause. The designer or the viewer closes if the error is in creating the report. |
Related
This page applies to alameen ERP 10, version 10.1.79.764.