Book a Demo

Author Topic: Query Builder vs SQL Editor Model Search for RTF.  (Read 5022 times)

viarellano

  • EA User
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Query Builder vs SQL Editor Model Search for RTF.
« on: March 26, 2009, 08:04:40 pm »
Hi all.

I have a problem while using model search for RTF Report.

First i have created a Model Search by searching for elements which contains certain value for specific Tagged Value. I used it to assign to a model document so these elements are showed in my RTF report.

After that, i need to specifie an order in the elements to be showed in the report, so i created the Model Serch through the SQL Editor where i can set ordering for the query.

This query rules ok in the Model Search view, but when i try to use it in my model document instead of the Query Builder version of my query, it does not works.

Any idea?

Thanks and regards

Vi

viarellano

  • EA User
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Query Builder vs SQL Editor Model Search for R
« Reply #1 on: March 26, 2009, 08:56:09 pm »
Quote
Hi all.

I have a problem while using model search for RTF Report.

First i have created a Model Search by searching for elements which contains certain value for specific Tagged Value. I used it to assign to a model document so these elements are showed in my RTF report.

After that, i need to specifie an order in the elements to be showed in the report, so i created the Model Serch through the SQL Editor where i can set ordering for the query.

This query rules ok in the Model Search view, but when i try to use it in my model document instead of the Query Builder version of my query, it does not works.

Any idea?

Thanks and regards

Vi

Maybe, there's an option to setting order in "Query Builder"'s version of my query.
I have also try to use the Order option in the RTF template, but also doesn't works :(

I NEED A WAY TO STABLISH ORDER FOR MY REPORT :(:(:(:(:(

Thanks

viarellano

  • EA User
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Query Builder vs SQL Editor Model Search for R
« Reply #2 on: March 27, 2009, 01:47:56 am »
Quote
Quote
Hi all.

I have a problem while using model search for RTF Report.

First i have created a Model Search by searching for elements which contains certain value for specific Tagged Value. I used it to assign to a model document so these elements are showed in my RTF report.

After that, i need to specifie an order in the elements to be showed in the report, so i created the Model Serch through the SQL Editor where i can set ordering for the query.

This query rules ok in the Model Search view, but when i try to use it in my model document instead of the Query Builder version of my query, it does not works.

Any idea?

Thanks and regards

Vi

Maybe, there's an option to setting order in "Query Builder"'s version of my query.
I have also try to use the Order option in the RTF template, but also doesn't works :(

I NEED A WAY TO STABLISH ORDER FOR MY REPORT :(:(:(:(:(

Thanks

A possible cause is that when i create a SQL query, i have to set Aliases for fields and tables as this is needed for RTF Templates, so an object is represented by {Element.Name} ...

viarellano

  • EA User
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Query Builder vs SQL Editor Model Search for R
« Reply #3 on: April 02, 2009, 03:52:00 am »
Hi,

Has anybody an idea on how to create the query in order to be used from the template??

An example of query

SELECT Element.Name, Element.Note AS Notes
FROM t_object AS Element INNER JOIN t_objectproperties ON Element.Object_ID = t_objectproperties.Object_ID
WHERE (((t_objectproperties.Value) Like "*mySearchData*") AND ((t_objectproperties.Property)="myTaggedValue"))
ORDER BY Element.Name;

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: Query Builder vs SQL Editor Model Search for R
« Reply #4 on: April 02, 2009, 04:36:38 pm »
When generating a document from the project browser it is expected that you need it's hierarchical structure for the  report. Hence it only supports the Query not SQL statements.

This is why we provide the model search window; if a user requires a non structured RTF document from a SQL query they can run a search and generate a report from those results (Ctrl-A - then using the context menu option).

viarellano

  • EA User
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Query Builder vs SQL Editor Model Search for R
« Reply #5 on: April 16, 2009, 02:14:47 am »
Hi again.

still looking for another solution.

I'm trying to use model document with package attributes. This allows me to show elements specifying order in the RTF template. The problems comes when i try to use the model search that i have created.
This model search contains to filters as follows:
one for the Stereotype equal to "myEstereotype".
one for tagged values Property like "myTaggedValue"

So, i want to see all the elements from specific Estereotype AND with my TaggedValue no matter the value i have setted to it.

The model search runs ok, but when i try to import this from the template in the "Element Filters" tab, it does not works. It only works with one of my filters, (only for taggedvalue property or the estereotype, but not both of them).

The Search Panel:
-- Element (checked) Stereotype Contains "MyEstereotype" required
-- --TagValue (checked) Property Contains "MyTaggedValue" required


Any idea about that?


I'm feeling so near the solution .... :D

Thanks

viarellano

  • EA User
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Query Builder vs SQL Editor Model Search for R
« Reply #6 on: May 04, 2009, 07:27:13 pm »
Quote
Hi,

Has anybody an idea on how to create the query in order to be used from the template??

An example of query

SELECT Element.Name, Element.Note AS Notes
FROM t_object AS Element INNER JOIN t_objectproperties ON Element.Object_ID = t_objectproperties.Object_ID
WHERE (((t_objectproperties.Value) Like "*mySearchData*") AND ((t_objectproperties.Property)="myTaggedValue"))
ORDER BY Element.Name;

Well, after all, as it is said in the documentation, the important thing is tu get the EAGUID from the query, so putting t_object.ea_guid AS CLASSGUID in the query.