Autor Beitrag
Leathl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: So 10.10.04 22:17 
---


Zuletzt bearbeitet von Leathl am Sa 15.08.09 16:09, insgesamt 1-mal bearbeitet
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 11.10.04 01:14 
Es gibt da mehrer Möglichkeiten. Ebntweder direkt auf den Canvas des Druckers. Da musst du aber viel von Hand machen, bist aber auch entsprechend flexibel. Stichworte wären: BeginDoc, EndDoc usw.

Oder du nimmst eine Reportkomponente. Was aber auch nicht immer ganz einfach ist, da es nur wenige gute gibt. Und die kosten eventuell was.
killavirus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 49

Win 2000
D5 Prof, D7 Prof
BeitragVerfasst: Mo 11.10.04 10:03 
Du kannst aber dir per OLE Word öffnen und dort ne Tabelle erstellen und dort dann die Daten eintragen und Sie dann Drucken ...

Hier mal die Source vielleicht hilft es dir ...

ausblenden volle Höhe Delphi-Quelltext
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:
33:
34:
35:
var NewDoc : OLEVariant;
    V, WordTable: Variant;

  try
     V := GetActiveOLEObject('Word.Application');
     V.WordBasic.AppShow;
  except
        try
           V:=CreateOleObject('Word.Application');
           V.WordBasic.AppShow;
        except
              ShowMessage('Fehler! Word ist weder geöffnet noch konnte es gestartet werden!');
              VarClear(V);
              exit;
        end;

  end;

  // Word anzeigen 
  V.Visible := True;

  // Neues Dok einfügen
  NewDoc := V.Documents.Add;

  // Tabelle einfügen
  WordTable := NewDoc.Tables.Add(V.Selection.Range, StringGrid.RowCount, StringGrid.ColCount);

  // Tabelle ausfüllen mit Stringgrid Daten
  for GridRows := 1 to StringGrid.RowCount do begin
    for GridCols := 1 to StringGrid.ColCount do begin

      WordTable.Cell(GridRows, GridCols).Range.Text := StringGrid.Cells[GridCols - 1, GridRows - 1];

    end;
  end;
killavirus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 49

Win 2000
D5 Prof, D7 Prof
BeitragVerfasst: Mo 11.10.04 10:03 
Titel: Word Tabellen erstellen
Du kannst aber dir per OLE Word öffnen und dort ne Tabelle erstellen und dort dann die Daten eintragen und Sie dann Drucken ...

Hier mal die Source vielleicht hilft es dir ...

ausblenden volle Höhe Delphi-Quelltext
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:
33:
34:
35:
var NewDoc : OLEVariant;
    V, WordTable: Variant;

  try
     V := GetActiveOLEObject('Word.Application');
     V.WordBasic.AppShow;
  except
        try
           V:=CreateOleObject('Word.Application');
           V.WordBasic.AppShow;
        except
              ShowMessage('Fehler! Word ist weder geöffnet noch konnte es gestartet werden!');
              VarClear(V);
              exit;
        end;

  end;

  // Word anzeigen 
  V.Visible := True;

  // Neues Dok einfügen
  NewDoc := V.Documents.Add;

  // Tabelle einfügen
  WordTable := NewDoc.Tables.Add(V.Selection.Range, StringGrid.RowCount, StringGrid.ColCount);

  // Tabelle ausfüllen mit Stringgrid Daten
  for GridRows := 1 to StringGrid.RowCount do begin
    for GridCols := 1 to StringGrid.ColCount do begin

      WordTable.Cell(GridRows, GridCols).Range.Text := StringGrid.Cells[GridCols - 1, GridRows - 1];

    end;
  end;
Leathl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Di 12.10.04 21:07 
---


Zuletzt bearbeitet von Leathl am Sa 15.08.09 16:10, insgesamt 1-mal bearbeitet
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 14.10.04 13:15 
in der DP habe ich einen colden code gefunden: www.delphipraxis.net...+inhalt+drucken.html

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Leathl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Do 14.10.04 20:09 
---


Zuletzt bearbeitet von Leathl am Sa 15.08.09 16:11, insgesamt 1-mal bearbeitet
Leathl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Mo 01.11.04 18:21 
---


Zuletzt bearbeitet von Leathl am Sa 15.08.09 16:11, insgesamt 1-mal bearbeitet
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mo 01.11.04 19:22 
Oha. Wie kommt es eigentlich dass das mit dem Drucken so extrem unglaublich kompliziert ist??? Ob wohl mal jemand eine Unit schreiben kann, mit der man einfach...
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
var Drucker: TTollerEinfacherDrucker;
begin
drucker.Create;
drucker.lines:=memo1.Lines;
drucker.LineSize:='10';
{undsoweiter}
drucker.print;
drucker.free;


Ich glaube, damit könnte man Millionen machen -.-

Sorry, ich für meinen Teil bin einfach nur zu BLÖD um das hinzubekommen. Aber ich versuche mich mal einzuarbeiten... Dazu muss ich aber erstmal checken, wie man public deklarationen macht, wie man ein objekt wie TTollerEinfacherDrucker erstellt... undsoweiter...

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
Soulama
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Do 04.11.04 17:22 
Probier aus mit QuickReport,
OnNeedData Event ist die lösung