1

How do I create a report using SQLite3 DB? I'd appreciate just step by step or pseudo-code.

Paul Lefebvre
  • 6,253
  • 3
  • 28
  • 36
Cocoa Dev
  • 9,361
  • 31
  • 109
  • 177

2 Answers2

3

That's quite a big open-ended question. SQLite is really the built-in REALSQLDatabase class and it inherits from the generic Database class so it works just like every other database class in REALbasic.

There are numerous ways to do a report in RB. The first way is to use the built-in reporting tool in REAL Studio itself. Look for examples in the Example folder that comes with RB.

You could use RSReport from Roth Soft available at http://www.rothsoft.ch/realbasic/rsreport/

You could use On-Target Reports at http://www.ontargetreports.com/

That doesn't answer your question directly because those are the tools involved. Each tool has its strengths and weaknesses so you should check each of them out.

There are tutorials available for all of these tools in the Association of REALbasic Professionals (ARBP) source code repository at http://arbpmembers.org (free registration required to access the repository).

BKeeney Software
  • 1,299
  • 6
  • 8
  • Hello I appreciate your response. I don't want to purchase any additional software. I have MBS and RStudio 2010 R2. The example project uses Dim rpt As REALDatabase Im using SQLConnectionMBS to connect to my DB. All I want to to is display fields from my DB and allow the user to print it. I'm just seeking something that's quick (no runtime calculations or fancy conditional statements to determine if the data should be displayed). I want to say "SELECT * FROM tblUsers" and then get the data using cmd.Fields("field1").asStringValue to some how bind it to my Report fields. – Cocoa Dev May 14 '10 at 17:36
  • Did you look at the REAL Reports tutorial on the ARBP site? And you do NOT need the MBS plugin to connect to an SQLite database. – BKeeney Software May 14 '10 at 19:31
  • ARBP is blocked by WebSense :( – Cocoa Dev May 26 '10 at 00:22
1

1) Last few years (2013-2015) you can use Valentina Reports to produce PDF/HTML/JPG reports using data from your SQLite database:

  • on any OS: mac, win, linux
  • with a lots of API: Xojo, LiceCode, C++, ObjC, C#, Java, PHP, ...
  • you can produce application with embedded report engine
  • or you can create application, which connects to Valentina SERVER, which may work as a Report Server.

Valentina Studio Pro allows you to design reports visually, without programming. You can use many tools to design reports: Labels, TextFields, Pictures, BarCodes, Graphics, Shapes, ...

It is a good idea to use Valentina Report Server because of many reasons. For example, during development team members can seat around VServer and design/develop/debug different reports independently.

2) Valentina Server 6.0 is even better, because now it can act as 3 in 1: - Valentina DB Server - Valentina SQLite Server - Valentina Report Server

Thanks to this, you can put SQLite database under VServer, and use it in multi-user way to Update/Search it and to produce reports.

3) Valentina Server can be used free providing 5 connections to Valentina DB and reports and 10 connections to SQLite. 4) Valentina ADKs can be used free as CLIENTS to that Valentina Server 5) Valentina Studio is free totally 6) Valentina Studio Pro, enables report designer. This is a commercial option.

Ruslan Zasukhin
  • 379
  • 2
  • 12