It's all about the answers!

Ask a question

Report Builder Changing Variable Type


Jake Tuero (113) | asked Jul 26 '16, 10:25 a.m.

I am using the report builder and writing my own SQL queries. I have added my own column in the query, and under "Format Results" -> "Format", it lists the variable types and defaults it to a string. I click into the options, and choose Integer (The column/variable I added in the query uses a CASE/WHEN to check a condition on another variable, and set it to an integer of 0..5). After I change the variable type to an integer and save the report, it changes it back to a string.

I need to get the variable as an integer, as I want to make a graph, and graph the column by sum (The variable needs to show up in the graph editor under the "Add lines or bar segments from numeric measures" section).

Thanks! 


Comments
Jake Tuero commented Jul 28 '16, 9:13 a.m. | edited Jul 28 '16, 9:31 a.m.

Update:

I have also tried to type-cast to an integer in the query, but that does not stop the Report Builder from keeping the variable type as a String. The variable I wish to have as an Integer is TAG

SELECT 
    ITERATION_NAME,
       SUM(CAST(
           CASE WHEN (T1.TAGS='|release_points_1|' OR T1.TAGS='|star_points_1|') THEN 1 
           ELSE 0
           END AS Integer)) AS TAG
FROM RIDW.VW_REQUEST T1
WHERE T1.PROJECT_ID = 73
 AND
(T1.ISSOFTDELETED = 0) AND
(T1.REQUEST_ID <> -1 AND T1.REQUEST_ID IS NOT NULL)
GROUP BY T1.ITERATION_NAME


Jake Tuero commented Jul 28 '16, 9:14 a.m. | edited Jul 28 '16, 9:31 a.m.

Deletion from duplicate comment

Be the first one to answer this question!


Register or to post your answer.