ActiveX Equivalentes de funciones FoxPro en Fivewin

ActiveX Equivalentes de funciones FoxPro en Fivewin

Postby albeiroval » Sat Nov 23, 2024 4:16 pm

Hola a todos.

En Fivewin o Harbour existiran las siguientes funciones para accesar una Dll ActiveX
contenidas en el siguiente codigo echo en Fox Pro. De ser asi cuales son los equivalentes ?
Code: Select all  Expand view  RUN

LOCAL oDatabase
LOCAL db
LOCAL tbl
LOCAL freport
LOCAL fr
LOCAL pg
LOCAL mm
LOCAL oPage
LOCAL oTable
LOCAL oDatabase
LOCAL oMemo
LOCAL qry
LOCAL oQuery


freport = Createobject("FastReport.TfrxReport")
* WAIT "Report created" window

fr  = GETINTERFACE(freport, "IfrxReport" )
* WAIT "IfrxReport taken" window

cmp  = GETINTERFACE(freport, "IfrxComponent" )
* WAIT "IfrxComponent '" + cmp.Name + "' taken" window

db = freport.CreateReportObjectEx( freport, "TfrxADODatabase", "Database" )
* cmp  = GETINTERFACE(db, "IfrxComponent" )
* WAIT "ADO database '"+ cmp.Name + "' created" window
oDatabase = GETINTERFACE(db, "IfrxADODatabase" )
oDatabase.ConnectionString = "Provider=VFPOLEDB.1;Data Source=C:\Documents and Settings\alman\My Documents\frx.COM\Studio\Demo\Visual Fox Pro\test\demo2.dbc;Collating Sequence=MACHINE"
oDatabase.LoginPrompt = .F.

pg = freport.CreateReportObjectEx( fr, "TfrxPage", "MyPage" )
oPage = GETINTERFACE(pg, "IfrxReportPage")
oPage.SetDefaults

tbl = freport.CreateReportObjectEx( freport, "TfrxADOTable", "Table" )
oTable = GETINTERFACE(tbl, "IfrxADOTable")
try
oDatabase.Connected = .T.
CATCH
    WAIT "Please, check the database connection string and restart program" window
    cancel
endtry
oTable.TableName = "Students"
oTable.DataBase = oDatabase
*WAIT "ADO table created" window

qry = freport.CreateReportObjectEx( freport, "TfrxADOQuery", "Query1" )
oQuery = GETINTERFACE(qry, "IfrxADOQuery")
oQuery.Query = "select * from master where weight > 50"
oQuery.DataBase = oDatabase

mm = freport.CreateReportObjectEx( pg, "TfrxMemoView", "Memo" )
SetMemoText( mm, "Hello world!!!" )
SetPositionAndSize( mm, 10, 10, 100, 100)
* WAIT "Memo created" window

freport.SelectDataset( .T., oTable )
freport.SelectDataset( .T., oQuery )
freport.DesignReport()

*************************************************************
* This procedure assign memo text
*************************************************************
Procedure SetMemoText
    Parameters obj, Text
    Local component
    Try
        component  = Getinterface(obj, "IfrxMemoView" )
        component.Memo = Text
    Catch To ReportException
        Wait "Unable set memo text due to: " + ReportException.Message Window
    Endtry
Endproc

*************************************************************
* This procedure assign report's object position and size
*************************************************************
Procedure SetPositionAndSize
    Parameters obj, x, Y, Width, Height
    Local component
    Try
        component  = Getinterface(obj, "IfrxComponent" )
        component.Left = x
        component.Top = Y
        component.Width = Width
        component.Height = Height
    Catch To ReportException
        Wait "Unable set object size: " + ReportException.Message Window
    Endtry
Endproc


Saludos,
Regards,

Albeiro Valencia
www.avcsistemas.com
User avatar
albeiroval
 
Posts: 373
Joined: Tue Oct 16, 2007 5:51 pm
Location: Barquisimeto - Venezuela

Re: ActiveX Equivalentes de funciones FoxPro en Fivewin

Postby karinha » Sun Nov 24, 2024 11:20 am

Albeiro, ¿qué quieres hacer? Aprender a utilizar FASTREPORT, ¿es eso?

Igual en Fivewin:

https://sagierp.com.br/devel/fastreport/manual_xHarbour_fastreport.pdf

Gracias, tks.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7828
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: ActiveX Equivalentes de funciones FoxPro en Fivewin

Postby albeiroval » Sun Nov 24, 2024 2:35 pm

Karinha,
Albeiro, ¿qué quieres hacer? Aprender a utilizar FASTREPORT, ¿es eso?


No, solo quiero saber si existe la funcion GETINTERFACE
Saludos,
Regards,

Albeiro Valencia
www.avcsistemas.com
User avatar
albeiroval
 
Posts: 373
Joined: Tue Oct 16, 2007 5:51 pm
Location: Barquisimeto - Venezuela

Re: ActiveX Equivalentes de funciones FoxPro en Fivewin

Postby karinha » Mon Nov 25, 2024 11:15 am

Si no me equivoco, sólo Visual Fox Pro 7 tiene este comando.

Explica lo que quieres hacer, tal vez haya algo similar en [x]Harbour.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7828
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 45 guests