procedure Tfrm_start.Lade_Daten;
var x: integer;
Qry: TZQuery;
begin
x := 1;
AdvStringGrid1.RowCount := 2;
AdvStringGrid1.Clear;
AdvStringGrid1.Cells[0, 0] :='
Artikel NR';
AdvStringGrid1.Cells[1, 0] :='
Menegeneinheit';
AdvStringGrid1.Cells[2, 0] :='
Bestandsmenge';
AdvStringGrid1.Cells[3, 0] :='
Bestandswet';
AdvStringGrid1.Cells[4, 0] :='
Inventarmenge';
AdvStringGrid1.Cells[5, 0] :='
Inventarwert';
AdvStringGrid1.Cells[6, 0] :='
Div.Menge';
AdvStringGrid1.Cells[7, 0] :='
Div.Wert';
AdvStringGrid1.Cells[8, 0] :='
Artikelbezeichnung';
AdvStringGrid1.Cells[9, 0] :='
Artikelpreis';
ZQuery1.Close;
ZQuery1.Connection := DB_MASTER;
ZQuery1.SQL.Clear;
ZQuery1.SQL.Text := '
select * FROM wwsi0100,wwiv7000 where IV70ARTN=SI01ATNR and SI01DWERT > '+frm_abf.edt_money.Text;
ZQuery1.open;
while not ZQuery1.Eof
do
begin
AdvStringGrid1.AddRow;
AdvStringGrid1.Cells[0,x] := ZQuery1IV70ARTN.AsString;
AdvStringGrid1.cells[1,x] := ZQuery1IV70BME.AsString;
AdvStringGrid1.cells[2,x] := ZQuery1SI01BMENG.AsString;
AdvStringGrid1.cells[3,x] := ZQuery1SI01BWERT.AsString;
AdvStringGrid1.cells[4,x] := ZQuery1SI01IMENG.AsString;
AdvStringGrid1.cells[5,x] := ZQuery1SI01IWERT.AsString;
AdvStringGrid1.cells[6,x] := ZQuery1SI01DMENG.AsString;
AdvStringGrid1.cells[7,x] := ZQuery1SI01DWERT.AsString;
AdvStringGrid1.cells[8,x] := ZQuery1IV70ABEZ.AsString;
AdvStringGrid1.cells[9,x] := ZQuery1IV70PREIS.AsString;
ZQuery1.Next;
Inc(x);
end;
// der Fehler tritt ab hier irgendwo auf
AdvStringGrid1.RowCount := x;
// RvProject1.Close;
RvNDRWriter1.Stream.Position := 0;
RvNDRWriter1.FileName := '
';
RvProject1.Close;
RvProject1.Engine :=
nil;
//RvProject1.ProjectFile := db_database.Lade_Report(G_ART);
RvProject1.Engine := RvNDRWriter1;
// RvProject1.SetParam('UZ', db_database.get_kuerzel);
RvProject1.Open;
try
RvProject1.Execute;
RvProject1.Engine :=
nil;
RvRe_Preview.Render(RvNDRWriter1.Stream);
except
on E:
Exception do begin
end;
end;
end;