Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Unknown identifier

edited August 2007 in General
Hi,
I got a simple report with a header, detail and summary band.
I've declared some variables in the "Declarations" section:

var
StartZeit: TDateTime;
EndeZeit: TDateTime;
GotStart: Boolean;

In the DetailBeforePrint events I do some stuff with this variables:

procedure DetailBeforePrint;
var
Print: Boolean;
begin
Print := False;
if (MWISTVALUES['LEISTUNG'] >= PCONF['WERT']) then
begin
if not GotStart then
begin
StartZeit := MWISTVALUES['ZEIT'];
GotStart := True;
end;
EndeZeit := MWISTVALUES['ZEIT'];
end else
begin
if GotStart then
begin
GotStart := False;
Print := True;
end;
end;
varStart.Value := StartZeit;
varEnde.Value := EndeZeit;
Detail.Visible := Print;
end;

Always if I'm try to preview the report I got the error message "Unknown
identifier: GotStart"
What am I doing wrong?
I'm using Delphi 5 with ReportBuilder 7.04.

Bye
Sven

Comments

  • edited August 2007
    > procedure DetailBeforePrint;

    I would try a diffeent variable name then 'Print'--that could easily be a
    method as well.

    Edward Dressel
    DX Squad
  • edited August 2007
    The variable name is not the problem; I' ve changed it. Still the same
    result.

  • edited August 2007
    Hi Sven,

    Are you able to recreate this with a simple example? I tried executing
    something very similar to your posted RAP code using the DBDEMOS database
    and it functioned correctly. Please send a small example demonstrating the
    behavior that I can run on my machine to support@digital-metaphors.com in
    .zip format and I'll take a look at it for you.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.