Toad World® Forums

Toad Data Reports -- Is it possible to pass a parameter to a Constant Line in the Chart Wizard?


Is it possible to pass a parameter to a Constant Line in the Chart Wizard?

I create a lot of Toad Data Reports, and it would be great if I could pass a parameter to the constant line value. This is a limiting factor in how many .tdr report files I have to create.

For example, I have a generic template to which I pass things like a [title] parameter, etc. The template has a graph, which is the same for all the various reports, just different data inputs and different titles. The limiting factor is that each of these reports have different goal line values (the constant line). There are 12 different goal line values, which forces me to hard code 12 different report files instead of one.

If I could pass a parameter to the constant line value, I would only have one .TDR report file for all 12 of these reports.

Is this possible to do in the Toad Data Reports Scripts tab? Or could this be added as a feature in a future release?

Also, in this post, “No “Always Display Constant Line Option”?”

I’m asking that an “always display constant line” option be added to the chart wizard. It’s annoying when the chart’s Y-axis display algorithm leaves the constant line out of the display. Manually setting the chart’s Y-axis to 0-100, for example, is not an option, as we need to see a granularity of as low as .1%.

Have you thought about created a table of goals? That way you can join to the goal table and pull the goal value into your query based on the type of measure that query is using. You can use effective and term dates in your table as well as an Active flag. Then all you have to do is maintain the table of goals as they change over time.

Yes, that will actually work. Thanks, Greg. Good answer.

More exploration of this topic:

For those who would like to automatically generate a goal or constant line, you can use Greg’s method. However, in an autogenerated series, your goal or constant line will have the same properties as the other lines in the series. So, for example, if you have two series lines with markers and labels, your third “goal line” series will also have markers and labels. For my goal lines, I just want them to be a plain, straight red line with no markers or labels.

You can also create a non-autogenerated series in the Chart Wizard that would read your goal line inputs (dates, constant goal value) from a second query in the Data tab of your report file, and you can customize it to be just a plain, straight red line with no markers or labels, for example. The only drawback to this, for me, is that the name of the series which is displayed in the legend of the chart has to be hard coded in the Options tab for the series. I.e. I can label the goal line “Goal” for all my reports, but I can’t have “Goal = 98%” in one, and then “Goal = 90%” in another without creating two different report files. Based on how we present data, it’s important to have the Goal % displayed in the legend.

It appears you can only have one autogenerated series per chart, otherwise this could be solved by adding a second autogenerated series.