In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

New Bee -- Need Help

FastReport for Xailer & [x]Harbour (English/Spanish)
Responder
hemantpandya
Mensajes: 11
Registrado: Mié Abr 20, 2016 7:30 am

New Bee -- Need Help

Mensaje por hemantpandya »

Hi All,

Trying to create Master/Detail/Sub Detail report. In subdetail report I want to print "Description" from another file (in this case "ACPT") but reports pick 1 random name and display for all records. Not sure what I am missing.

Where can I find sample prg/report for reference.

Please guide me.

Regards
Hemant
Sydney - Australia


function create_report()

REQUEST DBFCDX, DBFFPT
RDDSETDEFAULT( "DBFCDX" )

use group shared new
set orde to 1
use depo shared new
set orde to 3
use acpt shared new //<<-- Need to print "Name" from this dbf
SET ORDER TO TAG "ACCODE"
use tran shared new
set orde to 3
SET RELATION TO acode INTO acpt
GO TOP
WITH OBJECT oReport := TFastReport():New()

oGroup := :AddDbf( "group", { "group->*" } )
oDepo := :AddDbf( "DEPO", { "Depo->*" } )
oChithi := :AddDbf( "TRAN", { "TRAN->*"} )
oAcpt := :AddDbf( "acpt", { "acpt->*" } )

oDepo:SetMaster( oGroup, {"gcod=code"} )
oChithi:SetMaster( oDepo, {"dcode=code"} )
:Create()
// :cFilename := "grp_dtl.fr3"
// :ShowReport()
:DesignReport()
:End()
END WITH

retu
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9246
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: New Bee -- Need Help

Mensaje por ignacio »

Hello,

Please review a thread about this same issue few days ago. There are two ways of making relations with FRX, from the Harbour side and from the FR side, an it seems you are mixing both.

Make the relations in harbour an include a unique dataset to FRX:

AddDbf( "ORDERS", { "Orders->*", "Customer->*" } )

Regards
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
hemantpandya
Mensajes: 11
Registrado: Mié Abr 20, 2016 7:30 am

Re: New Bee -- Need Help

Mensaje por hemantpandya »

Hi Ignacio,

Thank you very much for your help much appreciated.

Regards
Hemant
Sydney - Australia
Responder