Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index

On Wed, 2012-01-04 at 10:39 -0700, Jeff Sadowski wrote:
    This is all confusing to me. How many tables are in this database
and what are they? What are the fields and to what table to they belong?
What are the field types of each one of the fields? What do you mean by
ip and serial are character arrays? Character arrays are not one of the
field types nor field properties that I know of. An example of character
arrays would be nice too.
    You use the terms office 1 name, office 2 name, office 1 subtotal,
and office 2 subtotal. What are the relationships of these terms to the
fields in the database?
    What I'm trying to do is to create your database to see what could
be done. But I can't do that with what you have written: I need more
specific information.
    You speak of a script. Could you share that with us also?


You are 100% correct here is a better example of data and what I'd
like as the output form with the given example.

CREATE TABLE `storename` (
   `store` int(11) NOT NULL,
   `storename` varchar(20) DEFAULT NULL,

INSERT INTO `storename` VALUES (1,"store 1");
INSERT INTO `storename` VALUES (2,"store 2");

CREATE TABLE `printusage` (
  `serial` varchar(20) NOT NULL,
  `ip` varchar(15) DEFAULT NULL,
  `counter` bigint(20) DEFAULT NULL,
  `webcounter` bigint(20) DEFAULT NULL,
  `totalprint` bigint(20) DEFAULT NULL,
  `bwprint` bigint(20) DEFAULT NULL,
  `copies` bigint(20) DEFAULT NULL,
  `bwcopies` bigint(20) DEFAULT NULL,
  `faxes` bigint(20) DEFAULT NULL,
  `store` int(11) DEFAULT NULL,
  PRIMARY KEY (`date`,`serial`)

INSERT INTO `printusage` VALUES ('2011-12-30
INSERT INTO `printusage` VALUES ('2011-12-30
INSERT INTO `printusage` VALUES ('2011-12-30
INSERT INTO `printusage` VALUES ('2011-12-30
INSERT INTO `printusage` VALUES ('2011-12-30
INSERT INTO `printusage` VALUES ('2011-12-31
INSERT INTO `printusage` VALUES ('2011-12-31
INSERT INTO `printusage` VALUES ('2011-12-31
INSERT INTO `printusage` VALUES ('2011-12-31
INSERT INTO `printusage` VALUES ('2011-12-31

example of desired output report.

store 1
IP, Serial, Counter Difference from 2011-12-30 00:00:00 to 2011-12-31 00:00:00, 1, 5, 2, 5, 3, 5
store 1 subtotal 15
store 2
IP, Serial, Counter Difference from 2011-12-30 00:00:00 to 2011-12-31 00:00:00, 4, 5, 4, 5
store 2 subtotal 10
total 25

       This looks to be quite feasible. Reports can be created two ways
in Base: using the Report Wizard, and using Design View (Create Report
using Design View). The latter uses what was originally the Sun Report
     Here is a couple of links that might be of use when creating
reports in design view:
is a link to a PDF describing how to use the report builder.
is a link to describe how to create user defined functions. (You may not
need this for you problem, but it may come in handy later.
     LibreOffice Base uses HSQLDB. Presently, Base 3.4.4 uses version
1.8. Version 2.2.6 is available as a separate program. The following
link will begin the download of the HSQLDB Guide for version 1.8.


For unsubscribe instructions e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.