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

ReportBuilder15 upgrade issue

edited December 2013 in General
Hi Guys

Using Delphi 7

We use a bunch of code in the TitleBandBeforePrint that essentially
populates address info into a memobox on the report...This has worked
for many many years, now it gives access violation and crashes the
application! Is this something to be expected? We have found that moving
the code to the BeforePrint option works ok. Example

Thanks for your insight.

procedure TPayStatement.ppTitleBand1BeforePrint(Sender: TObject);
var
Title : String;
Forename : String;
Surname : String;
AddLine : String;
Contact : String;
NamePoss : Integer;
Name : String;
SName : String;
MrMrs :String;
SecTitle : String;
SecFore : String;
SecSur : String;
begin
Contact:=LlAddress.FieldbyName('ConName').AsString;
Title:=LlAddress.FieldByName('Title').AsString;//primary
Forename:=LlAddress.FieldByName('Forename').AsString;
Surname:=LlAddress.FieldByName('Surname').AsString;
SecTitle:=LlAddress.FieldByName('SecTitle').AsString;//secondary

ppMemoAddress.Lines.Add(AddLine);
AddLine := LlAddress.FieldByName('House_Name').AsString;
If AddLine<>'' then ppMemoAddress.Lines.Add(AddLine);

AddLine := LlAddress.FieldByName('Street_Name').AsString;
If AddLine<>'' then ppMemoAddress.Lines.Add(AddLine);

AddLine := LlAddress.FieldByName('Street2').AsString;
If AddLine<>'' then ppMemoAddress.Lines.Add(AddLine);

AddLine := LlAddress.FieldByName('Town').AsString;
If AddLine<>'' then ppMemoAddress.Lines.Add(AddLine);

AddLine := LlAddress.FieldByName('County').AsString;
If AddLine<>'' then ppMemoAddress.Lines.Add(AddLine);

AddLine := LlAddress.FieldByName('PostCode').AsString;
If AddLine<>'' then ppMemoAddress.Lines.Add(AddLine);

AddLine := LlAddress.FieldByName('Country').AsString;
If AddLine<>'' then ppMemoAddress.Lines.Add(AddLine);
end;//if

Comments

  • edited December 2013
    Hi Glenn,

    In my quick testing I was able to update a memo with static text and
    text from a pipeline using the TitleBand.BeforePrint event.

    Perhaps more information about your application will help. Which
    version are you upgrading from? What is the LlAddress object?

    If possible, please create a simple example that demonstrates this issue
    and send it to support@digital-metaphors.com in .zip format so we can
    track down any issues.

    Best Regards,

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