Bonsoir à tous
Je voudrais imprimer une liste à partir d'RichEdit, pour cela pas de problèmes.
Voici mon code
Cela fonctionne très bien
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 procedure TForm8.ImpListeClick(Sender: TObject); Var Rich1: TfrxRichView; begin // alors sauver le richedit dans le fichier RichEdit1.lines.SaveToFile(tpath.Combine(chEXE, 'listeClients.RTF')); // si tout OK if FileExists(tpath.Combine(chEXE, 'listeClients.RTF')) then begin Rich1 := frxReportClient.FindObject('Rich1') as TfrxRichView; Rich1.RichEdit.lines.LoadFromFile(tpath.Combine(ExtractFilePath(application.ExeName), 'listeClients.RTF')); end else Exit; // lancer la prévisualisation frxReportClient.PrepareReport(); frxReportClient.ShowPreparedReport; end;
Je voudrai limiter l'impression à 50 lignes du RichEdit et changer de page de façon à ne pas couper
un groupe de renseignements qui à toujours le même nombre d'info.
J'ai essayé avec un script , en comptant le nb de lignes, mais je pense que, comme je charge le fichier dans lequel j'ai sauvé mon RichEdit cela ne peut pas marcher !!
Avez vous une idée ?
Par avance Merci
Partager