Show contents 

Report > Report Assembly Interfaces > IPrxFlash > IPrxFlash.LoadFromFile

IPrxFlash.LoadFromFile

Syntax

LoadFromFile(FileName: String);

Parameters

FileName - full name of the file, from which the Flash object is to be loaded.

Description

The LoadFromFile method loads a Flash object from a file.

Fore Example

Executing the example requires that the repository contains a regular report with the REGULAR_REPORT identifier. The file system must also contain a Flash file C:/Flash.swf. Add links to the Metabase, Drawing, Report, Tab system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Rep: IPrxReport;
    SheetT: IPrxTable;
    Place: IGxRectF;
    Tab: ITabSheet;
    Fl: IPrxFlash;
Begin
    MB := MetabaseClass.Active;
    Rep := MB.ItemById(
"REGULAR_REPORT").Edit As IPrxReport;
    Place := 
New GxRectF.Create(1010100100);
    SheetT := Rep.Sheets.Item(
0As IPrxTable;
    Tab := SheetT.TabSheet;
    Fl := Tab.Objects.Add(
"PrxFlash", Place).Extension As IPrxFlash;
    Fl.LoadFromFile(
"C:\Flash.swf");
    (Rep 
As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the Flash object from the C:\Flash.swf file is added to the first sheet of the regular report.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Rep: IPrxReport;
    SheetT: IPrxTable;
    Tab: ITabSheet;
    Fl: IPrxFlash;
    RectF: GxRectF = New GxRectFClass();
Begin
    MB := Params.Metabase;
    Rep := MB.ItemById["REGULAR_REPORT"].Edit() As IPrxReport;
    RectF.Create(1010100100);
    SheetT := Rep.Sheets.Item[0As IPrxTable;
    Tab := SheetT.TabSheet;
    Fl := Tab.Objects.Add("PrxFlash", RectF).Extension As IPrxFlash;
    Fl.LoadFromFile("C:\Flash.swf");
    (Rep As IMetabaseObject).Save();
End Sub;

See also:

IPrxFlash