## GdaReportDocument GdaReportDocument — Report document |

## Stability Level

Stable, unless otherwise indicated

## Functions

void | gda_report_document_set_template ()
gboolean | gda_report_document_run_as_html ()
gboolean | gda_report_document_run_as_pdf ()

## Properties

GdaReportEngine * | engine | Read / Write
char * | template | Write

## Types and Values

struct | GdaReportDocument

## Object Hierarchy

        GObject
        ╰── GdaReportDocument
            ├── GdaReportRmlDocument
            ╰── GdaReportDocbookDocument

## Includes

    #include <libgda-report/gda-report-engine.h>

## Description

The GdaReportDocument wraps the usage of a GdaReportEngine for specific HTML or PDF targets. This class is abstract (no instance be created directly), and one of its subclasses has to be used.

## Functions

### gda_report_document_set_template ()

    void
    gda_report_document_set_template (GdaReportDocument *doc,
                                      const gchar *file);

Instructs `doc` to use the `file` RML file as a template

#### Parameters

doc | a GdaReportDocument object |
file | a RML file name, or `NULL` |

### gda_report_document_run_as_html ()

    gboolean
    gda_report_document_run_as_html (GdaReportDocument *doc,
                                     const gchar *filename,
                                     GError **error);

Creates the report document and saves it as an HTML file into `filename`

#### Parameters

doc | a GdaReportDocument object |
filename | the name of a filename to save to |
error | a place to store errors, or `NULL` |

#### Returns

TRUE if no error occurred

### gda_report_document_run_as_pdf ()

    gboolean
    gda_report_document_run_as_pdf (GdaReportDocument *doc,
                                    const gchar *filename,
                                    GError **error);

Creates the report document and saves it as a PDF file into `filename`

#### Parameters

doc | a GdaReportDocument object |
filename | the name of a filename to save to |
error | a place to store errors, or `NULL` |

#### Returns

TRUE if no error occurred

## Types and Values

### struct GdaReportDocument

    struct GdaReportDocument;

## Property Details

### The `“engine”` property

      “engine”                   GdaReportEngine *

Owner: GdaReportDocument

Flags: Read / Write

### The `“template”` property

      “template”                 char *

Owner: GdaReportDocument

Flags: Write

Default value: NULL