unit MRVW_TLB;

// ************************************************************************ //
// WARNING                                                                    
// -------                                                                    
// The types declared in this file were generated from data read from a       
// Type Library. If this type library is explicitly or indirectly (via        
// another type library referring to this type library) re-imported, or the   
// 'Refresh' command of the Type Library Editor activated while editing the   
// Type Library, the contents of this file will be regenerated and all        
// manual modifications will be lost.                                         
// ************************************************************************ //

// PASTLWTR : $Revision:   1.88  $
// File generated on 31. 3. 2001 17:26:23 from Type Library described below.

// *************************************************************************//
// NOTE:                                                                      
// Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME are used by properties  
// which return objects that may need to be explicitly created via a function 
// call prior to any access via the property. These items have been disabled  
// in order to prevent accidental use from within the object inspector. You   
// may enable them by defining LIVE_SERVER_AT_DESIGN_TIME or by selectively   
// removing them from the $IFDEF blocks. However, such items must still be    
// programmatically created via a method of the appropriate CoClass before    
// they can be used.                                                          
// ************************************************************************ //
// Type Lib: P:\MarshalReport 1.0\Marshal Report Viewer\MRVW.tlb (1)
// IID\LCID: {2A7E5A55-2DC0-4FCF-A8D6-7741986D2465}\0
// Helpfile: 
// DepndLst: 
//   (1) v2.0 stdole, (D:\WINNT\System32\stdole2.tlb)
//   (2) v2.5 ADODB, (D:\Program Files\Common Files\system\ado\msado25.tlb)
//   (3) v4.0 StdVCL, (D:\WINNT\System32\STDVCL40.DLL)
// ************************************************************************ //
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
interface

uses Windows, ActiveX, Classes, Graphics, OleServer, OleCtrls, StdVCL, 
  ADOINTMR;

// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:        
//   Type Libraries     : LIBID_xxxx                                      
//   CoClasses          : CLASS_xxxx                                      
//   DISPInterfaces     : DIID_xxxx                                       
//   Non-DISP interfaces: IID_xxxx                                        
// *********************************************************************//
const
  // TypeLibrary Major and minor versions
  MRVWMajorVersion = 1;
  MRVWMinorVersion = 0;

  LIBID_MRVW: TGUID = '{2A7E5A55-2DC0-4FCF-A8D6-7741986D2465}';

  IID_IMRViewerObject: TGUID = '{7A82AB0E-3DC7-4CA6-9DDE-27811AB4263B}';
  DIID_IMRViewerObjectEvents: TGUID = '{59A15F93-03FE-4B7D-9C5C-8A0AE5E566D3}';
  CLASS_MRViewerObject: TGUID = '{E8CCCF20-9F6A-43ED-B6D4-CDD695CE7564}';

// *********************************************************************//
// Declaration of Enumerations defined in Type Library                    
// *********************************************************************//
// Constants for enum TMRInitEnum
type
  TMRInitEnum = TOleEnum;
const
  irb_default = $00000000;
  irb_Yes = $00000001;
  irb_No = $00000002;

type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
  IMRViewerObject = interface;
  IMRViewerObjectDisp = dispinterface;
  IMRViewerObjectEvents = dispinterface;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library                       
// (NOTE: Here we map each CoClass to its Default Interface)              
// *********************************************************************//
  MRViewerObject = IMRViewerObject;


// *********************************************************************//
// Interface: IMRViewerObject
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {7A82AB0E-3DC7-4CA6-9DDE-27811AB4263B}
// *********************************************************************//
  IMRViewerObject = interface(IDispatch)
    ['{7A82AB0E-3DC7-4CA6-9DDE-27811AB4263B}']
    function  Get_DefinitionDir: WideString; safecall;
    procedure Set_DefinitionDir(const Value: WideString); safecall;
    function  Get_ReportDir: WideString; safecall;
    procedure Set_ReportDir(const Value: WideString); safecall;
    function  Get_Connection: _Connection; safecall;
    procedure Set_Connection(const Value: _Connection); safecall;
    procedure PreviewReport; safecall;
    function  Get_Abort: WordBool; safecall;
    procedure Set_Abort(Value: WordBool); safecall;
    function  Get_DataRecordSet: _Recordset; safecall;
    procedure Set_DataRecordSet(const Value: _Recordset); safecall;
    function  Get_Parameters(const ParamName: WideString): WideString; safecall;
    procedure Set_Parameters(const ParamName: WideString; const Value: WideString); safecall;
    function  Get_ParameterCount: Integer; safecall;
    procedure Set_ParameterCount(Value: Integer); safecall;
    function  LoadReport(const ReportName: WideString): WordBool; safecall;
    procedure UnLoadReport; safecall;
    function  Get_ParameterNames(index: Integer): WideString; safecall;
    procedure Set_ParameterNames(index: Integer; const Value: WideString); safecall;
    procedure PrintToFile(const FFileName: WideString); safecall;
    procedure Print(FPrinterIndex: Integer; FFromPage: Integer; FToPage: Integer; FCopies: Integer); safecall;
    function  Get_SetFontSize: TMRInitEnum; safecall;
    procedure Set_SetFontSize(Value: TMRInitEnum); safecall;
    function  Get_PageLength: Integer; safecall;
    procedure Set_PageLength(Value: Integer); safecall;
    function  Get_ConvTableNameDM: WideString; safecall;
    procedure Set_ConvTableNameDM(const Value: WideString); safecall;
    function  Get_ConvTableNameMP: WideString; safecall;
    procedure Set_ConvTableNameMP(const Value: WideString); safecall;
    function  Get_FFAfterReport: TMRInitEnum; safecall;
    procedure Set_FFAfterReport(Value: TMRInitEnum); safecall;
    function  Get_ResetPrinter: TMRInitEnum; safecall;
    procedure Set_ResetPrinter(Value: TMRInitEnum); safecall;
    function  Get_PrinterESCCodes: WideString; safecall;
    procedure Set_PrinterESCCodes(const Value: WideString); safecall;
    property DefinitionDir: WideString read Get_DefinitionDir write Set_DefinitionDir;
    property ReportDir: WideString read Get_ReportDir write Set_ReportDir;
    property Connection: _Connection read Get_Connection write Set_Connection;
    property Abort: WordBool read Get_Abort write Set_Abort;
    property DataRecordSet: _Recordset read Get_DataRecordSet write Set_DataRecordSet;
    property Parameters[const ParamName: WideString]: WideString read Get_Parameters write Set_Parameters;
    property ParameterCount: Integer read Get_ParameterCount write Set_ParameterCount;
    property ParameterNames[index: Integer]: WideString read Get_ParameterNames write Set_ParameterNames;
    property SetFontSize: TMRInitEnum read Get_SetFontSize write Set_SetFontSize;
    property PageLength: Integer read Get_PageLength write Set_PageLength;
    property ConvTableNameDM: WideString read Get_ConvTableNameDM write Set_ConvTableNameDM;
    property ConvTableNameMP: WideString read Get_ConvTableNameMP write Set_ConvTableNameMP;
    property FFAfterReport: TMRInitEnum read Get_FFAfterReport write Set_FFAfterReport;
    property ResetPrinter: TMRInitEnum read Get_ResetPrinter write Set_ResetPrinter;
    property PrinterESCCodes: WideString read Get_PrinterESCCodes write Set_PrinterESCCodes;
  end;

// *********************************************************************//
// DispIntf:  IMRViewerObjectDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {7A82AB0E-3DC7-4CA6-9DDE-27811AB4263B}
// *********************************************************************//
  IMRViewerObjectDisp = dispinterface
    ['{7A82AB0E-3DC7-4CA6-9DDE-27811AB4263B}']
    property DefinitionDir: WideString dispid 1;
    property ReportDir: WideString dispid 2;
    property Connection: _Connection dispid 3;
    procedure PreviewReport; dispid 4;
    property Abort: WordBool dispid 5;
    property DataRecordSet: _Recordset dispid 7;
    property Parameters[const ParamName: WideString]: WideString dispid 8;
    property ParameterCount: Integer dispid 9;
    function  LoadReport(const ReportName: WideString): WordBool; dispid 10;
    procedure UnLoadReport; dispid 11;
    property ParameterNames[index: Integer]: WideString dispid 12;
    procedure PrintToFile(const FFileName: WideString); dispid 13;
    procedure Print(FPrinterIndex: Integer; FFromPage: Integer; FToPage: Integer; FCopies: Integer); dispid 14;
    property SetFontSize: TMRInitEnum dispid 15;
    property PageLength: Integer dispid 16;
    property ConvTableNameDM: WideString dispid 17;
    property ConvTableNameMP: WideString dispid 18;
    property FFAfterReport: TMRInitEnum dispid 19;
    property ResetPrinter: TMRInitEnum dispid 20;
    property PrinterESCCodes: WideString dispid 21;
  end;

// *********************************************************************//
// DispIntf:  IMRViewerObjectEvents
// Flags:     (4096) Dispatchable
// GUID:      {59A15F93-03FE-4B7D-9C5C-8A0AE5E566D3}
// *********************************************************************//
  IMRViewerObjectEvents = dispinterface
    ['{59A15F93-03FE-4B7D-9C5C-8A0AE5E566D3}']
    procedure OnProgress(Position: Integer); dispid 1;
    procedure OnGetDataRecordSet(const Name: WideString; IsMain: WordBool; const SQL: WideString); dispid 3;
  end;

// *********************************************************************//
// The Class CoMRViewerObject provides a Create and CreateRemote method to          
// create instances of the default interface IMRViewerObject exposed by              
// the CoClass MRViewerObject. The functions are intended to be used by             
// clients wishing to automate the CoClass objects exposed by the         
// server of this typelibrary.                                            
// *********************************************************************//
  CoMRViewerObject = class
    class function Create: IMRViewerObject;
    class function CreateRemote(const MachineName: string): IMRViewerObject;
  end;

  TMRViewerObjectOnProgress = procedure(Sender: TObject; Position: Integer) of object;
  TMRViewerObjectOnGetDataRecordSet = procedure(Sender: TObject; var Name: OleVariant;
                                                                 IsMain: WordBool; 
                                                                 var SQL: OleVariant) of object;


// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object    : TMRViewerObject
// Help String      : MRViewerObject Object
// Default Interface: IMRViewerObject
// Def. Intf. DISP? : No
// Event   Interface: IMRViewerObjectEvents
// TypeFlags        : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  TMRViewerObjectProperties= class;
{$ENDIF}
  TMRViewerObject = class(TOleServer)
  private
    FOnProgress: TMRViewerObjectOnProgress;
    FOnGetDataRecordSet: TMRViewerObjectOnGetDataRecordSet;
    FIntf:        IMRViewerObject;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    FProps:       TMRViewerObjectProperties;
    function      GetServerProperties: TMRViewerObjectProperties;
{$ENDIF}
    function      GetDefaultInterface: IMRViewerObject;
  protected
    procedure InitServerData; override;
    procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
    function  Get_DefinitionDir: WideString;
    procedure Set_DefinitionDir(const Value: WideString);
    function  Get_ReportDir: WideString;
    procedure Set_ReportDir(const Value: WideString);
    function  Get_Connection: _Connection;
    procedure Set_Connection(const Value: _Connection);
    function  Get_Abort: WordBool;
    procedure Set_Abort(Value: WordBool);
    function  Get_DataRecordSet: _Recordset;
    procedure Set_DataRecordSet(const Value: _Recordset);
    function  Get_Parameters(const ParamName: WideString): WideString;
    procedure Set_Parameters(const ParamName: WideString; const Value: WideString);
    function  Get_ParameterCount: Integer;
    procedure Set_ParameterCount(Value: Integer);
    function  Get_ParameterNames(index: Integer): WideString;
    procedure Set_ParameterNames(index: Integer; const Value: WideString);
    function  Get_SetFontSize: TMRInitEnum;
    procedure Set_SetFontSize(Value: TMRInitEnum);
    function  Get_PageLength: Integer;
    procedure Set_PageLength(Value: Integer);
    function  Get_ConvTableNameDM: WideString;
    procedure Set_ConvTableNameDM(const Value: WideString);
    function  Get_ConvTableNameMP: WideString;
    procedure Set_ConvTableNameMP(const Value: WideString);
    function  Get_FFAfterReport: TMRInitEnum;
    procedure Set_FFAfterReport(Value: TMRInitEnum);
    function  Get_ResetPrinter: TMRInitEnum;
    procedure Set_ResetPrinter(Value: TMRInitEnum);
    function  Get_PrinterESCCodes: WideString;
    procedure Set_PrinterESCCodes(const Value: WideString);
  public
    constructor Create(AOwner: TComponent); override;
    destructor  Destroy; override;
    procedure Connect; override;
    procedure ConnectTo(svrIntf: IMRViewerObject);
    procedure Disconnect; override;
    procedure PreviewReport;
    function  LoadReport(const ReportName: WideString): WordBool;
    procedure UnLoadReport;
    procedure PrintToFile(const FFileName: WideString);
    procedure Print(FPrinterIndex: Integer; FFromPage: Integer; FToPage: Integer; FCopies: Integer);
    property  DefaultInterface: IMRViewerObject read GetDefaultInterface;
    property Parameters[const ParamName: WideString]: WideString read Get_Parameters write Set_Parameters;
    property ParameterNames[index: Integer]: WideString read Get_ParameterNames write Set_ParameterNames;
    property DefinitionDir: WideString read Get_DefinitionDir write Set_DefinitionDir;
    property ReportDir: WideString read Get_ReportDir write Set_ReportDir;
    property Connection: _Connection read Get_Connection write Set_Connection;
    property Abort: WordBool read Get_Abort write Set_Abort;
    property DataRecordSet: _Recordset read Get_DataRecordSet write Set_DataRecordSet;
    property ParameterCount: Integer read Get_ParameterCount write Set_ParameterCount;
    property SetFontSize: TMRInitEnum read Get_SetFontSize write Set_SetFontSize;
    property PageLength: Integer read Get_PageLength write Set_PageLength;
    property ConvTableNameDM: WideString read Get_ConvTableNameDM write Set_ConvTableNameDM;
    property ConvTableNameMP: WideString read Get_ConvTableNameMP write Set_ConvTableNameMP;
    property FFAfterReport: TMRInitEnum read Get_FFAfterReport write Set_FFAfterReport;
    property ResetPrinter: TMRInitEnum read Get_ResetPrinter write Set_ResetPrinter;
    property PrinterESCCodes: WideString read Get_PrinterESCCodes write Set_PrinterESCCodes;
  published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
    property Server: TMRViewerObjectProperties read GetServerProperties;
{$ENDIF}
    property OnProgress: TMRViewerObjectOnProgress read FOnProgress write FOnProgress;
    property OnGetDataRecordSet: TMRViewerObjectOnGetDataRecordSet read FOnGetDataRecordSet write FOnGetDataRecordSet;
  end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object    : TMRViewerObject
// (This object is used by the IDE's Property Inspector to allow editing
//  of the properties of this server)
// *********************************************************************//
 TMRViewerObjectProperties = class(TPersistent)
  private
    FServer:    TMRViewerObject;
    function    GetDefaultInterface: IMRViewerObject;
    constructor Create(AServer: TMRViewerObject);
  protected
    function  Get_DefinitionDir: WideString;
    procedure Set_DefinitionDir(const Value: WideString);
    function  Get_ReportDir: WideString;
    procedure Set_ReportDir(const Value: WideString);
    function  Get_Connection: _Connection;
    procedure Set_Connection(const Value: _Connection);
    function  Get_Abort: WordBool;
    procedure Set_Abort(Value: WordBool);
    function  Get_DataRecordSet: _Recordset;
    procedure Set_DataRecordSet(const Value: _Recordset);
    function  Get_Parameters(const ParamName: WideString): WideString;
    procedure Set_Parameters(const ParamName: WideString; const Value: WideString);
    function  Get_ParameterCount: Integer;
    procedure Set_ParameterCount(Value: Integer);
    function  Get_ParameterNames(index: Integer): WideString;
    procedure Set_ParameterNames(index: Integer; const Value: WideString);
    function  Get_SetFontSize: TMRInitEnum;
    procedure Set_SetFontSize(Value: TMRInitEnum);
    function  Get_PageLength: Integer;
    procedure Set_PageLength(Value: Integer);
    function  Get_ConvTableNameDM: WideString;
    procedure Set_ConvTableNameDM(const Value: WideString);
    function  Get_ConvTableNameMP: WideString;
    procedure Set_ConvTableNameMP(const Value: WideString);
    function  Get_FFAfterReport: TMRInitEnum;
    procedure Set_FFAfterReport(Value: TMRInitEnum);
    function  Get_ResetPrinter: TMRInitEnum;
    procedure Set_ResetPrinter(Value: TMRInitEnum);
    function  Get_PrinterESCCodes: WideString;
    procedure Set_PrinterESCCodes(const Value: WideString);
  public
    property DefaultInterface: IMRViewerObject read GetDefaultInterface;
  published
    property DefinitionDir: WideString read Get_DefinitionDir write Set_DefinitionDir;
    property ReportDir: WideString read Get_ReportDir write Set_ReportDir;
    property Connection: _Connection read Get_Connection write Set_Connection;
    property Abort: WordBool read Get_Abort write Set_Abort;
    property DataRecordSet: _Recordset read Get_DataRecordSet write Set_DataRecordSet;
    property ParameterCount: Integer read Get_ParameterCount write Set_ParameterCount;
    property SetFontSize: TMRInitEnum read Get_SetFontSize write Set_SetFontSize;
    property PageLength: Integer read Get_PageLength write Set_PageLength;
    property ConvTableNameDM: WideString read Get_ConvTableNameDM write Set_ConvTableNameDM;
    property ConvTableNameMP: WideString read Get_ConvTableNameMP write Set_ConvTableNameMP;
    property FFAfterReport: TMRInitEnum read Get_FFAfterReport write Set_FFAfterReport;
    property ResetPrinter: TMRInitEnum read Get_ResetPrinter write Set_ResetPrinter;
    property PrinterESCCodes: WideString read Get_PrinterESCCodes write Set_PrinterESCCodes;
  end;
{$ENDIF}


procedure Register;

implementation

uses ComObj;

class function CoMRViewerObject.Create: IMRViewerObject;
begin
  Result := CreateComObject(CLASS_MRViewerObject) as IMRViewerObject;
end;

class function CoMRViewerObject.CreateRemote(const MachineName: string): IMRViewerObject;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_MRViewerObject) as IMRViewerObject;
end;

procedure TMRViewerObject.InitServerData;
const
  CServerData: TServerData = (
    ClassID:   '{E8CCCF20-9F6A-43ED-B6D4-CDD695CE7564}';
    IntfIID:   '{7A82AB0E-3DC7-4CA6-9DDE-27811AB4263B}';
    EventIID:  '{59A15F93-03FE-4B7D-9C5C-8A0AE5E566D3}';
    LicenseKey: nil;
    Version: 500);
begin
  ServerData := @CServerData;
end;

procedure TMRViewerObject.Connect;
var
  punk: IUnknown;
begin
  if FIntf = nil then
  begin
    punk := GetServer;
    ConnectEvents(punk);
    Fintf:= punk as IMRViewerObject;
  end;
end;

procedure TMRViewerObject.ConnectTo(svrIntf: IMRViewerObject);
begin
  Disconnect;
  FIntf := svrIntf;
  ConnectEvents(FIntf);
end;

procedure TMRViewerObject.DisConnect;
begin
  if Fintf <> nil then
  begin
    DisconnectEvents(FIntf);
    FIntf := nil;
  end;
end;

function TMRViewerObject.GetDefaultInterface: IMRViewerObject;
begin
  if FIntf = nil then
    Connect;
  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
  Result := FIntf;
end;

constructor TMRViewerObject.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps := TMRViewerObjectProperties.Create(Self);
{$ENDIF}
end;

destructor TMRViewerObject.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
  FProps.Free;
{$ENDIF}
  inherited Destroy;
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TMRViewerObject.GetServerProperties: TMRViewerObjectProperties;
begin
  Result := FProps;
end;
{$ENDIF}

procedure TMRViewerObject.InvokeEvent(DispID: TDispID; var Params: TVariantArray);
begin
  case DispID of
    -1: Exit;  // DISPID_UNKNOWN
   1: if Assigned(FOnProgress) then
            FOnProgress(Self, Params[0] {Integer});
   3: if Assigned(FOnGetDataRecordSet) then
            FOnGetDataRecordSet(Self, Params[0] {const WideString}, Params[1] {WordBool}, Params[2] {const WideString});
  end; {case DispID}
end;

function  TMRViewerObject.Get_DefinitionDir: WideString;
begin
  Result := DefaultInterface.Get_DefinitionDir;
end;

procedure TMRViewerObject.Set_DefinitionDir(const Value: WideString);
begin
  DefaultInterface.Set_DefinitionDir(Value);
end;

function  TMRViewerObject.Get_ReportDir: WideString;
begin
  Result := DefaultInterface.Get_ReportDir;
end;

procedure TMRViewerObject.Set_ReportDir(const Value: WideString);
begin
  DefaultInterface.Set_ReportDir(Value);
end;

function  TMRViewerObject.Get_Connection: _Connection;
begin
  Result := DefaultInterface.Get_Connection;
end;

procedure TMRViewerObject.Set_Connection(const Value: _Connection);
begin
  DefaultInterface.Set_Connection(Value);
end;

function  TMRViewerObject.Get_Abort: WordBool;
begin
  Result := DefaultInterface.Get_Abort;
end;

procedure TMRViewerObject.Set_Abort(Value: WordBool);
begin
  DefaultInterface.Set_Abort(Value);
end;

function  TMRViewerObject.Get_DataRecordSet: _Recordset;
begin
  Result := DefaultInterface.Get_DataRecordSet;
end;

procedure TMRViewerObject.Set_DataRecordSet(const Value: _Recordset);
begin
  DefaultInterface.Set_DataRecordSet(Value);
end;

function  TMRViewerObject.Get_Parameters(const ParamName: WideString): WideString;
begin
  Result := DefaultInterface.Get_Parameters(ParamName);
end;

procedure TMRViewerObject.Set_Parameters(const ParamName: WideString; const Value: WideString);
begin
  DefaultInterface.Set_Parameters(ParamName, Value);
end;

function  TMRViewerObject.Get_ParameterCount: Integer;
begin
  Result := DefaultInterface.Get_ParameterCount;
end;

procedure TMRViewerObject.Set_ParameterCount(Value: Integer);
begin
  DefaultInterface.Set_ParameterCount(Value);
end;

function  TMRViewerObject.Get_ParameterNames(index: Integer): WideString;
begin
  Result := DefaultInterface.Get_ParameterNames(index);
end;

procedure TMRViewerObject.Set_ParameterNames(index: Integer; const Value: WideString);
begin
  DefaultInterface.Set_ParameterNames(index, Value);
end;

function  TMRViewerObject.Get_SetFontSize: TMRInitEnum;
begin
  Result := DefaultInterface.Get_SetFontSize;
end;

procedure TMRViewerObject.Set_SetFontSize(Value: TMRInitEnum);
begin
  DefaultInterface.Set_SetFontSize(Value);
end;

function  TMRViewerObject.Get_PageLength: Integer;
begin
  Result := DefaultInterface.Get_PageLength;
end;

procedure TMRViewerObject.Set_PageLength(Value: Integer);
begin
  DefaultInterface.Set_PageLength(Value);
end;

function  TMRViewerObject.Get_ConvTableNameDM: WideString;
begin
  Result := DefaultInterface.Get_ConvTableNameDM;
end;

procedure TMRViewerObject.Set_ConvTableNameDM(const Value: WideString);
begin
  DefaultInterface.Set_ConvTableNameDM(Value);
end;

function  TMRViewerObject.Get_ConvTableNameMP: WideString;
begin
  Result := DefaultInterface.Get_ConvTableNameMP;
end;

procedure TMRViewerObject.Set_ConvTableNameMP(const Value: WideString);
begin
  DefaultInterface.Set_ConvTableNameMP(Value);
end;

function  TMRViewerObject.Get_FFAfterReport: TMRInitEnum;
begin
  Result := DefaultInterface.Get_FFAfterReport;
end;

procedure TMRViewerObject.Set_FFAfterReport(Value: TMRInitEnum);
begin
  DefaultInterface.Set_FFAfterReport(Value);
end;

function  TMRViewerObject.Get_ResetPrinter: TMRInitEnum;
begin
  Result := DefaultInterface.Get_ResetPrinter;
end;

procedure TMRViewerObject.Set_ResetPrinter(Value: TMRInitEnum);
begin
  DefaultInterface.Set_ResetPrinter(Value);
end;

function  TMRViewerObject.Get_PrinterESCCodes: WideString;
begin
  Result := DefaultInterface.Get_PrinterESCCodes;
end;

procedure TMRViewerObject.Set_PrinterESCCodes(const Value: WideString);
begin
  DefaultInterface.Set_PrinterESCCodes(Value);
end;

procedure TMRViewerObject.PreviewReport;
begin
  DefaultInterface.PreviewReport;
end;

function  TMRViewerObject.LoadReport(const ReportName: WideString): WordBool;
begin
  Result := DefaultInterface.LoadReport(ReportName);
end;

procedure TMRViewerObject.UnLoadReport;
begin
  DefaultInterface.UnLoadReport;
end;

procedure TMRViewerObject.PrintToFile(const FFileName: WideString);
begin
  DefaultInterface.PrintToFile(FFileName);
end;

procedure TMRViewerObject.Print(FPrinterIndex: Integer; FFromPage: Integer; FToPage: Integer; 
                                FCopies: Integer);
begin
  DefaultInterface.Print(FPrinterIndex, FFromPage, FToPage, FCopies);
end;

{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TMRViewerObjectProperties.Create(AServer: TMRViewerObject);
begin
  inherited Create;
  FServer := AServer;
end;

function TMRViewerObjectProperties.GetDefaultInterface: IMRViewerObject;
begin
  Result := FServer.DefaultInterface;
end;

function  TMRViewerObjectProperties.Get_DefinitionDir: WideString;
begin
  Result := DefaultInterface.Get_DefinitionDir;
end;

procedure TMRViewerObjectProperties.Set_DefinitionDir(const Value: WideString);
begin
  DefaultInterface.Set_DefinitionDir(Value);
end;

function  TMRViewerObjectProperties.Get_ReportDir: WideString;
begin
  Result := DefaultInterface.Get_ReportDir;
end;

procedure TMRViewerObjectProperties.Set_ReportDir(const Value: WideString);
begin
  DefaultInterface.Set_ReportDir(Value);
end;

function  TMRViewerObjectProperties.Get_Connection: _Connection;
begin
  Result := DefaultInterface.Get_Connection;
end;

procedure TMRViewerObjectProperties.Set_Connection(const Value: _Connection);
begin
  DefaultInterface.Set_Connection(Value);
end;

function  TMRViewerObjectProperties.Get_Abort: WordBool;
begin
  Result := DefaultInterface.Get_Abort;
end;

procedure TMRViewerObjectProperties.Set_Abort(Value: WordBool);
begin
  DefaultInterface.Set_Abort(Value);
end;

function  TMRViewerObjectProperties.Get_DataRecordSet: _Recordset;
begin
  Result := DefaultInterface.Get_DataRecordSet;
end;

procedure TMRViewerObjectProperties.Set_DataRecordSet(const Value: _Recordset);
begin
  DefaultInterface.Set_DataRecordSet(Value);
end;

function  TMRViewerObjectProperties.Get_Parameters(const ParamName: WideString): WideString;
begin
  Result := DefaultInterface.Get_Parameters(ParamName);
end;

procedure TMRViewerObjectProperties.Set_Parameters(const ParamName: WideString; 
                                                   const Value: WideString);
begin
  DefaultInterface.Set_Parameters(ParamName, Value);
end;

function  TMRViewerObjectProperties.Get_ParameterCount: Integer;
begin
  Result := DefaultInterface.Get_ParameterCount;
end;

procedure TMRViewerObjectProperties.Set_ParameterCount(Value: Integer);
begin
  DefaultInterface.Set_ParameterCount(Value);
end;

function  TMRViewerObjectProperties.Get_ParameterNames(index: Integer): WideString;
begin
  Result := DefaultInterface.Get_ParameterNames(index);
end;

procedure TMRViewerObjectProperties.Set_ParameterNames(index: Integer; const Value: WideString);
begin
  DefaultInterface.Set_ParameterNames(index, Value);
end;

function  TMRViewerObjectProperties.Get_SetFontSize: TMRInitEnum;
begin
  Result := DefaultInterface.Get_SetFontSize;
end;

procedure TMRViewerObjectProperties.Set_SetFontSize(Value: TMRInitEnum);
begin
  DefaultInterface.Set_SetFontSize(Value);
end;

function  TMRViewerObjectProperties.Get_PageLength: Integer;
begin
  Result := DefaultInterface.Get_PageLength;
end;

procedure TMRViewerObjectProperties.Set_PageLength(Value: Integer);
begin
  DefaultInterface.Set_PageLength(Value);
end;

function  TMRViewerObjectProperties.Get_ConvTableNameDM: WideString;
begin
  Result := DefaultInterface.Get_ConvTableNameDM;
end;

procedure TMRViewerObjectProperties.Set_ConvTableNameDM(const Value: WideString);
begin
  DefaultInterface.Set_ConvTableNameDM(Value);
end;

function  TMRViewerObjectProperties.Get_ConvTableNameMP: WideString;
begin
  Result := DefaultInterface.Get_ConvTableNameMP;
end;

procedure TMRViewerObjectProperties.Set_ConvTableNameMP(const Value: WideString);
begin
  DefaultInterface.Set_ConvTableNameMP(Value);
end;

function  TMRViewerObjectProperties.Get_FFAfterReport: TMRInitEnum;
begin
  Result := DefaultInterface.Get_FFAfterReport;
end;

procedure TMRViewerObjectProperties.Set_FFAfterReport(Value: TMRInitEnum);
begin
  DefaultInterface.Set_FFAfterReport(Value);
end;

function  TMRViewerObjectProperties.Get_ResetPrinter: TMRInitEnum;
begin
  Result := DefaultInterface.Get_ResetPrinter;
end;

procedure TMRViewerObjectProperties.Set_ResetPrinter(Value: TMRInitEnum);
begin
  DefaultInterface.Set_ResetPrinter(Value);
end;

function  TMRViewerObjectProperties.Get_PrinterESCCodes: WideString;
begin
  Result := DefaultInterface.Get_PrinterESCCodes;
end;

procedure TMRViewerObjectProperties.Set_PrinterESCCodes(const Value: WideString);
begin
  DefaultInterface.Set_PrinterESCCodes(Value);
end;

{$ENDIF}

procedure Register;
begin
  RegisterComponents('Servers',[TMRViewerObject]);
end;

end.
