Book a Demo

Author Topic: RTF Report SearchName filter error  (Read 13527 times)

Ainsley Haslett

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
RTF Report SearchName filter error
« on: December 03, 2008, 01:33:19 pm »
I have set up a model document and added a pre-defined search into the SearchName field for the model document. (Using EA v7.1.832)

The pre-defined search has been tested on the same package and yeilds the correct result, but when used in the model document for the RTF generator the search is ignored and all data is returned. Why? :o
« Last Edit: December 03, 2008, 01:34:46 pm by hasletta »

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: RTF Report SearchName filter error
« Reply #1 on: December 03, 2008, 02:10:20 pm »
Have you also added one or more packages to the model document? That blocks the search - you can only have one or the other.

Otherwise... any further details?
Best Regards, Roy

Ainsley Haslett

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: RTF Report SearchName filter error
« Reply #2 on: December 03, 2008, 02:11:42 pm »
Yes I have packages and search filters - both. Will try with only the search and let you know how it goes. Cheers :)

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: RTF Report SearchName filter error
« Reply #3 on: December 05, 2008, 04:43:17 pm »
I would suggest you have a look at build 834 - this has an extra Tab in the RTF (F8) window for setting filters directly to an RTF report.
http://www.sparxsystems.com/uml_tool_guide/enterprise_architect_reports/rtfelement_filters.html
« Last Edit: December 05, 2008, 05:01:58 pm by Dermot »

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: RTF Report SearchName filter error
« Reply #4 on: December 06, 2008, 01:16:32 am »
Quote
I would suggest you have a look at build 834 - this has an extra Tab in the RTF (F8) window for setting filters directly to an RTF report.
http://www.sparxsystems.com/uml_tool_guide/enterprise_architect_reports/rtfelement_filters.html


Wow, I believe the element filters dialog is one of the most sophisticated changes made to RTF documentation for a long time (besides virtual documents).
Thanks for that.

Oliver

Ainsley Haslett

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: RTF Report SearchName filter error
« Reply #5 on: December 09, 2008, 01:19:10 pm »
I have updated to build 834 and retried and the model document is still not working. I have added a searchfilter which I have proved works in the manage searches view. I have not added a package to the model document. When I run the report there are no results in the report.


The search I am using is a custom search on the 'status' property of an element. I have configured a status value of 'gap' which is associated to some of the requirements elements. I want to therefore report on the requirements with 'gap' status - this will be my gap report.

Can you please let me know if I am still doing something wrong?

The search filter seems to work and return a report with a set of results when I use say the 'simple' search as the searchname and searchvalue = 'gap' but this is not the result set I am after.


Cheers, Ainsley

[media][/media]

Quote
Have you also added one or more packages to the model document? That blocks the search - you can only have one or the other.

Otherwise... any further details?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: RTF Report SearchName filter error
« Reply #6 on: December 09, 2008, 02:11:23 pm »
Sounds to me like your search isn't returning the right information.

You should at least be returning the guid and type.

See http://www.sparxsystems.com/uml_tool_guide/uml_modeling_tool_features/creating_filters.html

Ainsley Haslett

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: RTF Report SearchName filter error
« Reply #7 on: December 09, 2008, 02:28:45 pm »
Hi there. Thx for the reply. Still not working altho helpful to see you can write the SQL searches :)

I have set up a new search based on this SQL:
select name, note, status, author from t_object where status = 'proposed' order by name

Saved the search and ran in search and confirm that my result are ok.

Next - add a new model document, no packages, just specified this saved search as the searchname with searchvalue as null. When I run the RTF all i get is a blank doc. My rft template is pulling out element fields including name, and I am expecting to get a whole list of rqmts elements. What is going wrong?

I'm thinking that the rft searchname tool is not working, or possibly I've got the wrong fields specified in the rtf. Help!

Ainsley

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: RTF Report SearchName filter error
« Reply #8 on: December 09, 2008, 02:49:43 pm »
Quote
I have set up a new search based on this SQL:
select name, note, status, author from t_object where status = 'proposed' order by name
Hi Ainsley, I can confirm what Simon is saying.  Your search isn't returning what the RTF subsystem needs.  Here's an example from my model that does work:

Code: [Select]
SELECT t_object.ea_guid AS CLASSGUID, t_object.Object_Type AS CLASSTYPE, t_object.Name, t_object.Note, t_object.Object_ID, t_object.Stereotype
FROM «some selection expression»;
The salient point is that the names of the returned columns need to be CLASSGUID and CLASSTYPE as shown.

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: RTF Report SearchName filter error
« Reply #9 on: December 09, 2008, 03:15:38 pm »
In the topic Create Model Document in the Help, we have this note:

"Custom SQL searches are supported if they are returning elements. The SQL must include ea_guid AS CLASSGUID and the object type."

The key word there is must. Your SQL Search statement didn't meet that requirement. The full SQL statement for the requirement is in the topic that Simon referred you to, but I will change the word 'should' to 'must' to make the statement absolutely clear and in agreement with the Model Document topics.

I don't know if that solves the problem, but try it and see if you start getting any results.

Edit: Strewth Mate, Paolo beat me to it!
« Last Edit: December 09, 2008, 03:18:32 pm by RoyC »
Best Regards, Roy

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: RTF Report SearchName filter error
« Reply #10 on: December 09, 2008, 03:42:07 pm »
Ainsley: The search I am using is a custom search on the 'status' property of an element. I have configured a status value of 'gap' which is associated to some of the requirements elements. I want to therefore report on the requirements with 'gap' status - this will be my gap report.

DOB:
What I would suggest you do using 834 is to use the RTF Editor: File | Document Options - in:
 - Exclude Details For: - set this to only show "Requirements"
 - Element Filters: Add a filter for - "Status" "Equal to" 'gap" + Required
That way you will not need to use the Search filter (e.g you can drop the Tagged Values on the Model Document).  However you would need to set the Packages (if a virtual document is still required - it may not be given the filtering available).
Note: with the old search filter - the RTF report hierarchy was not maintained - so this is a much better solution.

Ainsley Haslett

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: RTF Report SearchName filter error
« Reply #11 on: December 16, 2008, 03:17:05 pm »
Hi, I got it working, thank you all for your help :)

Here is the query as it stands now:
SELECT
t_object.ea_guid AS CLASSGUID,
t_object.Object_Type AS CLASSTYPE,
t_Package.Name as Package_Name,
t_object.Name,
t_object.Status,
t_object.Note,
t_object.PData5 as Keyword,
t_object.Object_ID,
t_object.Stereotype,
t_object.Author,
t_object.CreatedDate,
t_object.ModifiedDate
FROM t_object, t_package
where t_object.package_id = t_package.package_id
and t_object.status = 'gap'
order by
t_package.name, t_object.name


Cheers!