Author Topic: SQL-based report on package info coming up empty  (Read 4194 times)

bknoth2

  • EA User
  • **
  • Posts: 129
  • Karma: +2/-0
    • View Profile
SQL-based report on package info coming up empty
« on: February 01, 2018, 05:11:48 am »
EA Version 13.5.1352

1) I use an SQL search to find a package by name. I know the search works - I can right click a returned package and the "Find in browser" feature is highlighted and works.
2) I have a document template that reports the package name and notes. I can generate that document directly from a package (by right-clicking the browser) and the contents are correct in the generated report.

When I create a "Model Document" and specify the search and name from 1) above and the template from 2) and then generate the report, the report comes up empty. The package name and notes don't appear. (If I include elements and the element names, I see a correct list of element names in the report so I know the report receives the package information but no package information appears). Any ideas?

Thanks
Bruce

Nizam

  • Prolab Moderator
  • EA User
  • *
  • Posts: 320
  • Karma: +15/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: SQL-based report on package info coming up empty
« Reply #1 on: February 01, 2018, 02:05:36 pm »
Notes for User Guide:
Diagram Searches are not supported
Custom SQL searches are supported if they are returning elements; the SQL must include ea_guid AS CLASSGUID (case sensitive) and the object type


bknoth2

  • EA User
  • **
  • Posts: 129
  • Karma: +2/-0
    • View Profile
Re: SQL-based report on package info coming up empty
« Reply #2 on: February 02, 2018, 03:16:19 am »
Everything I described was to find and report on the notes for a package listed in the project browser, not in a diagram.

Thanks for replying,
Bruce

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: SQL-based report on package info coming up empty
« Reply #3 on: February 02, 2018, 10:14:12 am »
Hi Bruce,

Can you provide the contents of your SQL Search definition?

Nizam

  • Prolab Moderator
  • EA User
  • *
  • Posts: 320
  • Karma: +15/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: SQL-based report on package info coming up empty
« Reply #4 on: February 02, 2018, 03:39:45 pm »
Everything I described was to find and report on the notes for a package listed in the project browser, not in a diagram.

Thanks for replying,
Bruce
These are notes from EA User Guide,
I was also trying to highlight that you've to include 'ea_guid AS CLASSGUID' in your query.

I used the query below, and was able to report on the results without any issues ( i just used one of the default template, Model Report)

Code: [Select]
select ea_guid AS CLASSGUID, Name from t_package where t_package.Name Like "Chapter*"

bknoth2

  • EA User
  • **
  • Posts: 129
  • Karma: +2/-0
    • View Profile
Re: SQL-based report on package info coming up empty
« Reply #5 on: February 10, 2018, 12:18:56 pm »
Can you provide the contents of your SQL Search definition?

select t_package.Name, t_package.Package_ID, 'Package' AS CLASSTYPE, t_package.ea_guid AS CLASSGUID from t_package where t_package.Name like '<Search Term>'

Now what I get in my document is the target package plus the parent package plus the only sibling of my target package. When I run the search as a search, only my target package is returned (as expected).

Thanks
Bruce