Einzelnen Beitrag anzeigen

Benutzerbild von erich.wanker
erich.wanker

Registriert seit: 31. Jan 2008
Ort: im schönen Salzburger Land
454 Beiträge
 
Delphi XE4 Professional
 
#1

Reportbuilder druckt nach Seitenwechsel manche Datensätze noch mal...

  Alt 10. Dez 2018, 17:07
[Reportbuilder Professional Edition Version 16.02 Build 144 /Delphi XE4 / Win10 / Firebird SQL Server 2.5]

Hallo Leute,
hab ein riesen Problem mit einem Report.
Nach einem Seitenwechsel werden manche Datensätze noch mal gedruckt ...

Hat irgendwer ein ähnliches Verhalten und eine Lösung?
Vielen Dank
Erich



Drucken will ich:
************************************************** *****************
customer 1
____________contract A
_______________Produkt 1 from Contract A of customer 1
_______________Produkt 2 from Contract A of customer 1
____________contract B
_______________Produkt 1 from Contract B of customer 1
_______________Produkt 2 from Contract B of customer 1
customer 2
____________contract A
_______________Produkt 1 from Contract A of customer 2
_______________Produkt 2 from Contract A of customer 2

************************************************** *****************

Customer ist ein subreport im Hauptreport
contract ist ein subreport in customer
produkt ist ein subreport in contract


Ich hab als Datenquelle:

ZQuery_Customer <-> DataSource_Customer <-> ppBDEPipeline_Customer
ZQuery_Contracts <-> DataSource_Contracts <-> ppBDEPipeline_ Contracts
ZQuery_Products <-> DataSource_Products <-> ppBDEPipeline_ Products

Alle Pipelines haben (move 1 Range begin first / range end last)

Gefiltert wird das ganze per:
(Pseudocode!)


Delphi-Quellcode:
procedure DataSource_Customer onDataChange(Sender: TObject; Field: TField);
Begin
    Select * from ZQuery_Contracts where contracts.customer_nr = customer_id von tabelle customer …

Delphi-Quellcode:
procedure DataSource_Contracts onDataChange(Sender: TObject; Field: TField);
Begin
    Select * from ZQuery_Products where product.contract_nr ist die id der tabelle contract…


WENN ICH NICHT DRUCKE - SONDERN:

3 DBGrids auf die 3 Querys anhänge und rumklicke funktioniert alles EINWANDFREI und richtig

Komisch ist:
wenn aber der report generiert wird kommen nach einem seitenwechsel manche datensätze doppelt oder sogar mehrfach

Ich hab mir ein Logfile erstellt und bin draufgekommen das die "Contract OnDataChange " oft ausgeführt wird, obwohl die "Customer" sich gar nicht verändert hat ...
Erich Wanker - for life:=1971 to lebensende do begin ..
O
/H\
/ \

Geändert von erich.wanker (11. Dez 2018 um 09:28 Uhr)
  Mit Zitat antworten Zitat