Baan Query Tool 2.7: User Guide - Baan LN
Baan Query Tool 2.7: User Guide - Baan LN
Baan Query Tool 2.7: User Guide - Baan LN
7
User Guide Baan LN
NAZDAQ Nazareth Data Quest
10
Contents
1 2 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 3 Introduction .......................................................................................................................................... 3 Make a Query ....................................................................................................................................... 4 Create a new Query.......................................................................................................................... 4 Delete Query ................................................................................................................................ 5 Rename a Query ........................................................................................................................... 5 Add Fields to Query .......................................................................................................................... 5 Printing a simple Query .................................................................................................................... 8 Add Enumeration, Text and Array Fields ....................................................................................... 10 Add Fields from a second Table (Table Linker).............................................................................. 12 Add Formula fields ......................................................................................................................... 15 Customizing the Query form .............................................................................................................. 18 3.1 3.2 3.3 4 5 6 Hiding Fields from Query ........................................................................................................... 18 Save Defaults in the Form .......................................................................................................... 18 Zoom into a Session ................................................................................................................... 19
Sorting output .................................................................................................................................... 20 Customizing Query Layout ................................................................................................................. 21 Output Options................................................................................................................................... 22 6.1 Wide Reports .............................................................................................................................. 22
7 8 9
Organizing Queries ............................................................................................................................. 23 Run-only Query................................................................................................................................... 24 Automating Queries ........................................................................................................................... 25 9.1 9.2 9.3 Run Query inside Baan Run Program ........................................................................................ 25 Run Query From Command-Line ............................................................................................... 26 Run Query From BECS ................................................................................................................ 27
Page 2 of 28
1 Introduction
There is a new and elegant way to create queries and ad-hoc reports on your Baan data: Baan Query Tool. This Baan session comes with an easy to use graphical interface which allows you to create dynamic queries from your Baan database.
Pick a Query
Chose a table
Print Query
Page 3 of 28
To start working in a new Query click on menu bar: Query -> New and insert a query name 3) Now you have a new query with a new name 4) You can view all your queries from this drop down control under Queries for user<username>
Page 4 of 28
If you have the table name insert it on the table field, if not click on find icon and a selection window appears:
Page 5 of 28
Select a table from the list and click Ok 2) Add fields Add the fields you want from the table, by selecting the field and click the add button
Add button
Page 6 of 28
You can also find fields without knowing the 4 letter code. You can simply search for a certain field using the Search that performs a search on both the field name and field description. As an example, if we want to add the Delivery Date for a sales order line but are not sure of the name of the field, we can simply search for Date as below and the only fields that contain Date in their names will appear, making our life easier in choosing a field.
Page 7 of 28
Page 8 of 28
3) Click Continue button and you get the option to choose a device
4) After we specify the device, query results will be printed (Query Report Output).
The Query Form and the Query Report output can be customized to enable greater possibilities and flexibility as we can see in the following chapters.
Page 9 of 28
If we choose a field that is a Text field, the text that is associated will be printed in the query report (and not the text number).
Page 10 of 28
You can also chose a field that is an array and Baan Query Tool will let you print a specific range of each value of the array, field used tdpur400.ratf
Page 11 of 28
3) Specify a field from both tables that is common for both of them to establish the link using it. You can browse tables already linked in this query, and browse field inside the selected table
4) After this you can add any field from this second table Note: You can repeat this by adding a third or more tables to query
Page 12 of 28
To view or maintain a link between two tables in the query: On menu click: Query -> Table Linker
The possible actions for each link are the following: Add Link add another link to query (same as we did above) Link Type Change an already existing link with 3 link types available:
Remove Link we can remove already exists link from this query
Example: We want to create a query that displays Sales Orders lines with customer name and Item description with price and quantity for each line In order to display all this information we need to link 3 tables together: - Tdsls401 That contains Sales order Lines. - Tccom100 that we will link to in order to get customer name - Tcibd001 we link this table to get item description
Page 13 of 28
Here is an example of the query in Baan Query Tool (To view field details on menu click: View -> View Fields Details):
Page 14 of 28
Form fields: a. Column name name of formula field. Default is generated by BQT. b. Column Description Description of column, as it will be displayed in the report. c. Column Type Data Type of the formula field: Possible values are Date, Long, Double d. Column Width specify the column width as it will be displayed in the report. e. Column alignment formula alignment in report. Options are: Default, Center, Right and Left
Page 15 of 28
f.
Column format formula format. You can chose from a list of formats that are supported in your Baan system. Sample expression of 1234.00 (or 1234,00) is displayed to ease the choice of the format.
Operators supported are +, -, *, / Example of a formula: We want to display all the items we have in database, with their Material Cost and Standard Cost and also to create another formula to calculate the percentage of material in the Standard Cost. The formula is (Material Cost / Standard cost) * 100
Page 16 of 28
Page 17 of 28
If all the fields in the query have this option unchecked, we will not have a form at all. If we have a form with few fields, but wish to hide it for a special reason (run in job for example), we can hide it by going to the menu: Options -> Device and check Hide Print Form. Once we uncheck this option, the form will return as it was before.
Page 18 of 28
When printing this query, we get a zoom icon next to Item field
Using this we are able to browse for giving a better range constrain on our query
Page 19 of 28
4 Sorting output
You can sort the output results by specific fields. To do this on menu click: Options -> Sort, a window like this appears
You can zoom for what field you want to sort by:
Ascending and descending sorting are available. Note: You cant sort according to a formula field
Page 20 of 28
The following options are available. Rename Column Description to a new description Specify a specific size for column width to appear in output (to override default that may be too big) Change column alignment in output results (including column data and column title). The following options are available: Default Field default from Baan/ERP Ln Center, Right, Left Specify the format of the field as it will be displayed in the result. The formats available are the ones defined in the system.
Include field in results If this option is checked the field will appear in output result (Default is Yes for all fields). In order to hide a field from the output, uncheck it.
Page 21 of 28
6 Output Options
For automating the process of generating queries, you can save your default print device and the output file for each query (the parameter that is passed to the device). This is particularly useful in jobs.
1) In Baan Query Tool click on menu: Options -> Print 2) You will acquire this window
When printing, the query will automatically be sent to the device (B2Win in Excel format in this case) and the user wont be prompted to enter the device name. If the Print form is also hidden (Hide Print Form), pressing on the query will result in producing an Excel Sheet with no questions being asked on ranges and print devices.
7 Organizing Queries
Queries are organized in the order they have been created. In order to change the order of your queries, you may wish to use the Query Organizer. This is useful in Run-Only Query Mode (covered in the next chapter) To organize your queries, on menu click: Query -> Organizer
From this window you can change the order of your queries by selecting a query and clicking on Up or Down.
Page 23 of 28
8 Run-only Query
Administrators and Key Users can create queries. Regular users should not be able to change queries, but only run them and use the results. For regular users, a run-only query session is available - tccom2bqt27p Usage: Open session: tccom2bqt27p
View users list Print Query
Page 24 of 28
If you wish to automate a query that is written by a different user, the query owner user name should be passed in parameter as in the following example: tccom2bqt27p BQ000000000124,bsp
Page 25 of 28
Page 26 of 28
5) Click on save as and you will have a new shortcut inside BECS, named TestQuery as we specified for example
6) Launch TestQuery will print the query in the device you chosen
Page 27 of 28
Warning
Trade Marks
Baan Query Tool is a trade Mark of NAZDAQ Ltd. All other referenced company and product names may be trademarks or registered trademarks of others.
NAZDAQ
For Support, please contact [email protected] Phone Fax +972-4-608-0023 +972-4-647-0112
Our office Hours are Monday - Thursday 10:00 19:00 and Friday 10:00 17:00 GMT +2 Check our website for other Baan and ERP Ln Related Products www.nazdaq-it.com
December 2010
Page 28 of 28