Kexi/Tutorials/Reports/Kexi Reports for Beginners: Difference between revisions

From KDE UserBase Wiki
No edit summary
m (typo)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Kexi/Tutorials/Reports|&larr; Back to Report Tutorials]]<br/>[[Kexi/Tutorials|&larr; Back to Tutorials]]
<languages />
<translate>


'''This is a basic beginner's guide to making a report using Kexi 2.2 or newer.'''
<!--T:1-->
[[Special:myLanguage/Kexi/Tutorials/Reports|&larr; Back to Report Tutorials]]<br />[[Special:myLanguage/Kexi/Tutorials|&larr; Back to Tutorials]]


Note: You may click on the screen shots below to see more detail, and click the "back" button to return to this display.
<!--T:2-->
''This is a basic beginner's guide to making a report using Kexi 2.2 or newer.''


We begin with a table named "masterlb" shown in data format. In this example, the fields are named "author", "title", "keywords", and so on.
<!--T:3-->
{{Note|1=You may click on the screen shots below to see more detail, and click the "Back" button to return to this display.}}
 
<!--T:4-->
We begin with a table named ''masterlb'' shown in data format. In this example, the fields are named ''author'', ''title'', ''keywords'', and so on.
Before making a report, we create a query.
Before making a report, we create a query.


Select "Query" command from the "Create" tab of the main toolbar.
<!--T:5-->
Select <menuchoice>Query</menuchoice> command from the <menuchoice>Create</menuchoice> tab of the main toolbar.
 
 
<!--T:6-->
[[Image:Kexi-Tutorials-Reports-Kexi Reports for Beginners-Create Query.png|center|600px]]
 
 
<!--T:7-->
In the <menuchoice>Query Design</menuchoice> view, select the desired table from the combo box and click the <menuchoice>Insert</menuchoice> button.  A box representing the selected table appears with list of field names. Double-click on each field you want in your query.
 
 
<!--T:8-->
[[Image:Kexi-Tutorials-Reports-Kexi_Reports_for_Beginners-Insert_Fields_for_Query.png|center|600px]]


In query design view, click on "Insert".  A list of field names will drop down. Double-click on each field you want in your query.


<!--T:9-->
The query columns will automatically fill with your field selections and with the table name, as shown next.
The query columns will automatically fill with your field selections and with the table name, as shown next.


Let's suppose that, for your report, you want all the records matching "Neurology" in the field "keywords".
Type in "Neurology" under Criteria on the "keywords" line, enclosed with single quotes.


Now, select "Save" and save your query (step not shown here). In the screen shot below, we will see the new query (named "neurology" in the save process) under Queries in the far left panel. Next, select "Report" command from the "Create" tab of the main toolbar.
<!--T:10-->
[[Image:Kexi-Tutorials-Reports-Kexi_Reports_for_Beginners-Insert_Fields_for_Query2.png|center|600px]]
 
 
<!--T:11-->
Let's suppose that, for your report, you want all the records matching ''NEUROLOGY'' in the field ''keywords''.  Under <menuchoice>Criteria</menuchoice> on the <menuchoice>keywords</menuchoice> line,type in {{Input|1='NEUROLOGY'}}  (Enclose the name in single quotes.)
 
 
<!--T:12-->
[[Image:Kexi-Tutorials-Reports-Kexi_Reports_for_Beginners-Query_Keyword.png|center|600px]]
 
 
<!--T:13-->
Now, select the <menuchoice>Save</menuchoice> button to save your query. You will be asked for name of the saved query; enter {{Input|1=neurology}}. In the screen shot below, the name of this new query is displayed under <menuchoice>Queries</menuchoice> category in the far left pane.
 
<!--T:14-->
Next, to create new report that will display data defined by the query, select the <menuchoice>Report</menuchoice> command from the <menuchoice>Create</menuchoice> tab of the main toolbar.
 
 
<!--T:15-->
[[Image:Kexi-Tutorials-Reports-Kexi_Reports_for_Beginners-New_report.png|center|600px]]
 
 
<!--T:16-->
Click on the tab with database icon, to the right of <menuchoice>Properties</menuchoice>. You will then be able to select an internal source for your report. The new query will be among the choices. Select it, and press the <menuchoice>Set Data</menuchoice> button.
 
 
<!--T:17-->
[[Image:Kexi-Tutorials-Reports-Kexi_Reports_for_Beginners-Set_Data.png|center|600px]]
 
 
<!--T:18-->
At this point, before entering your data, you may wish to click <menuchoice>Edit Sections</menuchoice> button to create a header and other format options:
 
 
<!--T:19-->
[[Image:Kexi-Tutorials-Reports-Kexi_Reports_for_Beginners-Edit_report_sections.png|center|600px]]
 
 
<!--T:20-->
You may wish to put a label in your header.  To do so, click on <menuchoice>Label</menuchoice> command from the <menuchoice>Report Design</menuchoice> tab of the main toolbar
and then click in the <menuchoice>Report Header</menuchoice> area.
 
<!--T:21-->
Notice that in the <menuchoice>Property Editor</menuchoice> you can enter your own <menuchoice>Caption</menuchoice> to replace the word ''Label''. You have many options for formatting the size, position, font, etc.
 


Click on the tab to the right of "Properties". You will then be able to select an internal source for your report. The new query will be among the choices. Select it, and press the "Set Data" button.
<!--T:22-->
[[Image:Kexi-Tutorials-Reports-Kexi_Reports_for_Beginners-Insert_Label.png|center|600px]]


At this point, before entering your data, you may wish to "Edit Sections" to create a header and other format options:


You may wish to put a label in your header.  To do so, click on "Label" and then click in the Report Header area.  
<!--T:23-->
To enter fields into the body of your report, click on <menuchoice>Field</menuchoice> command in the <menuchoice>Report Design</menuchoice> tab of the main toolbar and then click in the <menuchoice>Detail</menuchoice> section. In the <menuchoice>Property Editor</menuchoice>, pressing on the <menuchoice>Data Source</menuchoice> property combo box displays a list of the fields provided by your query. For each field you create in the <menuchoice>Detail</menuchoice> section, select desired field from the <menuchoice>Data Source</menuchoice> list. This binds the fields on your report to your data.


Notice that in the Property Editor you can enter your own Caption to replace the word "Label", and you have many options for formatting the size, position, font, etc.


To enter fields into the body of your report, click on "Field" and then click in the "Detail" section. In the Property Editor, selecting Data Source will cause a list of the fields in your query to drop down. For each field you create in the "Detail" section, select a field from the Data Source list.  This binds the fields on your report to your data.
<!--T:24-->
[[Image:Kexi-Tutorials-Reports-Kexi_Reports_for_Beginners-Set_label_datasource.png|center|600px]]


Again, there are many formatting options. Save your report.  Before you switch to data mode, if you have set the data for the first time, you may have to close and re-open the report.


When you switch to data mode, you have several options, including "print".
<!--T:25-->
Again, there are many formatting options. Save your report using the <menuchoice>Save</menuchoice> button. Before you switch to data mode, if you have set the data for the first time, you may have to close and re-open the report ''[this may be a bug that will be fixed in later versions]''.


Your printed report should look great!
<!--T:26-->
When you switch to data mode, you have several options, including <menuchoice>Print</menuchoice> command. Your printed report should look great!


<!--T:27-->
-----
-----
Author: Leslie Brothers, leslie.brothers at verizon.net
Author undisclosed. Text adopted and edited by [[User:Jstaniek|jstaniek]].


<!--T:28-->
[[Category:Office]]
[[Category:Office]]
[[Category:Kexi]]
[[Category:Kexi]]
[[Category:Tutorials]]
</translate>

Latest revision as of 10:58, 19 July 2011

Other languages:

← Back to Report Tutorials
← Back to Tutorials

This is a basic beginner's guide to making a report using Kexi 2.2 or newer.

Note

You may click on the screen shots below to see more detail, and click the "Back" button to return to this display.


We begin with a table named masterlb shown in data format. In this example, the fields are named author, title, keywords, and so on. Before making a report, we create a query.

Select Query command from the Create tab of the main toolbar.



In the Query Design view, select the desired table from the combo box and click the Insert button. A box representing the selected table appears with list of field names. Double-click on each field you want in your query.



The query columns will automatically fill with your field selections and with the table name, as shown next.



Let's suppose that, for your report, you want all the records matching NEUROLOGY in the field keywords. Under Criteria on the keywords line,type in

'NEUROLOGY'

(Enclose the name in single quotes.)



Now, select the Save button to save your query. You will be asked for name of the saved query; enter

neurology

. In the screen shot below, the name of this new query is displayed under Queries category in the far left pane.

Next, to create new report that will display data defined by the query, select the Report command from the Create tab of the main toolbar.



Click on the tab with database icon, to the right of Properties. You will then be able to select an internal source for your report. The new query will be among the choices. Select it, and press the Set Data button.



At this point, before entering your data, you may wish to click Edit Sections button to create a header and other format options:



You may wish to put a label in your header. To do so, click on Label command from the Report Design tab of the main toolbar and then click in the Report Header area.

Notice that in the Property Editor you can enter your own Caption to replace the word Label. You have many options for formatting the size, position, font, etc.



To enter fields into the body of your report, click on Field command in the Report Design tab of the main toolbar and then click in the Detail section. In the Property Editor, pressing on the Data Source property combo box displays a list of the fields provided by your query. For each field you create in the Detail section, select desired field from the Data Source list. This binds the fields on your report to your data.



Again, there are many formatting options. Save your report using the Save button. Before you switch to data mode, if you have set the data for the first time, you may have to close and re-open the report [this may be a bug that will be fixed in later versions].

When you switch to data mode, you have several options, including Print command. Your printed report should look great!


Author undisclosed. Text adopted and edited by jstaniek.