Missing files from svn repository.
Migrated to libgda 4.
--- /dev/null
+*~
+*.rpath
+*.pot
+*.mo
+*.gmo
+*.o
+*.lo
+*.la
+*.bak
+*.stamp
+*.tar.gz
+*.pc
+*.sed
+*.sin
+*.header
+.libs
+.deps
+ABOUT-NLS
+INSTALL
+Makefile
+Makefile.in
+Makefile.in.in
+Makevars
+aclocal.m4
+autom4te.cache/
+config.guess
+config.log
+config.sub
+configure
+depcomp
+gtk-doc.make
+install-sh
+ltmain.sh
+m4/
+missing
+config.h
+config.status
+docs/reference/version.xml
+docs/reference/html/
+docs/reference/xml/
+libtool
+stamp-h1
+tests/test*.png
+tests/*.pdf
+tests/test_report.rptr
+tests/test_rptprint
+tests/test_rptreport
+tests/test_rptreport_creation
+POTFILES
+mkinstalldirs
+stamp-it
+intltool-*
+Rules-quot
-#!/bin/sh
+#!/bin/bash
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
-ORIGDIR=`pwd`
-cd $srcdir
-PROJECT=libreptool
-TEST_TYPE=-f
-FILE=configure.ac
+PKG_NAME="libreptool"
-DIE=0
-
-have_libtool=false
-if libtoolize --version < /dev/null > /dev/null 2>&1 ; then
- libtool_version=`libtoolize --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
- case $libtool_version in
- 1.4*|1.5*)
- have_libtool=true
- ;;
- esac
-fi
-if $have_libtool ; then : ; else
- echo
- echo "You must have libtool 1.4 installed to compile $PROJECT."
- echo "Install the appropriate package for your distribution,"
- echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/"
- DIE=1
-fi
-
-(gtkdocize --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have gtk-doc installed to compile $PROJECT."
- echo "Install the appropriate package for your distribution,"
- echo "or get the source tarball at http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
- DIE=1
+(test -f $srcdir/configure.ac \
+ && test -d $srcdir/src \
+ && test -f $srcdir/src/libreptool.h) || {
+ echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+ echo " top-level libreptool directory"
+ exit 1
}
-(autoconf --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have autoconf installed to compile $PROJECT."
- echo "Install the appropriate package for your distribution,"
- echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
- DIE=1
+which gnome-autogen.sh || {
+ echo "You need to install gnome-common from GNOME and make"
+ echo "sure the gnome-autogen.sh script is in your \$PATH."
+ exit 1
}
-if automake --version < /dev/null > /dev/null 2>&1 ; then
- AUTOMAKE=automake
- ACLOCAL=aclocal
-else
- echo
- echo "You must have automake 1.7.x installed to compile $PROJECT."
- echo "Install the appropriate package for your distribution,"
- echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
- DIE=1
-fi
-
-if test "$DIE" -eq 1; then
- exit 1
-fi
-
-test $TEST_TYPE $FILE || {
- echo "You must run this script in the top-level $PROJECT directory"
- exit 1
-}
-
-if test -z "$AUTOGEN_SUBDIR_MODE"; then
- if test -z "$*"; then
- echo "I am going to run ./configure with no arguments - if you wish "
- echo "to pass any to it, please specify them on the $0 command line."
- fi
-fi
-
-rm -rf autom4te.cache
-
-# README and INSTALL are required by automake, but may be deleted by clean
-# up rules. to get automake to work, simply touch these here, they will be
-# regenerated from their corresponding *.in files by ./configure anyway.
-touch README INSTALL
-
-$ACLOCAL || exit $?
-
-libtoolize --force || exit $?
-gtkdocize || exit $?
-
-autoheader || exit $?
-
-$AUTOMAKE --add-missing || exit $?
-autoconf || exit $?
-cd $ORIGDIR || exit $?
-
-if test -z "$AUTOGEN_SUBDIR_MODE"; then
- $srcdir/configure --enable-maintainer-mode $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?
-
- echo
- echo "Now type 'make' to compile $PROJECT."
-fi
+USE_GNOME2_MACROS=1 . gnome-autogen.sh
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
/* Name of package */
#undef PACKAGE
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
/* Define to the version of this package. */
#undef PACKAGE_VERSION
#undef YYTEXT_POINTER
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
- <pthread.h>, or <semaphore.h> is not used. If the typedef was allowed, the
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
#define below would cause a syntax error. */
#undef _UINT32_T
/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
- <pthread.h>, or <semaphore.h> is not used. If the typedef was allowed, the
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
#define below would cause a syntax error. */
#undef _UINT8_T
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT([libreptool], [0.0.5], [azagli@inwind.it])
+AC_INIT([libreptool], [0.1.0], [azagli@libero.it])
AC_CONFIG_SRCDIR([src/rptprint.c])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
-AC_LIBTOOL_WIN32_DLL
+
+AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_SYSTEM
+LT_INIT
+
+AC_LIBTOOL_WIN32_DLL
+
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
# Checks for libraries.
PKG_CHECK_MODULES([REPTOOL], [gtk+-2.0 >= 2.10.0
libxml-2.0 >= 2.6.0
- libgda >= 1.2.3])
+ libgda-4.0 >= 4.0.0])
AC_SUBST(REPTOOL_CFLAGS)
AC_SUBST(REPTOOL_LIBS)
--- /dev/null
+/*
+ * Copyright (C) 2007 Andrea Zagli <azagli@inwind.it>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "rptobjectellipse.h"
+#include "rptcommon.h"
+
+enum
+{
+ PROP_0
+};
+
+static void rpt_obj_ellipse_class_init (RptObjEllipseClass *klass);
+static void rpt_obj_ellipse_init (RptObjEllipse *rpt_obj_ellipse);
+
+static void rpt_obj_ellipse_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void rpt_obj_ellipse_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+
+#define RPT_OBJ_ELLIPSE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_RPT_OBJ_ELLIPSE, RptObjEllipsePrivate))
+
+typedef struct _RptObjEllipsePrivate RptObjEllipsePrivate;
+struct _RptObjEllipsePrivate
+ {
+ };
+
+GType
+rpt_obj_ellipse_get_type (void)
+{
+ static GType rpt_obj_ellipse_type = 0;
+
+ if (!rpt_obj_ellipse_type)
+ {
+ static const GTypeInfo rpt_obj_ellipse_info =
+ {
+ sizeof (RptObjEllipseClass),
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) rpt_obj_ellipse_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (RptObjEllipse),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) rpt_obj_ellipse_init,
+ NULL
+ };
+
+ rpt_obj_ellipse_type = g_type_register_static (TYPE_RPT_OBJ_RECT, "RptObjEllipse",
+ &rpt_obj_ellipse_info, 0);
+ }
+
+ return rpt_obj_ellipse_type;
+}
+
+static void
+rpt_obj_ellipse_class_init (RptObjEllipseClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ RptObjectClass *rptobject_class = RPT_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (RptObjEllipsePrivate));
+
+ object_class->set_property = rpt_obj_ellipse_set_property;
+ object_class->get_property = rpt_obj_ellipse_get_property;
+
+ rptobject_class->get_xml = rpt_obj_ellipse_get_xml;
+}
+
+static void
+rpt_obj_ellipse_init (RptObjEllipse *rpt_obj_ellipse)
+{
+ RptObjEllipsePrivate *priv = RPT_OBJ_ELLIPSE_GET_PRIVATE (rpt_obj_ellipse);
+}
+
+/**
+ * rpt_obj_ellipse_new:
+ * @name: the #RptObjEllipse's name.
+ * @position: an #RptPoint.
+ *
+ * Creates a new #RptObjEllipse object and sets its position to @position.
+ *
+ * Returns: the newly created #RptObject object.
+ */
+RptObject
+*rpt_obj_ellipse_new (const gchar *name, RptPoint position)
+{
+ RptObject *rpt_obj_ellipse = NULL;
+
+ gchar *name_ = g_strstrip (g_strdup (name));
+
+ if (strcmp (name_, "") != 0)
+ {
+ rpt_obj_ellipse = RPT_OBJECT (g_object_new (rpt_obj_ellipse_get_type (), NULL));
+
+ g_object_set (G_OBJECT (rpt_obj_ellipse),
+ "name", name_,
+ "position", &position,
+ NULL);
+ }
+
+ return rpt_obj_ellipse;
+}
+
+/**
+ * rpt_obj_ellipse_new_from_xml:
+ * @xnode:
+ *
+ * Returns: the newly created #RptObject object.
+ */
+RptObject
+*rpt_obj_ellipse_new_from_xml (xmlNode *xnode)
+{
+ gchar *name;
+ RptObject *rpt_obj_ellipse = NULL;
+
+ name = g_strdup ((gchar *)xmlGetProp (xnode, "name"));
+ if (name != NULL && strcmp (g_strstrip (name), "") != 0)
+ {
+ RptPoint *position;
+ RptObjEllipsePrivate *priv;
+
+ position = rpt_common_get_position (xnode);
+
+ rpt_obj_ellipse = rpt_obj_ellipse_new ((const gchar *)name, *position);
+
+ if (rpt_obj_ellipse != NULL)
+ {
+ const gchar *prop;
+ RptSize *size;
+ RptStroke *stroke;
+
+ priv = RPT_OBJ_ELLIPSE_GET_PRIVATE (rpt_obj_ellipse);
+
+ size = rpt_common_get_size (xnode);
+ stroke = rpt_common_get_stroke (xnode);
+ g_object_set (G_OBJECT (rpt_obj_ellipse),
+ "size", size,
+ "stroke", stroke,
+ NULL);
+
+ prop = (const gchar *)xmlGetProp (xnode, "fill-color");
+ if (prop != NULL)
+ {
+ RptColor *color;
+
+ color = rpt_common_parse_color (prop);
+ g_object_set (rpt_obj_ellipse, "fill-color", color, NULL);
+ }
+ }
+ }
+
+ return rpt_obj_ellipse;
+}
+
+/**
+ * rpt_obj_ellipse_get_xml:
+ * @rpt_object:
+ * @xnode:
+ *
+ */
+void
+rpt_obj_ellipse_get_xml (RptObject *rpt_object, xmlNode *xnode)
+{
+ RptObjEllipsePrivate *priv = RPT_OBJ_ELLIPSE_GET_PRIVATE (RPT_OBJ_ELLIPSE (rpt_object));
+
+ rpt_obj_rect_get_xml (rpt_object, xnode);
+
+ xmlNodeSetName (xnode, "ellipse");
+}
+
+static void
+rpt_obj_ellipse_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ RptObjEllipse *rpt_obj_ellipse = RPT_OBJ_ELLIPSE (object);
+
+ RptObjEllipsePrivate *priv = RPT_OBJ_ELLIPSE_GET_PRIVATE (rpt_obj_ellipse);
+
+ switch (property_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+rpt_obj_ellipse_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ RptObjEllipse *rpt_obj_ellipse = RPT_OBJ_ELLIPSE (object);
+
+ RptObjEllipsePrivate *priv = RPT_OBJ_ELLIPSE_GET_PRIVATE (rpt_obj_ellipse);
+
+ switch (property_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
--- /dev/null
+/*
+ * Copyright (C) 2007 Andrea Zagli <azagli@inwind.it>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef __RPT_OBJ_ELLIPSE_H__
+#define __RPT_OBJ_ELLIPSE_H__
+
+#include <glib.h>
+#include <glib-object.h>
+#include <libxml/tree.h>
+
+#include "rptobjectrect.h"
+
+G_BEGIN_DECLS
+
+
+#define TYPE_RPT_OBJ_ELLIPSE (rpt_obj_ellipse_get_type ())
+#define RPT_OBJ_ELLIPSE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RPT_OBJ_ELLIPSE, RptObjEllipse))
+#define RPT_OBJ_ELLIPSE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RPT_OBJ_ELLIPSE, RptObjEllipseClass))
+#define IS_RPT_OBJ_ELLIPSE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RPT_OBJ_ELLIPSE))
+#define IS_RPT_OBJ_ELLIPSE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RPT_OBJ_ELLIPSE))
+#define RPT_OBJ_ELLIPSE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RPT_OBJ_ELLIPSE, RptObjEllipseClass))
+
+
+typedef struct _RptObjEllipse RptObjEllipse;
+typedef struct _RptObjEllipseClass RptObjEllipseClass;
+
+struct _RptObjEllipse
+ {
+ RptObjRect parent;
+ };
+
+struct _RptObjEllipseClass
+ {
+ RptObjRectClass parent_class;
+ };
+
+GType rpt_obj_ellipse_get_type (void) G_GNUC_CONST;
+
+
+RptObject *rpt_obj_ellipse_new (const gchar *name, RptPoint position);
+RptObject *rpt_obj_ellipse_new_from_xml (xmlNode *xnode);
+
+void rpt_obj_ellipse_get_xml (RptObject *rpt_object, xmlNode *xnode);
+
+G_END_DECLS
+
+#endif /* __RPT_OBJ_ELLIPSE_H__ */
/*
- * Copyright (C) 2007 Andrea Zagli <azagli@inwind.it>
+ * Copyright (C) 2007-2010 Andrea Zagli <azagli@inwind.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#include <libxml/xpath.h>
+#include <sql-parser/gda-sql-parser.h>
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
gchar *connection_string;
gchar *sql;
- GdaClient *gda_client;
GdaConnection *gda_conn;
GdaDataModel *gda_datamodel;
} Database;
xmlDoc
*rpt_report_get_xml_rptprint (RptReport *rpt_report)
{
+ GError *error;
+
xmlDoc *xdoc;
xmlNode *xroot;
xmlNode *xpage;
gint rows;
/* database connection */
- gda_init (PACKAGE_NAME, PACKAGE_VERSION, 0, NULL);
- priv->db->gda_client = gda_client_new ();
- priv->db->gda_conn = gda_client_open_connection_from_string (priv->db->gda_client,
- priv->db->provider_id,
- priv->db->connection_string,
- 0);
+ gda_init ();
+ error = NULL;
+ priv->db->gda_conn = gda_connection_open_from_string (priv->db->provider_id,
+ priv->db->connection_string,
+ NULL,
+ GDA_CONNECTION_OPTIONS_NONE,
+ &error);
if (priv->db->gda_conn == NULL)
{
/* TO DO */
}
else
{
- GdaCommand *command = gda_command_new (priv->db->sql, GDA_COMMAND_TYPE_SQL, GDA_COMMAND_OPTION_STOP_ON_ERRORS);
+ GdaSqlParser *parser = gda_sql_parser_new ();
+ error = NULL;
+ GdaStatement *stmt = gda_sql_parser_parse_string (parser, priv->db->sql, NULL, &error);
- priv->db->gda_datamodel = gda_connection_execute_single_command (priv->db->gda_conn, command, NULL);
+ error = NULL;
+ priv->db->gda_datamodel = gda_connection_statement_execute_select (priv->db->gda_conn, stmt, NULL, &error);
if (priv->db->gda_datamodel == NULL)
{
/* TO DO */
g_warning ("Unable to create the datamodel.");
return NULL;
}
-
- gda_command_free (command);
}
rows = gda_data_model_get_n_rows (priv->db->gda_datamodel);
gchar
*rpt_report_get_field (RptReport *rpt_report, const gchar *field_name, gint row)
{
+ GError *error;
gint col;
gchar *ret = NULL;
if (priv->db != NULL && priv->db->gda_datamodel != NULL)
{
- col = gda_data_model_get_column_position (priv->db->gda_datamodel, field_name);
+ col = gda_data_model_get_column_index (priv->db->gda_datamodel, field_name);
if (col > -1)
{
- ret = gda_value_stringify ((GdaValue *)gda_data_model_get_value_at (priv->db->gda_datamodel, col, row));
+ error = NULL;
+ ret = gda_value_stringify (gda_data_model_get_value_at (priv->db->gda_datamodel, col, row, &error));
}
}
--- /dev/null
+/*
+ * Copyright (C) 2007 Andrea Zagli <azagli@inwind.it>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef __RPT_REPORT_PRIV_H__
+#define __RPT_REPORT_PRIV_H__
+
+#include <glib.h>
+
+#include "rptreport.h"
+
+G_BEGIN_DECLS
+
+
+gchar *rpt_report_get_field (RptReport *rpt_report,
+ const gchar *field_name,
+ gint row);
+gchar *rpt_report_ask_field (RptReport *rpt_report,
+ const gchar *field,
+ gint row);
+gchar *rpt_report_get_special (RptReport *rpt_report,
+ const gchar *special,
+ gint row);
+
+
+G_END_DECLS
+
+#endif /* __RPT_REPORT_PRIV_H__ */
-<?xml version="1.0" ?>
+<?xml version="1.0"?>
<reptool>
- <page width="595" height="842" margin-top="50" margin-left="100" margin-right="10" />
-
- <report>
- <body height="800">
- <text name="text4" x="-50" y="10" width="500" height="150" source=""text outside from left"" />
- <text name="text1" x="100" y="50" width="500" height="150" source=""the text's content"" />
- <text name="date" x="100" y="150" width="500" height="150" source="@Date" />
- <text name="time" x="100" y="250" width="500" height="150" source="@Time" />
- <text name="text2" x="100" y="350" width="200" height="100"
- border-top-width="1.0" border-right-width="1.0" border-bottom-width="1.0" border-left-width="1.0"
- padding-top="20" padding-right="20" padding-bottom="20" padding-left="10"
- source=""text very very long to try padding and border"" />
- <text name="text3" x="400" y="350" width="200" height="50" source=""another long text to test page margins"" />
- <text name="text5" x="50" y="460" width="200" height="50" source="[field_to_request]" />
- <text name="text6" x="50" y="600" width="200" height="50"
- border-top-width="1.0" border-right-width="1.0" border-bottom-width="1.0" border-left-width="1.0"
- border-bottom-style="10"
- rotation="45" source=""Rotated text"" />
- <line name="line1" x="350" y="50" width="200" height="0" rotation="-45" />
- <rect name="rect1" x="350" y="250" width="200" height="50" fill-color="#FFFF00" rotation="45" stroke-style="10" />
- <image name="image1" x="200" y="460" width="200" height="150"
- border-top-width="1.0" border-right-width="1.0" border-bottom-width="1.0" border-left-width="1.0"
- border-top-color="#FF0000" border-right-color="#FF0000" border-bottom-color="#FF0000" border-left-color="#FF0000"
- rotation="135" source="tests/city.png" />
- </body>
- </report>
+ <database>
+ <provider>
+SQLite
+ </provider>
+ <connection-string>
+DB_DIR=.;DB_NAME=db_test.db
+ </connection-string>
+ <sql>
+SELECT * FROM articles ORDER BY name
+ </sql>
+ </database>
+ <page width="595.000000" height="842.000000"/>
+ <report>
+ <report-header height="80.000000">
+ <text name="rephead" x="10.000000" y="10.000000" width="300.000000" height="70.000000" font-name="Verdana" font-size="16.000000" font-bold="y" font-color="#0000FFFF" source=""the report's header""/>
+ </report-header>
+ <page-header first-page="y" height="80.000000">
+ <text name="title" x="10.000000" y="10.000000" width="300.000000" height="50.000000" font-name="Courier New" font-size="10.000000" font-bold="y" source=""the page's title" & " - " & @Page"/>
+ <line name="line1" x="10.000000" y="65.000000" width="500.000000" height="0.000000" stroke-width="1.000000" stroke-color="#000000FF"/>
+ </page-header>
+ <body height="200.000000">
+ <text name="txt_id" x="50.000000" y="50.000000" width="100.000000" height="50.000000" border-top-width="1.000000" border-top-color="#FF0000FF" font-name="Sans" font-size="12.000000" source="[id]"/>
+ <text name="txt_name" x="200.000000" y="50.000000" width="100.000000" height="50.000000" font-name="Sans" font-size="12.000000" source="[name]"/>
+ <text name="txt_req" x="50.000000" y="100.000000" width="100.000000" height="50.000000" font-name="Sans" font-size="12.000000" source="[nonexistent]"/>
+ <rect name="rect1" x="400.000000" y="10.000000" width="20.000000" height="20.000000" stroke-width="1.000000" stroke-color="#000000FF" fill-color="#00FF00FF"/>
+ <image name="img1" x="450.000000" y="10.000000" width="60.000000" height="60.000000" border-bottom-width="1.000000" border-bottom-color="#FF0000FF" border-bottom-style="10.000000;10.000000;" source="tests/gnome-globe.png"/>
+ </body>
+ <report-footer height="50.000000">
+ <line name="line3" x="10.000000" y="10.000000" width="500.000000" height="0.000000" stroke-width="1.000000" stroke-color="#FFFF00FF" stroke-style="50.000000;10.000000;"/>
+ <text name="txt_report_footer" x="10.000000" y="20.000000" width="500.000000" height="30.000000" font-name="Sans" font-size="12.000000" horizontal-align="center" source=""the report's footer""/>
+ <line name="line4" x="10.000000" y="50.000000" width="500.000000" height="0.000000" stroke-width="1.000000" stroke-color="#FFFF00FF" stroke-style="1.000000;5.000000;"/>
+ </report-footer>
+ <page-footer first-page="y" last-page="y" height="80.000000">
+ <line name="line2" x="10.000000" y="10.000000" width="500.000000" height="0.000000" stroke-width="1.000000" stroke-color="#000000FF"/>
+ <text name="footer" x="10.000000" y="20.000000" width="300.000000" height="50.000000" font-name="Sans" font-size="12.000000" source=""the page's footer""/>
+ <ellipse name="ellipse1" x="400.000000" y="50.000000" width="20.000000" height="10.000000" stroke-width="1.000000" stroke-color="#FF0000FF" fill-color="#00FF00FF"/>
+ <text name="page_n" x="500.000000" y="20.000000" width="50.000000" height="50.000000" font-name="Sans" font-size="12.000000" source="@Page & "/" & @Pages"/>
+ </page-footer>
+ </report>
</reptool>
<database>
<provider>SQLite</provider>
<!-- connection-string must be changed to your libretool source directory because SQLite wants an absolute path -->
- <connection-string>URI=///home/andreaz/files/c/reptool/libreptool/tests/db_test.db</connection-string>
+ <connection-string>DB_DIR=.;DB_NAME=db_test.db</connection-string>
<sql>SELECT * FROM articles ORDER BY name</sql>
</database>
/*
- * Copyright (C) 2007 Andrea Zagli <azagli@inwind.it>
+ * Copyright (C) 2007-2010 Andrea Zagli <azagli@inwind.it>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
row > -1)
{
ret = g_strdup_printf ("%s - %s",
- gda_value_stringify ((GdaValue *)gda_data_model_get_value_at (data_model, 0, row)),
- gda_value_stringify ((GdaValue *)gda_data_model_get_value_at (data_model, 1, row)));
+ gda_value_stringify (gda_data_model_get_value_at (data_model, 0, row, NULL)),
+ gda_value_stringify (gda_data_model_get_value_at (data_model, 1, row, NULL)));
}
return ret;