Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   Delphi StringGrid / Delphi 2010 (https://www.delphipraxis.net/160224-stringgrid-delphi-2010-a.html)

Alterauge 3. Mai 2011 12:07

StringGrid / Delphi 2010
 
Hallo habe zwei Fragen !

Delphi-Quellcode:
procedure TFormReporting.AddRIC(ric: string; func:string; text: string );
var i,j : integer;
    d,st2,mk : boolean;
    t,c,k : string;
    sl : TStringList;
begin
 d := true;
 mk := false;
 t := '';
 c := 'clBlack';
 k := '';
 with FormSettings.Settings do
    for i := 1 to RowCount-1 do
      begin
        if (Rows[i][1]=ric) and (Rows[i][2]='0') then text := 'IDEA * Verschlüsselt **';
        if (Rows[i][1]=ric) and (Rows[i][2]='1') then d := false;
        if (Rows[i][1]=ric) and (Rows[i][2]='2') then
          begin
            // Zeile in einer Exceltabelle speichern oder Log.txt
          end;
        if (Rows[i][1]=ric) and (Rows[i][2]='3') then
          begin
            // Zeile Ausdrucken (die aktuelle Zeile auf Nadeldrucker ausdrucken)
          end;
        if (Rows[i][1]=ric) and (Rows[i][5]='1') then c := 'clBlack';
        if (Rows[i][1]=ric) and (Rows[i][5]='2') then c := 'clRed';
        if (Rows[i][1]=ric) and (Rows[i][5]='3') then c := 'clGreen';
        if (Rows[i][1]=ric) and (Rows[i][5]='4') then c := 'clBlue';
        if (Rows[i][1]=ric) and (Rows[i][5]='5') then c := 'clPurple';
        if (Rows[i][1]=ric) and (Rows[i][5]='6') then c := 'clOlive';
        if (Rows[i][1]=ric) and (Rows[i][5]='7') then c := 'clFuchsia';
        if (Rows[i][1]=ric) and (Rows[i][5]='8') then c := 'clTeal ';
        if (Rows[i][1]=ric) and (Rows[i][5]='9') then c := 'clGray';
        if (Rows[i][1]=ric) and (Rows[i][3]='Warn') then
          begin
             sndPlaySound('C:\Windows\Media\edp1.wav',
            SND_NODEFAULT Or SND_ASYNC Or SND_LOOP);
            FormMain.AdvGlowButton8.Appearance.BorderColor:=clred;
            FormMain.AdvGlowButton8.Appearance.ColorTo:=clwhite;
            FormMain.AdvGlowButton8.Appearance.ColorMirrorTo:=clwhite;
            FormMain.AdvGlowButton8.Appearance.ColorMirror:=clwhite;
            FormMain.AdvGlowButton8.Appearance.Color:=clwhite;
             FormMain.AdvGlowButton8.Font.Color:=clred;
          end;
         if (Rows[i][1]=ric) and (Rows[i][3]='Warn') then k := '<p align="center"><img src="idx:0"></p>';
         if (Rows[i][1]=ric) and (Rows[i][3]='Info') then k := '<p align="center"><img src="idx:1"></p>';
         if (Rows[i][1]=ric) and (Rows[i][3]='Key') then k := '<p align="center"><img src="idx:2"></p>';
         if (Rows[i][1]=ric) and (Rows[i][3]='Feu') then k := '<p align="center"><img src="idx:3"></p>';
         if (Rows[i][1]=ric) and (Rows[i][3]='OE') then k := '<p align="center"><img src="idx:4"></p>';
         if (Rows[i][1]=ric) and (Rows[i][3]='SQL1') then k := '<p align="center"><img src="idx:5"></p>';
         if (Rows[i][1]=ric) and (Rows[i][3]='SQL2') then k := '<p align="center"><img src="idx:6"></p>';
         if (Rows[i][1]=ric) and (Rows[i][3]='DME') then k := '<p align="center"><img src="idx:7"></p>';

         if (Rows[i][1]=ric) then t := Rows[i][4];
      end;

Frage 1 : Zeile in einer Exceltabelle speichern oder Log.txt

Frage 2 : Zeile Ausdrucken (die aktuelle Zeile auf Nadeldrucker ausdrucken)

Bitte wenn Möglich, die Antworten mit Quelltext Anzeigen!

Danke

Deep-Sea 3. Mai 2011 12:29

AW: StringGrid / Delphi 2010
 
Ich sehe da keine Fragen, sondern nur zwei Aussagen. Was geht denn z.B. mit dem ausdrucken nicht? :roll:

DeddyH 3. Mai 2011 12:30

AW: StringGrid / Delphi 2010
 
Ich sehe da noch zig identische Vergleiche
Zitat:

Delphi-Quellcode:
if (Rows[i][1]=ric)


Alterauge 3. Mai 2011 12:42

AW: StringGrid / Delphi 2010
 
Delphi-Quellcode:
begin
        if (Rows[i][1]=ric) and (Rows[i][2]='0') then text := 'IDEA * Verschlüsselt **';
        if (Rows[i][1]=ric) and (Rows[i][2]='1') then d := false;
        if (Rows[i][1]=ric) and (Rows[i][2]='2') then
          begin
            // Zeile in einer Exceltabelle speichern oder Log.txt
          end;
        if (Rows[i][1]=ric) and (Rows[i][2]='3') then
          begin
            // Zeile Ausdrucken (die aktuelle Zeile auf Nadeldrucker ausdrucken)
          end;
1. wie muß der quelltext aussehen, das die zeile im Stringrid in einer txt datei oder exceltabelle gespeichert wird.
siehe // Zeile in einer Excel..........


2. wie muß der quelltext aussehen, das die zeile aus dem stringgrid gedruckt wird
siehe // Zeile Ausdrucken ........................

Deep-Sea 3. Mai 2011 12:45

AW: StringGrid / Delphi 2010
 
Sollen wir auch noch gleiche 'ne Dissertation für dich schreiben?! :shock:

Bummi 3. Mai 2011 12:46

AW: StringGrid / Delphi 2010
 
mit oder ohne Rechnung ....:mrgreen:

DeddyH 3. Mai 2011 12:46

AW: StringGrid / Delphi 2010
 
1) Am Einfachsten über eine TStringlist mit SaveToFile. Da ich nicht davon ausgehe, dass jede Zelle in einer eigenen Datei gespeichert werden soll, kannst Du so schön erst einmal alle betroffenen in der Liste sammeln und dann in einem Rutsch speichern.

2) TPrinter (BeginDoc, Canvas.TextOut, EndDoc)


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:08 Uhr.

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