Fast Report: how to load and preview a fp3 file

Fast Report: how to load and preview a fp3 file

Postby Marco Turco » Sat May 24, 2014 5: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
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: Fast Report: how to load and preview a fp3 file

Postby Armando » Sat May 24, 2014 6:27 pm

Marco:

Perhaps this code can helps you:

Code: Select all  Expand view  RUN

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
User avatar
Armando
 
Posts: 3239
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: Fast Report: how to load and preview a fp3 file

Postby Marco Turco » Sat May 24, 2014 6: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
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: Fast Report: how to load and preview a fp3 file

Postby Silvio.Falconi » Wed May 28, 2014 7: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 10 guests