RPV Reports / Usage Examples
 
Search in RpvSoftware.com
Go!                                         English    Español

What Rpv is

Rpv Reports 2024

Downloads

Training/Consultancy

Support

Purchase

Contact

 
Home > Usage Examples
Clipper / Harbour
This example shows how to prepare a report with Clipper / Harbour using RPV Reports.

Prepared by FĂ©lix Pablo Grande Ramos. Spain.
Code
// Author: Felix Pablo Grande Ramos
// Harbour Advantage RDD sample


#include "FiveWin.ch"
#include "ads.ch"
#include "Fileio.ch"

#define CRTLF CHR(13)+ CHR(10)

REQUEST _ADS

//----------------------------------------------------------------------------//

function Main()

   local file_id
   local ctexto:=""

   rddRegister( "ADS", 1 )
   rddsetdefault( "ADS" )

   file_id:=FCREATE("c:
pv
pvtest.rpv")
   IF file_id < 0
      ? "No se puede crear el fichero de prueba"
      return nil
   else
      ctexto := "Report_Title=Using RPV and Clipper/Harbour" + CRTLF
      ctexto := ctexto + "Papersize=A4" + CRTLF
      ctexto := ctexto + "tm=500" + CRTLF
      ctexto:=ctexto+ "Orientation=1" + CRTLF
      ctexto:=ctexto+ "Spacing=250" +CRTLF
      ctexto:=ctexto + "$c0=1000" + CRTLF
      ctexto:=ctexto+ "$c1=4000" + CRTLF
      ctexto:=ctexto+ "[Header]" +CRTLF
      ctexto:=ctexto+ "{f=arial;s=8}" +CRTLF
      ctexto:=ctexto+ "{b=y;$c0} Cliente {$c1} Domicilio {b=n}" +CRTLF
      ctexto:=ctexto+ "[Data]" + CRTLF
      fwrite(file_id,ctexto)
   Endif
  
   SET SERVER LOCAL
   SET FILETYPE TO NTX
  
   USE Clientes // Open any DBF...
  
   do While !EOF()
      ctexto :="{$c0} "+ Clientes->NOMBRE+ ;
                  "{$c1}"+ Clientes->DIRECCION + "{
}"+ CRTLF
      fwrite(file_id,ctexto)
      skip
   ENDdo
  
   USE
   FCLOSE(file_id)
   __RUN("rpv rpvtest.rpv /e")
return nil
  
//----------------------------------------------------------------------------//
RPV Report
Report_Title=Using RPV and Clipper/Harbour
Papersize=A4
tm=500
Orientation=1
Spacing=250
$c0=1000
$c1=4000
[Header]
{f=arial;s=8}
{b=y;$c0} Cliente {$c1} Domicilio {b=n;\n;\n}
[Data]
{$c0}Mark Harris {$c1}Top Street 2255{\n}
{$c0} Dean Garkis{$c1}Miraflores 225{\n}
{$c0} Joe Legrand{$c1}Torres 556{\n}
{$c0} Tito Banderas{$c1}Flores 44{\n}
Screenshot
Screenshot

Home
What Rpv is
Rpv Reports 2024

Products
Rpv Reports 2024
Personalized edition

More...
Downloads
Support
Rpv Reports Online help
Rpv Visual Editor online help
Examples
/temp section
Videos




Copyright (c) 2001-2024 - Rpv Software. All rights reserved.