Products

Home Forums eaDocX queries NullReferenceException when running search report

Home Forums eaDocX queries NullReferenceException when running search report

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #8050
    Geert Bellekens
    Participant

    I’m trying to create a document based on a custom EA search, but I keep getting nullpointer exceptions.
    I’ve tried this before from a model view, and now with an element report, but the moment I run the report I get the NullReferenceException.

    The query I use is this one and it works fine in EA and in the model view I created for it.

    [code]select o.ea_guid AS CLASSGUID, o.Object_Type AS CLASSTYPE, o.name AS Name
    ,package.name AS PackageName ,package_p1.name AS Package_level1,package_p2.name AS Package_level2 ,package_p3.name AS Package_level3
    from ((((((t_object o
    inner join t_package package on o.package_id = package.package_id)
    inner join t_objectproperties op on o.Object_ID = op.Object_ID)
    inner join t_object cr on cr.ea_guid = op.value)
    left join t_package package_p1 on package_p1.package_id = package.parent_id)
    left join t_package package_p2 on package_p2.package_id = package_p1.parent_id)
    left join t_package package_p3 on package_p3.package_id = package_p2.parent_id)
    where
    op.Property = ‘CR’
    and cr.Name like ‘#WC##WC#’
    union
    select a.ea_guid AS CLASSGUID, ‘Attribute’ AS CLASSTYPE, o.name +’.’+ a.Name AS Name
    ,package.name AS PackageName ,package_p1.name AS Package_level1,package_p2.name AS Package_level2 ,package_p3.name AS Package_level3
    from (((((((t_attribute a
    inner join t_attributetag atv on a.ID = atv.ElementID)
    inner join t_object cr on cr.ea_guid = atv.value)
    inner join t_object o on a.Object_ID = o.Object_ID)
    inner join t_package package on o.package_id = package.package_id)
    left join t_package package_p1 on package_p1.package_id = package.parent_id)
    left join t_package package_p2 on package_p2.package_id = package_p1.parent_id)
    left join t_package package_p3 on package_p3.package_id = package_p2.parent_id)
    where atv.Property = ‘CR’
    and cr.Name like ‘#WC#
    #WC#'[/code]

    Here’s the stacktrace:

    System.NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.
    bij eaDocXAddIn.elementReportNode.mnuRunReport_Click(Object sender, EventArgs e)
    bij System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
    bij System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
    bij System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
    bij System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
    bij System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
    bij System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
    bij System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
    bij System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
    bij System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    bij System.Windows.Forms.Control.WndProc(Message& m)
    bij System.Windows.Forms.ScrollableControl.WndProc(Message& m)
    bij System.Windows.Forms.ToolStrip.WndProc(Message& m)
    bij System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
    bij System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    bij System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    bij System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.

Compare licence prices

Choose the licence that’s right for you and your team

Prices

Download a free trial

Download eaTeamWorks today for several free for life features, plus no obligation, 30-day trials of all the products: eaDocX, ea Revision Manager, eaSheets, Model Expert and PortfolioManager. Discover for yourself why we sell the world’s best-selling Enterprise Architect extension.

Download