Bonsoir à tout, mon problème est le suivant :
J’ai créer une application Delphi qui fait appel à des états créer avec cystal report en utilisant le VCL Delphi /crystal Report Version 10 (Crpe) qui revoie pour chaque état le paramètre qui lui correspondant. Le code Delphi et le suivant :
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
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32 UpdateReopenList; LoadReport; for i:=0 to Crpe1.ParamFields.count-1 do begin // qrparametre[i] est un table qui contient les valeurs des paramétres Crpe1.ParamFields.Items[i].currentvalue:=qrparametre[i]; end; if Crpe1.ReportWindowHandle > 0 then begin Crpe1.Refresh; Exit; end; if Crpe1.Output = toWindow then begin Crpe1.WindowStyle.BorderStyle := bsSizeable; Crpe1.WindowStyle.SystemMenu := True; end; {Run the Report} if Crpe1.Execute then begin {WindowEvents} if Crpe1.WindowEvents = True then begin if not bWindowEventsDlg then CrpeWindowEventsDlg := TCrpeWindowEventsDlg.Create(Application); CrpeWindowEventsDlg.Show; end; end;
Ce code fonctionne correctement mais lorsque j’ai créé un état avec un sous état et il y a un lien entre l’état principal et le sous état voir image :
La formule de lien dans le sous état : {FACTURECLIENTDETAILRECAPTVA.NFACTURECLIENT} = {?Pm-?NFACTURE}
L’exécution de l’etat dans crystal report fonctionne correctement mais lorsque j’exécute mon état de l’application delphi il m’affiche le message suivant :
Et lorsque je tape le N° de la facture par Exemple « F46/2010 » il m’affiche le message d’erreur suivant :
Error :515 Error in File C :\Batima \ETAT \Etatfacturedetailfrt22.rpt :
Error in formula < Record Selection > .
'{FACTURECLIENTDETAILRECAPTVA.NFACTURECLIENT} = {? Pm -? NFACTURE}'
This field name is not known .
Details : errorKind
Execute < PEStartPrintJob > .
Et le message
Partager