Adding custom text and values to plots on different pages using a for loop
Jun 27, 2023 06:55 AM(947 views)
Hi,
I've attached a data table which aims to add a custom caption to each page of an X/Y plot graph builder report generated from the script saved within.
Page is being controlled by the :Group variable, I need a way to add custom text along with a custom summary statistic (%CV in this case) to the plot for each :Group.
For the most part the script is working (i.e. the text and the statistic are dispatched correctly to each plot), however the value dispatched are incorrect.
The script works by putting together a list of %CV values for each :Group, with the intent to be called upon later in the script for values to be dispatched to the relevant page / plot / framebox for a given :Group.
As the script is written currently, it appears that the 'for loop' will cycle to the last value in the list before starting to dispatch values to the plot for each :Group, so each plot gets the last value in the list, rather than the one relevant to it's :Group.
I believe this is due to the use of ' ; ' at the end of line 61, however if I use a ' , ' here the 'for loop' would error as there would be too many arguments within the for function.
I need a way to incremented to the 1st value in the list and then dispatch that value to the 1st frame box, and then increment to the 2nd value in the list and then dispatch that value to the 2nd frame box, and so on....
I also get a subscript range error which I think might be due to the way I'm trying to call values from the list within the 'for loop'. Either the subscript cannot be used that way within the for loop, or the values in the list are not accessible with the 'for loop' written the way it is currently.
I am hoping someone can help me approach solving this problem
If you check the graphic scripts in graph builder, you will see that the cur_val isn't being evaluated. Also the indexing goes out of bounds due to the usage of Count_1 + 1. Not sure if the ScaleBox(i + 1) is correct in this modified version
Also I would most of the time suggest sending separate messages instead of using SendToReport. One example could be sending messages to modify axisboxes
If you check the graphic scripts in graph builder, you will see that the cur_val isn't being evaluated. Also the indexing goes out of bounds due to the usage of Count_1 + 1. Not sure if the ScaleBox(i + 1) is correct in this modified version
Also I would most of the time suggest sending separate messages instead of using SendToReport. One example could be sending messages to modify axisboxes