Michael R. Davis > Win32-OLE-CrystalRuntime-Application-0.08 > Win32::OLE::CrystalRuntime::Application::Report

Download:
Win32-OLE-CrystalRuntime-Application-0.08.zip

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.08   Source  

NAME ^

Win32::OLE::CrystalRuntime::Application::Report - Perl Interface to the Crystal Report OLE Object

SYNOPSIS ^

  use Win32::OLE::CrystalRuntime::Application;
  my $application=Win32::OLE::CrystalRuntime::Application->new;
  my $report=$application->report(filename=>$filename);
  $report->export(format=>"pdf", filename=>"export.pdf");

DESCRIPTION ^

This package is a wrapper around the OLE object for a Crystal Report.

USAGE ^

CONSTRUCTOR ^

You must construct this object from a Win32::OLE::CrystalRuntime::Application object as the ole object is constructed at the same time and is generated from the application->ole object.

  use Win32::OLE::CrystalRuntime::Application;
  my $application=Win32::OLE::CrystalRuntime::Application->new;
  my $report=$application->report(filename=>$filename);


                                               Perl API       
                                                  |           
                                        +--------------------+
            Perl API                 +---------------------+ |
               |                  +----------------------+ | |
  +---------------------------+ +----------------------+ | | |
  |                           | |                      | | | |
  |  Perl Application Object  | |  Perl Report Object  | | | |
  |                           | |                      | | | |
  |       "ole" method        | |     "ole" method     | | | |
  |     +==============+      +-+   +==============+   | | | |
  |     |              |      | |   |              |   | | | |
  |     |  Win32::OLE  |      | |   |  Win32::OLE  |   | | | |
  |     |  Application |============|    Report    |   | | | |
  |     |    Object    |      | |   |    Object    |   | | |-+
  |     |              |      | |   |              |   | |-+
  |     +==============+      | |   +==============+   |-+
  +---------------------------+ +----------------------+ 

METHODS ^

filename

Returns the name of the report filename. This value is read only after object construction.

  my $filename=$report->filename;

Set on construction

  my $report=Win32::OLE::CrystalRuntime::Application::Report->new(
               filename=>$filename,
             );

ole

Returns the OLE report object. This object is the Win32::OLE object that was constructed during initialization from the $application->report() method.

parent

Returns the parent application object for the report.

  my $application=$report->parent;

Set on construction in the $application->report method.

  my $report=Win32::OLE::CrystalRuntime::Application::Report->new(
               parent=>$application
             );

setParameters

Sets the report parameters.

  $report->setParameters($key1=>$value1, $key2=>$value2, ...);  #Always pass values as strings and convert in report
  $report->setParameters(%hash);

export

Saves the report in the specified format to the specified filename.

  $report->export(filename=>"report.pdf");  #default format is pdf
  $report->export(format=>"pdf", filename=>"report.pdf");
  $report->export(formatid=>31, filename=>"report.pdf"); #pass format id directly

FormatID

Returns a hash of common format extensions and CRExportFormatType IDs. Other formats are supported with export(formatid=>$id)

  my $hash=$report->FormatID;           #{pdf=>31, xls=>36};
  my @orderedlist=$report->FormatID;    #(pdf=>31, xls=>36, ...)

BUGS ^

SUPPORT ^

Please try Business Objects.

AUTHOR ^

    Michael R. Davis
    CPAN ID: MRDVT
    STOP, LLC
    domain=>stopllc,tld=>com,account=>mdavis
    http://www.stopllc.com/

COPYRIGHT ^

This program is free software licensed under the...

        The BSD License

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO ^