Thanks to all.
     
     My question is closed.
     
     Patrick

______________________________ Reply Separator _________________________________
Subject: RE: BusinessObjects with perl
Author:  Saurabh.Chandra ([EMAIL PROTECTED]) at internet
Date:    6/26/03 10:59 AM


This sample code might help : 
     
use Win32::OLE;
my $bo = Win32::OLE->new('BusinessObjects.Application', sub {$_[0]->Quit;}) 
or return "Oops, cannot start BusinessObjects";
$bo->{Interactive} = 0;
$bo->{Visible}     = 0;
$bo->LoginAs( $user, $pwd, 0 ); 
if( $err = Win32::OLE->LastError()) 
{
  undef $bo; return "Error during LoginAs call: $err";
}
     
#Open report in readonly mode
my $doc = $bo->Documents->Open( $repFileName, 1, 1 ) or return "Oops, cannot 
open $repFileName.";
if( $err = Win32::OLE->LastError()) 
{
  undef $doc; undef $bo; return "Error during Open call: $err";
}
     
my $key;
foreach $key (keys(%$variables))
{               
        $doc->Variables( $key )->{Value} = $$variables{$key}; 
        if( $err = Win32::OLE->LastError()) 
        {
          undef $doc; undef $bo; return "Error setting Variables: $err";
        }
}
     
my $r;
$doc->Refresh(); 
if( $err = Win32::OLE->LastError()) 
{
 undef $doc; undef $bo; return "Error during Refresh call: $err";
}
     
$doc->SaveAs( $PDFFileName ); 
if( $err = Win32::OLE->LastError()) 
{
  undef $doc; undef $bo; return "Error during SaveAs call: $err";
}
$doc->Close;
if( $err = Win32::OLE->LastError()) 
{
 undef $doc; undef $bo; return "Error during Close call: $err";
}
     
     
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 26, 2003 5:38 PM
To: [EMAIL PROTECTED] 
Subject: BusinessObjects with perl
     
     
     I try to pilot a BusinessObjects application using perl on a WinNT 
     platform.
     
     I would like to open a document, refresh, save, export...
     
     Every example of code related to the topic is welcome.
     
     Thanks,
     Patrick
     
_______________________________________________ 
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to