Example. Local Menu – Custom Reports
Once you have created your own report in the report generator, you can open this report via a pop-up menu item.
First you need to find out which page/tab you want to create the pop-up menu on.
Open this tab, for example the item overview, and press the F12 key. A message box will now appear. At the top of the box is Control: and a name. You should use this name when you create your menu.
Then go to Tools/Menus/Local menu
Selects ControlName, which is the name you got from the control box for e.g. the item overview.
Then you fill in the following fields:
- Lead text: The name of the menu you are creating, e.g. Item list
- ControlType: Here you select ReportPreview – to be able to select the report you have created.
- Control: Here you enter the name of the report.
- Line number: Here you choose the order of your menu items
- Arguments: If you have built a custom report, you can choose which data you want to show in the report. Read about arguments here…
- Disable: Only used if you want to disable the menu
When All fields are filled in, click Save and the tabs will close to Refresh the pages.
Go to the page where you created the menu and view your menu item.
Example. Local Menu – ImportControl
Creating Local Menu that uses ImportControl.
In the example below we want to create an ImportControl for loading Transactions into the accounting journal.
Creating a column definition file
First you define the positions in the file to be loaded. In the example, there are 9 columns distributed as shown below.
Then save the definition file by pressing the ‘Save positions’ button. The file is saved in the following directory c:\temp\Importcontrol.
Creating a pop-up menu in the screenshot
In the example, the Local menu should be created under Accounting journals (GL-DailyJournal)
Local menus can be found under Tools.
Import control
Caption: Enter a text for the menu item here
ControlType: ImportControl
Arguments: Enter the arguments here:
Table: Enter the name of the table to load into.
File: Specify the location and name of the file to be loaded.
Positionfile: Specify the location and name of the Definition file created earlier in the example.
In the example, the argument string looks like this:
Table=GLDailyJournalLineClient;File=c:\temp\importcontrol\ImportFile.csv;Positionfile=c:\temp\importcontrol\GLDailyJournalLineClient_Position.txt
Remember to separate the arguments with a semicolon.
Export Control
Caption: Enter a text for the menu item here
ControlType: ExportControl
Arguments: Enter the arguments here:
Table: Enter the name of the table to load into.
File: Specify the location and name of the file to be loaded.
Positionfile: Specify the location and name of the Definition file created earlier in the example.
In the example, the argument string looks like this:
Table=invitemstorageClient;File=c:\temp\Exportcontrol\\Export_File.csv;Positionfile=c:\temp\Exportcontrol\ItemPosition.txt
Remember to separate the arguments with a semicolon.
Example. Calling Dashboard from Local Menu
A Dashboard argument can contain the following in the local menu.
| Command text | The text displayed in the pop-up menu | ||||||||||||
| ControlType | Form (Must always be Form for Dashboard) | ||||||||||||
| Control | DashboardViewerPage | ||||||||||||
| Line number | Sort order in the pop-up menu | ||||||||||||
| Arguments | Below are the arguments used by Dashboard | ||||||||||||
| Dashboard Name | Opens Dashboard with the Name entered | ||||||||||||
Additional arguments Dashboard | The arguments below do not work on custom queries unless there is a unique field that crosses all queries. Opens the dashboard with the typed name filtered by the typed field: e.g. [Project] and filtered by the line the cursor is on. For example, ProjectRecords;sourcetype=UseCurrentRecord opens a Dashboard with the Name ProjectRecords of the Project the cursor is on and nothing else.
This opens the same Dashboard, but now Synchronised with the active line “CurrentRecord” Project records;sourcetype=UseCurrentRecord;sync=true The argument could be the following:
|