Book a Demo

Author Topic: Limiting glossary in report to definitions and parameters  (Read 6638 times)

Richard Burke

  • EA User
  • **
  • Posts: 32
  • Karma: +1/-0
    • View Profile
    • Protean Electric
Limiting glossary in report to definitions and parameters
« on: May 20, 2016, 09:03:18 pm »
Hello,

We are using the EA report generator in 12.1 to generate custom reports. Our glossary has a lot of terms so we want to restrict it to definitions and parameters.

I was hoping to use the filters built into the report generator but I couldn't find anything that looked like it did the job so I resorted to custom SQL.

I created  a fragment with the following (MySQL) SQL:
Code: [Select]
Select
  t_glossary.Term As Term,
  t_glossary.Type As Type,
  t_glossary.Meaning As "Meaning.Formatted"
From
  t_glossary
Where
  (t_glossary.Type = "Parameter") Or
  (t_glossary.Type = "Definition")
Order By
  Term

The Meaning.Formatted is so that formatting is maintained when the glossary is printed. Otherwise you get <b> </b> instead of bold text, for example.

When I run the report, I get the following error message:
Code: [Select]
Error:
Code = 0x0
Source - Line : 0; Char : 0
Error Description = (null)

Not very helpful! However, the report does seem to be generated OK.

Can anybody shed any light on this or suggest a way of making it work without the error message?

Thanks,
Richard
« Last Edit: May 20, 2016, 09:05:38 pm by Richard Burke »
Richard Burke
Software and Systems Manager
Protean Electric Limited

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Limiting glossary in report to definitions and parameters
« Reply #1 on: May 20, 2016, 09:59:00 pm »
I believe that's the error message you get when your custom selection returns no rows for the fragment to work on. Which in turn may be due to a problem in the SQL query.

Maybe try with apostrophes instead of quotation marks? Perhaps your database is in ANSI quotes mode?
Other than that, the query looks fine to me.

/Uffe
My theories are always correct, just apply them to the right reality.

Richard Burke

  • EA User
  • **
  • Posts: 32
  • Karma: +1/-0
    • View Profile
    • Protean Electric
Re: Limiting glossary in report to definitions and parameters
« Reply #2 on: May 20, 2016, 11:20:38 pm »
Thanks Uffe. My first thought was that there might be something wrong with the query but I tried it in the search window and it was fine. The fact that it is also displaying the report correctly is also an indication that it is not an issue of returning no rows.

Regards,
Richard
Richard Burke
Software and Systems Manager
Protean Electric Limited

Richard Burke

  • EA User
  • **
  • Posts: 32
  • Karma: +1/-0
    • View Profile
    • Protean Electric
Re: Limiting glossary in report to definitions and parameters
« Reply #3 on: May 20, 2016, 11:47:45 pm »
Maybe I could put the question slightly differently:

If you were using Master / Model Documents and you wanted to include the Glossary as a Model document but only for parameters and definitions, how would you do it?

My approach is as follows:
1. Create a fragment with a custom tag. Put the SQL I included earlier in the Custom Query section.
2. Create a template with a package tag. Drag the fragment from step 1 inside the package tag.
3. Create a master document and add a model document to it.
4. Set the RTFTemplate of the model document to the template created in step 2.
5. Drag a package from the browser onto the model document. I chose the same package that the master document sits in. If I don't add a package nothing comes out. It doesn't seem to matter what package I drag on, so I selected one that requires minimal analysis by EA.

It's a bit convoluted but means I can tag the glossary on to the end of any report.

Thanks,
Richard
Richard Burke
Software and Systems Manager
Protean Electric Limited

Richard Burke

  • EA User
  • **
  • Posts: 32
  • Karma: +1/-0
    • View Profile
    • Protean Electric
Re: Limiting glossary in report to definitions and parameters
« Reply #4 on: May 21, 2016, 01:10:33 am »
I haven't changed anything and suddenly it has decided to work! I guess the question is answered :-\
Richard Burke
Software and Systems Manager
Protean Electric Limited

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Limiting glossary in report to definitions and parameters
« Reply #5 on: May 21, 2016, 02:46:05 pm »
Richard,

Also make sure you are using the latest version 12.1.1230 as that contains an important fix for the rich text fields in SQL and Script fragments.

Geert

Richard Burke

  • EA User
  • **
  • Posts: 32
  • Karma: +1/-0
    • View Profile
    • Protean Electric
Re: Limiting glossary in report to definitions and parameters
« Reply #6 on: May 23, 2016, 11:10:50 pm »
Thanks for the advice, Geert. I had a slightly earlier version installed so that might have been the issue.

Richard
Richard Burke
Software and Systems Manager
Protean Electric Limited