Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Output a report in PDF format
Message
From
18/03/2010 10:53:35
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01455338
Message ID:
01455383
Views:
102
>>>Hi there
>>>
>>>I need to output a report in PDF format so that I can email the letter (report) to someone. Is it possible to create a report in PDF format? I've looked at the 'Report form' command and you can only output your report to an ASCII file format.
>>>
>>>Can you please help me?
>>
>>Have look at www.report-sculptor.com
>>
>>HTH
>>Sergio
>
>Does it work with the existing reports - in other words, we have the reports designed, we don't want to switch to something new, we just need to output them to PDF. If yes, then how exactly does it work?

Of course it does. You can use single FRX or multiple FRXes or combination of FRX with
other report design methods such are direct scripting, form reports, text interpreting etc.

Report Scultptor is NOT replacement for FRX, it is an extension/complement to standard FoxPro reporting.

Sending report to pdf is very simple
cFrx= YourFrx
=frx2rs(cFrx, 5 , .t. )
*Goes straight to PDF 
=frx2rs(cFrx)  
*Invokes RS preview from where you can also produce pdf and send it via email. 
To merge multiple frx-es into one you need little bit more code
local oRS
oRS = GetRsObject()
oRS.lAutoFirstPage=.f.

local cFrx1,cFrx2
with oRS

    .OpenSession()


     cFrx1 =   HOME() + 'SAMPLES\SOLUTION\REPORTS\' +  'ledger.FRX'
     cFrx2 =   HOME() + 'SAMPLES\SOLUTION\REPORTS\' +  'Colors.FRX'
     cFrx3 =   home()+ 'tools\Filespec\'  +  '60frx1.FRX'
 
     .LoadFrx(rsFrx(cFrx1                    ))  &&Import result of frx for given scope
     .LoadFrx(rsFrx(cFrx2                    ))  &&Import result of frx for given scope
     .LoadFrx(rsFrx(cFrx3                    ))  &&Import result of frx for given scope
  
 
    .CloseSession()

  
endwith
oRs.Output( 5 , .t. )  && to PDF with preview
PDF is done using Dorin Vasilescu wrapper of HARU pdf library
(the same one used by Louis Navas as well)

It also works with XFRX if you own licence to it.


If you need any help implementing it let me know.
HTH
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform