Fix graph display in advanced summary with MSSQL

Graph « Cumulative by date » is not displayed in Summary > Advanced
Summary, SQL Server complains that it cannot convert varchar to int.

Fixes #17011, https://github.com/mantisbt/mantisbt/pull/142

Signed-off-by: Damien Regad <dregad@mantisbt.org>