Einzelnen Beitrag anzeigen

Kostas

Registriert seit: 14. Mai 2003
Ort: Gerstrhofen
1.062 Beiträge
 
Delphi 10 Seattle Enterprise
 
#16

Re: Fastreport 4 Beispiel für eine Rechnung das Prinzip n. v

  Alt 18. Jun 2008, 17:31
Hallo Union,

ich fürchte doch. Ich habe ein mini TestProgramm erstellt in Anhang.
Wenn Du es testen möchtest, musst Du nur den Path auf die Demo DB der Main-Demo
von Fastreport umstellen.

Beim ersten Button mache ich das:

Delphi-Quellcode:
if not ADOTable1.Active then ADOTable1.open;
ADOTable1.first;
frxReport1.ShowReport;
Der Report zeigt das richtige Ergebnis.
Danach das:

Delphi-Quellcode:
  if not ADOTable1.Active then ADOTable1.open;
  ADOTable1.first;
  frxReport1.PrepareReport;
  frxReport1.ShowReport;
Der Report ist falsch.


Gerade habe ich in der Docu gelesen das PrepareReport den Report komplett erzeugt. Das ist dan auch die Erklerung.

procedure ShowReport(ClearLastReport: Boolean = True);
Starts a report and displays the result in the preview window. If the “ClearLastReport”
parameter is equal to “False,” then the report will be added to the previously constructed
one, otherwise the previously constructed report will be cleared (by default).

function PrepareReport(ClearLastReport: Boolean = True): Boolean;
Starts a report, without opening the preview window. The parameter assignment is the
same as in the “ShowReport” method. If a report was constructed successfully, it returns
“True.”
Miniaturansicht angehängter Grafiken
falsch_125.jpg   richtig_189.jpg  
Angehängte Dateien
Dateityp: zip testprepare_464.zip (4,4 KB, 27x aufgerufen)
  Mit Zitat antworten Zitat