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)
hemantpandya
Posts: 11
Joined: Wed Apr 20, 2016 7:30 am

New Bee -- Need Help

Postby hemantpandya » Sun May 01, 2016 6:48 am

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
User avatar
ignacio
Site Admin
Posts: 8693
Joined: Mon Apr 06, 2015 8:00 pm
Location: Madrid, Spain
Contact:

Re: New Bee -- Need Help

Postby ignacio » Mon May 02, 2016 12:12 pm

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]
http://www.xailer.com
hemantpandya
Posts: 11
Joined: Wed Apr 20, 2016 7:30 am

Re: New Bee -- Need Help

Postby hemantpandya » Tue May 03, 2016 6:48 am

Hi Ignacio,

Thank you very much for your help much appreciated.

Regards
Hemant
Sydney - Australia

Return to “FastReport”