Delphi-PRAXiS
Seite 1 von 4  1 23     Letzte »    

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Datenbanken (https://www.delphipraxis.net/15-datenbanken/)
-   -   Wie drucken Sie Name und Note in FASTREPORT? (https://www.delphipraxis.net/205460-wie-drucken-sie-name-und-note-fastreport.html)

Alg2009 12. Sep 2020 02:25

Datenbank: FireBird • Version: 3 • Zugriff über: FireDac

Wie drucken Sie Name und Note in FASTREPORT?
 
Hallo,
Wie wird der Name und die Lektion sowie die Note gedruckt, da immer die erste Note für alle Schüler in FASTREPORT gedruckt wird?

BaseDonee.rar

haentschman 12. Sep 2020 06:50

AW: Wie drucken Sie Name und Note in FASTREPORT?
 
Liste der Anhänge anzeigen (Anzahl: 1)
Hi...:P
Your translator for german is not good...:zwinker:

I cant understand what you want. :? Paint a picture of your problem and sending this as attachment. We must know, witch data schould printed where...:thumb:

:dp: welcome here...

Alg2009 12. Sep 2020 09:53

AW: Wie drucken Sie Name und Note in FASTREPORT?
 
Liste der Anhänge anzeigen (Anzahl: 1)
:oops:
Hello haentschman
Entschuldigung für mein schlechtes Deutsch. :oops:

What i want to do is how display in FastReport the students(Nom, lesson(NomLecon) name and Grades(Not
My Problem is why when execute the program appear only the first Grade for all students
And I want to show every pupil with his own mark.
The relation between Tables(Etudiant,Lecon) is N,N

blawen 12. Sep 2020 10:00

AW: Wie drucken Sie Name und Note in FASTREPORT?
 
Zitat:

Zitat von haentschman (Beitrag 1473458)
Hi...:P
Your translator for german is not good...:zwinker:

I cant understand what you want. :? Paint a picture of your problem and sending this as attachment. We must know, witch data schould printed where...:thumb:

:dp: welcome here...

Isn't the question simply about how all records are printed?
Gehts in der Frage nicht einfach darum, wie sämtliche Datensätze gedruckt werden?

Wenn ich es richtig interpretiere, werden in der Procedure TForm4.Button4Click die Daten aufbereitet.
Im Report werden aber die Daten von drei verschiedenen Querrys abgerufen, was so nicht funktionieren kann.

Alg2009 12. Sep 2020 13:22

AW: Wie drucken Sie Name und Note in FASTREPORT?
 
Liste der Anhänge anzeigen (Anzahl: 1)
[QUOTE=blawen;1473460]
Zitat:

Zitat von haentschman (Beitrag 1473458)

Wenn ich es richtig interpretiere, werden in der Procedure TForm4.Button4Click die Daten aufbereitet.
Im Report werden aber die Daten von drei verschiedenen Querrys abgerufen, was so nicht funktionieren kann.

Wie funktioniert es?
Schauen Sie sich das Bild an, Sie werden sehen, dass die Schüler die gleiche Note wie der erste Schüler erhalten. Jeder Schüler sollte die Note bekommen, die er bekommt

Look at the picture, you will see that the students get the same Grade as the first student. Every student should get the grade they get.

haentschman 13. Sep 2020 06:13

AW: Wie drucken Sie Name und Note in FASTREPORT?
 
Hi...:P
Delphi-Quellcode:
 SQL.Add('JOIN ETUDIANT E on EL.ID=EL.ID');
...i think this line is wrong. :gruebel: 'on EL.ID=EL.ID'...the same field in the join.
Delphi-Quellcode:
 SQL.Add('JOIN ETUDIANT E on EL.ID=E.ID');
...how about this? :wink:

notes:
* Dont use WITH. Then you have less debugging problems with missing variable values. :wink:
* why Close/Clear? If you use SQL.Text, the SQL.Clear automaticly executed. With FireDAC the Close is automaticly executed.
* U use FIREDAC with MACROS. The problem is...that, if you changing the database components, the new one not knows MACROS. And one line less...:zwinker:

imho better:
Delphi-Quellcode:
procedure TForm4.Button4Click(Sender: TObject);
begin
  dmdata.AFDQuery.SQL.Text := 'SELECT E.NOM,L.NOMLECON FROM ETUDLECON EL';
  dmdata.AFDQuery.SQL.Add('JOIN LECON L ON EL.ID=L.LECONID');
  dmdata.AFDQuery.SQL.Add('JOIN ETUDIANT E on EL.ID=EL.ID');
  dmdata.AFDQuery.SQL.Add('ORDER BY EL.ID,EL.LECONID');

  dmdata.AFDQuery.Open;

  DmData.frxReport1.ShowReport;
end;

Alg2009 13. Sep 2020 20:30

AW: Wie drucken Sie Name und Note in FASTREPORT?
 
Liste der Anhänge anzeigen (Anzahl: 1)
Thank you very much haentschman

But how can i put the result of the query in the FastReoprt when i Click on the Button ?

haentschman 14. Sep 2020 10:02

AW: Wie drucken Sie Name und Note in FASTREPORT?
 
Hi...:P

Questions:
1. why you use 3 frxDatasets? One is enough.
2. where you load this datasets?
3. where you assign the query to this datasets?

:wink:

Alg2009 14. Sep 2020 18:14

AW: Wie drucken Sie Name und Note in FASTREPORT?
 
hello,

Zitat:

Zitat von haentschman (Beitrag 1473538)
Hi...:P
1. why you use 3 frxDatasets? One is enough.

because i have two tables and query, and maybe add a calculated fields


Zitat:

2. where you load this datasets?
I load it in the FastReport

Zitat:

3. where you assign the query to this datasets?
Do you mean something like this
FrxDbdataset3.daset:= query1

generic 14. Sep 2020 20:01

AW: Wie drucken Sie Name und Note in FASTREPORT?
 
there is also an english version of Delphi-Praxis:
https://en.delphipraxis.net/


Alle Zeitangaben in WEZ +1. Es ist jetzt 05:19 Uhr.
Seite 1 von 4  1 23     Letzte »    

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz