none
Tooltip error msg

    Question

  • The tooltip isn't showing in my chart (I selected it in Series Properties) and I am getting an error msg:

    Warning	1	[rsInvalidExpressionDataType] The ToolTip expression used in chart ‘Chart3’ returned a data type that is not valid.	C:\Users\dr\Documents\Visual Studio 2008\Projects\Report Project2\Report Project2\Report1.rdl	0	0	

    I am only using Expr1 in the chart data values so I don't think it's anything to do with CAST or ROUND in Expr2.

    SELECT        t_Employees.EmployeeSurname, SUM(t_PointsSystem.Points) AS Expr1, CAST(ROUND(SUM(t_PointsSystem.Points) * 1.2, 0) AS INT) AS Expr2
    FROM            t_Employees INNER JOIN
                             ln_DriversPoints ON t_Employees.EmployeeID = ln_DriversPoints.EmployeeID INNER JOIN
                             t_PointsSystem ON ln_DriversPoints.PointsID = t_PointsSystem.PointsID
    GROUP BY t_Employees.EmployeeSurname
    ORDER BY Expr1 DESC

    Any ideas?


    • Edited by meridius10 Monday, May 13, 2013 9:32 PM
    Monday, May 13, 2013 9:31 PM

All replies

  • What is the Data TYpe of t_PointsSystem.Points?

    You may need to CAST t_PointsSystem.Points AS INT first.  FOr example:

    SELECT        t_Employees.EmployeeSurname, SUM(CAST(t_PointsSystem.Points AS INT)) AS Expr1, CAST(ROUND(SUM(CAST(t_PointsSystem.Points AS INT)) * 1.2, 0) AS INT) AS Expr2

    Monday, May 13, 2013 10:58 PM
  • I tried making the amendments above but got the same error message. So now the sql is:

    SELECT        t_Employees.EmployeeSurname, SUM(CAST(t_PointsSystem.Points AS INT)) AS Expr1, CAST(ROUND(SUM(t_PointsSystem.Points) * 1.2, 0) AS INT) AS Expr2
    FROM            t_Employees INNER JOIN
                             ln_DriversPoints ON t_Employees.EmployeeID = ln_DriversPoints.EmployeeID INNER JOIN
                             t_PointsSystem ON ln_DriversPoints.PointsID = t_PointsSystem.PointsID
    GROUP BY t_Employees.EmployeeSurname
    ORDER BY Expr1 DESC

    The data type of t_PointsSystem.Points is 'int'.

    The other thing I don't understand is how to refresh a DataSet in the Report Data area or in the Chart (I tested the new sql by creating a new report and new chart just to make sure.)

    Tuesday, May 14, 2013 9:46 AM
  • Hi Meridius,

    I have tested it on my local environment, we cannot reproduce this issue. So in you scenario, you can use the query below to create datasest:
    SELECT        t_Employees.EmployeeSurname, SUM(CAST(t_PointsSystem.Points AS INT)) AS Expr1
    FROM            t_Employees INNER JOIN
                             ln_DriversPoints
    ON t_Employees.EmployeeID = ln_DriversPoints.EmployeeID INNER JOIN
                             t_PointsSystem
    ON ln_DriversPoints.PointsID = t_PointsSystem.PointsID
    GROUP BY t_Employees.EmployeeSurname
    ORDER BY Expr1 DESC

    And then add a calculate field to this dataset like below.
    Field Name         Field Source
    Expr2                 =Cint(fields!Expr1.Value*1.2)

    And then use the Expr2 as the tooltip.

    If the issue persists, please elaborate the structure of your report, if possible could you please post both the report and the dataset with sample data to us by the following E-mail address? Then, I can try to reproduce the issue again and for further analysis.
    E-mail:sqltnsp@microsoft.com

    Regards,


    Charlie Liao
    TechNet Community Support

    Wednesday, May 15, 2013 3:18 AM
  • OK. I am looking for a simpler approach. If I want to change the number of decimal places in a table I just go to Text Box Properties and change the decimal places on the Number option (in my case to 0). Then I don't need Cint...

    I haven't managed to get things working properly with a column chart (why?) but with a 3-D Exploded Pie and a Tooltip in the Series Properties I can view the data. The only thing that I don't know how to do is to change the number of decimal points (using a properties option?) in a 3-D Exploded Pie (contrast the points for Button. In the table it is 324 and in the chart it is 324.0 for Expr2) Any ideas?

    This is my sql and I have also attached a screenshot:

    SELECT        t_Employees.EmployeeSurname, SUM(t_PointsSystem.Points) AS Expr1, SUM(t_PointsSystem.Points * 1.2) AS Expr2
    FROM            t_Employees INNER JOIN
                             ln_DriversPoints ON t_Employees.EmployeeID = ln_DriversPoints.EmployeeID INNER JOIN
                             t_PointsSystem ON ln_DriversPoints.PointsID = t_PointsSystem.PointsID
    GROUP BY t_Employees.EmployeeSurname
    ORDER BY Expr1 DESC



    • Edited by meridius10 Thursday, May 16, 2013 9:10 AM
    Thursday, May 16, 2013 9:06 AM