Author Topic: RTF Generator ignores 'order by' clause  (Read 991 times)

Richard Phillips

  • EA User
  • **
  • Posts: 27
  • Karma: +0/-0
    • View Profile
RTF Generator ignores 'order by' clause
« on: May 05, 2010, 06:55:43 pm »
Hi,

I have written a custom SQL statement that filters activities by phase and orders them by alias.
This works beautifully in the search window and I can select all elements and product a report from that list.
However, I want to make use of the searchname and searchvalue of a model document tag values.
If I set the search name to the name of my query and the search value to the phase that I want, the resulting doc shows the correct elements but ignores the 'order by Alias' clause on the query.

Is there anyway I can get the model document to make use of the 'order by' part of the query?

Cheers,
Richard.

Richard Phillips

  • EA User
  • **
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: RTF Generator ignores 'order by' clause
« Reply #1 on: May 05, 2010, 07:53:44 pm »
The query that I am trying to use is...

SELECT t_object.ea_guid AS CLASSGUID, t_object.Object_Type AS CLASSTYPE, t_object.Name, t_object.Alias, t_object.Phase, t_object.Version, t_object.ParentID FROM t_object where t_object.Object_Type = 'Activity' and (t_object.Phase = '<Search Term>' or '<Search Term>' = 'all')
order by Alias

I have just upgraded to v8.0 build 855 with the same results. What is returned in the search window is different to what appears in the RTF document.

philchudley

  • EA User
  • **
  • Posts: 604
  • Karma: +13/-0
  • UML/EA Principal Consultant / Trainer
    • View Profile
Re: RTF Generator ignores 'order by' clause
« Reply #2 on: May 05, 2010, 08:19:49 pm »
Hi Richard

Just a thought, does your model document contain a package? If so the search in the taggedvalue is ignored and the element order in the package is used.

remove the said package from your model document and all should be OK

You can either use packages or a search but not both,

Cheers

Phil
follow me on Twitter

@SparxEAGuru

Richard Phillips

  • EA User
  • **
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: RTF Generator ignores 'order by' clause
« Reply #3 on: May 06, 2010, 09:00:15 pm »
That's got it! Cheers, it has been puzzling/frustrating me for a while.

Cheers.

Graham_Moir

  • EA User
  • **
  • Posts: 725
  • Karma: +8/-12
    • View Profile
Re: RTF Generator ignores 'order by' clause
« Reply #4 on: May 07, 2010, 01:12:43 am »
The help does say that you shouldn't specify both but if you do then the package will override.