Je voudrais executer ma requette et afficher le rapport (FastReport)correspondant, mais ça ne marche pas, mon etat n'execute pas la requete générée dynamiquement, mais plutot celle avec laquelle j'ai créé l'etat.
Je comprends pas pourquoi
Voici le code:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
with qStat do
        begin
          Close;
          SQL.Clear;
          SQL.ADD('SELECT t_abs.nomcomplet, 
          t_seance.cours,COUNT(t_seance.cours) AS Total');
          SQL.Add(' FROM t_seance');
          SQL.Add(' INNER JOIN t_abs ON (t_seance.id = t_abs.idseance)');
          SQL.Add(' WHERE t_abs.nomcomplet = :p');
          SQL.Add(' GROUP BY t_abs.nomcomplet,t_seance.cours');
          ParamByName('p').AsString:=eNom.Text;
          Open;
       end;
      EtatStat.LoadFromFile(ExtractFilePath(Application.ExeName)+'\fr\StatEtud.fr3');
      if EtatStat.PrepareReport then EtatStat.ShowPreparedReport;