FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Fast Report: how to load and preview a fp3 file
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Fast Report: how to load and preview a fp3 file
Posted: Sat May 24, 2014 05:30 PM

Hi all,
I would like to open a preview with a previous saved fp3 file.
I'm using the following code but the error "Cannot find class prepared report appear". Any ideas ?

include 'fivewin.ch'

include 'FastRepH.CH'

function Main()
local FrPrn

FrPrn := frReportManager():new()
FrPrn:LoadFromFile("test.fp3")
FrPrn:ShowPreparedReport()
FrPrn:DestroyFR()
return nil

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: Fast Report: how to load and preview a fp3 file
Posted: Sat May 24, 2014 06:27 PM
Marco:

Perhaps this code can helps you:

Code (fw): Select all Collapse
oFr := frReportManager():New()
oFr:LoadLangRes("SPANISH.Xml")
oFr:SetIcon("AppLogo")
oFr:LoadFromFile(ALLTRIM(cLabel))
oFr:SetProperty("MasterData1", "RowCount", nCopias)
oFr:PrintOptions:SetShowDialog(.T.)    // This code is for preview
oFr:ShowReport()
oFr:DestroyFr()


With best regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: Fast Report: how to load and preview a fp3 file
Posted: Sat May 24, 2014 06:44 PM

Thank you Armando. I had solved this way:

FrPrn := frReportManager():new()
FrPrn:LoadFPFile("test.fp3")
FrPrn:ShowPreparedReport()
FrPrn:DestroyFR()
return nil

nb. the fp3 file need to be saved using SaveToFpFile method.

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: Fast Report: how to load and preview a fp3 file
Posted: Wed May 28, 2014 07:16 AM

Marco,
on Fw Brasil I found a utility to load a fr3 and converte it into Prg ... I not tried it but if it run it 's fantastic!!!

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion