Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

report with two detail bands don't show all records

Status
Not open for further replies.

Nifrabar

Programmer
Mar 16, 2003
1,343
NL
Hi to all!

VFP9 - Windows XP

I created a report in which I have a 'master' view (v_toezeg_antwform) for skipping through all nAntwForm.
There are two 'child' views, each are having several records with same field nAntwForm which should follow 'v_toezeg_antwform' which I like to show up in detailband 1 and 2.

I borrowed some code from "what's new in 9" page 112.
It says that you may index a view in code and than establish a relationship.

According that:
Here is my code in the opentables method of the dataenvironment.

Code:
LOCAL lnSelect
DODEFAULT()
SELECT  v_toezeg_antwform 

IF EMPTY(CDX(1,'v_print_fin1_child_betaal'))
	lnSelect = SELECT()
	SELECT v_print_fin1_child_betaal
	INDEX on nAntwForm TAG nAntwForm
	SELECT v_toezeg_antwform
	SET RELATION TO nAntwForm INTO v_print_fin1_child_betaal additive
	SELECT (lnSelect)
ENDIF 

IF EMPTY(CDX(1,'v_print_fin1_child_toezeg'))
	lnSelect = SELECT()
	SELECT v_print_fin1_child_toezeg
	INDEX on nAntwForm TAG nAntwForm
	SELECT v_toezeg_antwform
	SET RELATION TO nAntwForm INTO v_print_fin1_child_toezeg additive
	SELECT (lnSelect)
ENDIF 

NODEFAULT
here is part of code from view-manager for child-view ; other child-view is similar
Code:
SELECT Tbetaling.nantwform,;
  PADR(combineer(Tgraven.cvak,Tgraven.crij,Tgraven.cnummer,ALLTRIM(STR(Tgraven.nlaag))),10) AS bet_graf,;
  PADR(combineer(Tcontactpers.canaam,", ",Tcontactpers.caanhef,Tcontactpers.cvnaam,Tcontactpers.ctnaam),35) AS bet_contfullname,;
  PADR(combineer(Tcontactpers.cstraat,Tcontactpers.chuisnum,Tcontactpers.chuislet,Tcontactpers.chuistoe),35) AS bet_fullcontadres,;
  Tcontactpers.cpcd AS bet_pcd, Tcontactpers.cplaats AS bet_plaats,;
  Tbetaling.dvaldat AS bet_datum, Tbetaling.nmutbedrag AS bet_bedrag,;
  Tbetaling.nstartyear AS bet_startjaar,;
  Tbetaling.naantyear AS bet_aantjaar, Tbank.banknaam AS bet_banknaam,;
  Tbetaling.nafschrift AS bet_afschrift,;
  Tbetaling.crekening AS bet_rekening,;
  Tbetaling.copmerking AS bet_opmerking,;
  Tbetaling.cbetaler AS bet_afwijkende_betaler, Tbetaling.nbet_id;
 FROM ;
     db_kerkhof!tbetaling ;
    LEFT OUTER JOIN db_kerkhof!tgraven ;
   ON  Tbetaling.ngraf_id = Tgraven.ngraf_id ;
    LEFT OUTER JOIN db_kerkhof!tcontactpers ;
   ON  Tbetaling.ncont_id = Tcontactpers.ncont_id ;
    LEFT OUTER JOIN db_kerkhof!tbank ;
   ON  Tbetaling.nbank = Tbank.bank_id
Fields of v_print_fin1_child_betaal are in detailband 2
Fields of v_print_fin1_child_toezeg are in detailband 1

The report is grouped on nAntwForm.
I only get in the report one record in detailband 1 and one record in detailband 2.
For shure there are more to show.

Any suggestion how this to get this to work?

TIA
-Bart
 
He,
I think I got it!!
just before the 'nodefault'command I put
Code:
SET SKIP TO v_print_fin1_child_toezeg , v_print_fin1_child_betaal

that seems to work.
But if it's a real solution....
-Bart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top