Kexi in Use
My final requirement at this stage was to have something more graphical: a nice chart to show the trend of fans over time. The report designer allows the creation of charts using the KDChart library from KDAB and is used in the KOffice program KChart. It is quite powerful, allowing you to join chart data to the main report data (called master-child links), but for now, all I needed was a simple, single chart. The chart object expects data in a certain format. There must be two or more columns of data. The first column is used for the labels on the X axis, and all other columns are used as a series in the chart. I started by creating a query with two columns, date in ascending order and total fans, then created a new report. The report itself is not based on any data, so its Data Source was left empty. An empty data source will produce a report with one detail section, providing an area to add a minimal set of items to a report.
In my detail section, I added a chart object from the report designer toolbar and set its data source to the query I had just produced (Figure 11).
As you can see, even at design time, the chart object is able to gather data and draw a preview of the chart. Switching to the data view shows the chart without any of the extra lines and text from the designer (Figure 12).
When printed, both the tabular report and chart report look as they do in the Data view. When printed using the PDF printer option in KDE, the chart even retains all its detail, as it is not converted to a bitmap, but saved as lines, which makes it completely zoomable!
Saving the tabular report as an HTML document produces two options: saving as a table or using CSS. The table option produces an HTML file where the text from each field in a report is saved as a table cell, and each section is a row. The CSS option uses the <div> tag and tries to create an HTML file that closely resembles the original, allowing text and images to be rendered at arbitrary positions.
The tabular report also exports nicely into an OpenDocument Spreadsheet file for use in either KSpread or OpenOffice.org (Figure 13).
As you can see from the image, one problem is that the report's title has taken a cell with the other field headings. This is because it is in the same section, but it easily can be fixed by putting the title into a separate section, such as a Page Header.
Kexi 2 is a powerful tool for developing database applications. Find out what else is possible by giving it a try, and if you can, please contribute more documentation at userbase.kde.org/Kexi, or join the team by dropping into #kexi or #koffice on Freenode IRC.
Kexi Project Facebook Page: www.facebook.com/kexi.project
Building KOffice: wiki.koffice.org/index.php?title=Building/Building_KOffice
Getting Started/Build/KDE4: techbase.kde.org/Getting_Started/Build/KDE4
Adam Pigg is a software engineer who, in his free time, contributes to the Kexi and KOffice projects. He's been contributing to KDE in general for around eight years. His remaining time is occupied by his wife, his four great kids and mountain biking. He usually can be found in #kexi on Freenode, where he will do his best to answer any queries.
|Dynamic DNS—an Object Lesson in Problem Solving||May 21, 2013|
|Using Salt Stack and Vagrant for Drupal Development||May 20, 2013|
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
|Non-Linux FOSS: Seashore||May 10, 2013|
- RSS Feeds
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- Dynamic DNS—an Object Lesson in Problem Solving
- New Products
- Validate an E-Mail Address with PHP, the Right Way
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Download the Free Red Hat White Paper "Using an Open Source Framework to Catch the Bad Guy"
- Tech Tip: Really Simple HTTP Server with Python
- Keeping track of IP address
1 hour 18 min ago
- Roll your own dynamic dns
6 hours 32 min ago
- Please correct the URL for Salt Stack's web site
9 hours 43 min ago
- Android is Linux -- why no better inter-operation
11 hours 59 min ago
- Connecting Android device to desktop Linux via USB
12 hours 27 min ago
- Find new cell phone and tablet pc
13 hours 25 min ago
14 hours 54 min ago
- Automatically updating Guest Additions
16 hours 3 min ago
- I like your topic on android
16 hours 49 min ago
- This is the easiest tutorial
23 hours 25 min ago