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

AV read address zero

edited February 2012 in End User
Have a form with designer and report on it and the report is bond to the
designer.

the designer is shown using
procedure TvwReportEditor.FormCreate(Sender: TObject);
var
lSubMenu: TppTBCustomItem;
lDataFileMenu: TdaDataFileMenu;

lLayoutManager: TppDesignLayoutManager;
lToolManager: TppDesignToolManager;
lDataTree: TppDataTreeWindow;
begin
FListedpipes := TList.Create;
ppDesigner.Notebook.SetTabVisible(0, False); // hide the data tab
lSubMenu := ppDesigner.Menu.Items[2]; // viewmenu
lSubmenu.items[5].visible := false; // hide data menu

lLayoutManager := ppDesigner.Form.LayoutManager;

// get the ToolManager
lToolManager := lLayoutManager.ToolManager;

// use the ToolWindows[] array to access the DataTreeWindow
lDataTree :=
TppDataTreeWindow(lToolManager.ToolWindows.ItemsByName['DataTreeWindow']);

if (lDataTree <> nil) {and (lDataTree.popupmenu <> nil) }then
lDataTree.treeview.popupmenu.OnPopup := popupmenu;


ppDesigner.ShowInPanel(Self);
//ppDesigner.DataSettings.
end;

When I create a new report drop a sing pipeline field and the try to set
the page limit it go's bang. The report is set to the same pipe.

it shows the error on the last line. I have a screen dump that can be
upload some where if you like
procedure TppJvCustomInspectorItem.DrawEditor(const ACanvas: TCanvas);
const
LeftOffs = 3;
var
R: TRect;
BFlags: Integer;
W, G, I: Integer;
begin
// This reduces the flickering when dragging the divider bar
if EditCtrl <> nil then
begin
ACanvas.Lock;
try
EditCtrl.PaintTo(ACanvas.Handle, EditCtrl.Left, EditCtrl.Top);
finally
ACanvas.Unlock;
end;
end;
R := Rects[iprEditButton];
if not IsRectEmpty(R) then
begin
BFlags := 0;
if iifValueList in Flags then



--- posted by geoForum on http://www.newswhat.com

Comments

  • edited February 2012
    Hi Kevin,

    Which version of ReportBuilder and Delphi are you using? When you say
    "drop a single pipeline field" are you adding a DBText from the data
    tree, or selecting the field name of a pre-placed DBText in the
    inspector or toolbar?

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2012
    ?D2010 and rb 14.02 and 14.03 tried on both

    The Designer is display in the form as described above.
    Dragged a dbtext field from the datatree on to the detail.
    Then change the report pipe to the one that is the same as the field.
    Then move down to the object instector and scoll till page limit and click
    on the field to edit and bang.

    I have had it AV when I selected font colour to change a field colour and
    also when I click on the Footer bar to increase the detail area size.
    This is also why I went to 14.03 but have not found it to happen yet



    --- posted by geoForum on http://www.newswhat.com
  • edited February 2012
    Hi Kevin,

    Using RB 14.03 and the example in the following article, I am unable to
    recreate the issue you are seeing. Please put together a simple example
    I can run on my machine that demonstrates this problem (or alter the
    example below) and send it in .zip format to
    support@digital-metaphors.com and I'll take a look at it for you.

    http://www.digital-metaphors.com/rbWiki/End-User/Designer/How_To...Show_the_Designer_in_Panel

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2012
    I am not have the AV happen in the scaled down of our main app. But will
    keep trying.



    --- posted by geoForum on http://www.newswhat.com
  • edited February 2012
    Here goes. Create a report and have BeforeAutoSearchDialogCreate assigned.
    Now remove the BeforeAutoSearchDialogCreate and open the report, now it
    errors. Now after the errors try create a new report in the same instance
    it AV's. The AV's come from a report that errors and does not create the
    interface/gui correctly.
    If a report errors on open does not mean to says that you can not create a
    new one.



    --- posted by geoForum on http://www.newswhat.com
  • edited February 2012
    Hi Kevin,

    I'm sorry but I'm still unclear about how to recreate this issue (or how
    this issue relates to your original issue). Are you doing this at
    Delphi design-time or runtime?

    When you say "remove the BeforeAutoSearchDialogCreate" do you mean the
    event reference or the routine itself? When you say "open the report"
    do you mean print/preview the report or double click it at design-time
    to enter the designer?

    AV's at design-time can corrupt memory or completely disable the Delphi
    IDE. It is best to restart Delphi in most cases when one is encountered.

    Best Regards,

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