Is there anyway to use labels in Toad Reports to calculate new labels? I have a label that sums the sales and i would like to take that label and divide it by another label.
You should be able to add a cqalulcated field in the Data Report. Use the right click menu in the Field list area.
Let me explain better…
I created a query which returns “todays_sales”, “last_yr_sales”, “change”, & “percent_change” for 20 stores we have. I exported the data to report designer and during the wizard steps it asks if you would like to sum any columns. I chose to select all four columns. Click finish > preview and voila i have all my numbers by store and a grand total at the bottom summing the values in the column. This works great except for the percentage. Instead of taking the sum(Change) and dividing by Sum(Last_Yr_Sales) it just adds the % from all rows and gives me the wrong %.
SO…I tried creating a calculated field which had the expression: SUM([Change])/SUM([Last_Yr_Sales]) …but that did not work.
Is there any way to use the labels that toad creates in the explorer window to create the correct value, or am i just doing something wrong? I attached an excel file to visualize my problem.
Example.xls (14 KB)
I see. It seems like you should be able to do this with a calculated column but I couldn’t get it work either. I would move the sum() and SUM([Change])/SUM([Last_Yr_Sales]) into your SQL and not do this in the Data Report.
That should be doable, right?
Thanks for the help. I figured that may be the only way to get this to work. I’ll give it a go and see what happens.
Looks like the ability to perform calculations between summary fields within a group footers hasn’t been resolved in 3.4 yet, either?