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

Error when try to modify SkipRelativeTo

edited August 2007 in RAP
Hello, I have some regions in my report, and I try to change SkipRelativeTo
in BeforeGenerate, but I get error, here is my code, something is wrong? How
I fix these?

Regards,
Fellipe H.

RegLinfT.Visible := (PipeTIPAGEM['CD2_T_P'] <> 0);
RegLinfB.Visible := (PipeTIPAGEM['CD19_B_P'] <> 0);


RegLinfCD3.Visible := (PipeTIPAGEM['CD3_P'] <> 0);
RegLinfCD4.Visible := (PipeTIPAGEM['CD4_P'] <> 0);
RegLinfCD8.Visible := (PipeTIPAGEM['CD8_P'] <> 0);
RegLinfRelacao.Visible := (PipeTIPAGEM['CD4_CD8'] <> 0);

if RegLinfCD3.Visible or RegLinfCD4.Visible or RegLinfCD8.Visible or
RegLinfRelacao.Visible then
begin
Region4.Visible := True;

if RegLinfRelacao.Visible then
Region4.ShiftRelativeTo := RegLinfRelacao; <<<< ERROR HERE


if RegLinfCD8.Visible then
Region4.ShiftRelativeTo := RegLinfCD8;

if RegLinfCD4.Visible then
Region4.ShiftRelativeTo := RegLinfCD4;

if RegLinfCD3.Visible then
Region4.ShiftRelativeTo := RegLinfCD3;
end
else
Region4.Visible := False;

Comments

  • edited August 2007
    Hi Fillipe,

    What error do you recieve? Is this an error when you try to compile your
    RAP code or an error when you try to generate the report? Have you tried to
    get this working in Delphi code?

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2007
    The error is: Could not compile program in BeforeGenerate.

    I cant put these code into Delphi code, because I'm load the report from a
    file..

    Thanks for all,
    Fellipe H.
  • edited August 2007
    Hi Fillipe,

    How are you sure this is the line giving the error? If you remove this line
    from the RAP code, does everything work correctly?

    What I mean by trying it in Delphi is creating a test application with a
    similar report, then instead of using RAP, try performing the same task in
    Delphi. This will help you track down the problem because you will be able
    to trace your event code.

    --
    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.