Página 1 de 1

New Bee -- Need Help

Publicado: Dom May 01, 2016 6:48 am
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

Re: New Bee -- Need Help

Publicado: Lun May 02, 2016 12:12 pm
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

Re: New Bee -- Need Help

Publicado: Mar May 03, 2016 6:48 am
por hemantpandya
Hi Ignacio,

Thank you very much for your help much appreciated.

Regards
Hemant
Sydney - Australia