Just nu i M3-nätverket
Jump to content

PrintDialog


Unknown error

Recommended Posts

Unknown error

Hej alla...

Jag har problem med ett Error (Undeclared identifier: 'Print')

Vad har jag glömt? Bifogar koden, kolla nästan längst ner märkt med *****

 

 

interface

 

uses

SysUtils, Windows, Messages, Classes, Graphics, Controls,

StdCtrls, Forms, DBCtrls, DB, DBGrids, DBTables, Grids, ExtCtrls, Menus,

jpeg, Dialogs;

 

type

TForm2 = class(TForm)

Table1NUMMER: TStringField;

Table1BACK1: TStringField;

Table1S1: TStringField;

Table1DIAM: TStringField;

Table1DJUPINV: TStringField;

Table1BACK2: TStringField;

Table1S2: TStringField;

Table1DIAMUTV: TStringField;

Table1DJUPUTV: TStringField;

DBGrid1: TDBGrid;

DBNavigator: TDBNavigator;

Panel1: TPanel;

DataSource1: TDataSource;

Panel2: TPanel;

Table1: TTable;

MainMenu1: TMainMenu;

Arkiv1: TMenuItem;

Avsluta1: TMenuItem;

Om1: TMenuItem;

OmSNM1: TMenuItem;

Image1: TImage;

Print1: TMenuItem;

Printersetup1: TMenuItem;

PrinterSetupDialog1: TPrinterSetupDialog;

PrintDialog1: TPrintDialog;

procedure FormCreate(Sender: TObject);

procedure ExitMenuItemClick(Sender: TObject);

procedure AboutMenuItemClick(Sender: TObject);

procedure Print1Click(Sender: TObject);

procedure Printersetup1Click(Sender: TObject);

private

{ private declarations }

public

{ public declarations }

end;

 

var

Form2: TForm2;

 

implementation

 

uses Unit3;

 

{$R *.DFM}

 

procedure TForm2.FormCreate(Sender: TObject);

begin

Table1.Open;

end;

 

procedure TForm2.ExitMenuItemClick(Sender: TObject);

begin

close;

end;

 

procedure TForm2.AboutMenuItemClick(Sender: TObject);

begin

AboutBox.ShowModal

end;

 

procedure TForm2.Print1Click(Sender: TObject);

begin

if PrintDialog1.Execute then

DBGrid1.Print; *****HÄR FÅR JAG ERROR!!!!!!

end;

 

procedure TForm2.Printersetup1Click(Sender: TObject);

begin

PrinterSetupDialog1.Execute;

end;

 

end.

Link to comment
Share on other sites

Unknown error

Tack för ditt svar.

Finns det något annat sätt för att skriva ut info från en TDBGrid?

/Pedda

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...