Toad World® Forums

TDA & Reports


#1

Three questions

  1. Can TDA generate conditional reporting for example
    If a value of 1 will be printed for a particular field, I would like to replace the value 1 with ‘ONE’ , 2 with TWO etc

  2. If I create a report base on a query can I modify the query without changing the report

  3. Can a report create for query one be used with query two. If the queries are the same?


#2

RE:

  1. You will need to include the conditional items in your SQL wich is easy to do with case statements.

  2. Yes. You can modify the query without changing the report. When you are in the Report designer there is a tool button “Edit the underlying query”. This launches into an editor where you can change the query and execute the result set, then send back to the report designer.

  3. You can edit the queries to a certain extent. If you want to add a column or add a filter. But if you change the query completely to change all of the fields you will need to start a new report. Minor changes to the query are fine.

Data reports can use bind variables in the SQL. Often the same report can be reused by asking for a different bind value. IE: Date range period, or department value. This is another way of reusing similar reports.

Debbie


#3

Number 2. Where is this tool button that will allow changes to the underlying query. I look but couldn’t find it.


#4

You need to be in the Report Designer. See the first screenshot. When you press it, you will get a window that shows your query and resut set. Edit the query and then send back the changed query by pressing the generate report button. This sends it back to the same designer.
EditUnderlyingquery.png


#5

You need to be in the Report Designer. See the first screenshot. When you press it, you will get a window that shows your query and resut set. Edit the query and then send back the changed query by pressing the generate report button. This sends it back to the same designer.
EditUnderlyingQuery3.png


#6

But if you edit the underlying query, and make a syntax error, I found that it will display the error message, return you to the Report Designer, and you will lose all the changes made to the SQL. There is no prompt to keep you in the editor to fix your error.

Is this your experience Debbie?


#7

I always execute the SQL in the editor to generate the correct result set before sending back. I think you need to retrieve the results to really make the change as the report designer gets it’s columns form the result set not the query. Sounds like the SQL editor should have reminded you to do the execute. I’ll entered a CR to add that (CR70,043). Hope it wasn’t a lot of SQL changes…

Debbie