Data Types in SSRS Mobile Reports Category Charts

There are several chart types found in traditional paginated SSRS reports. The charts have many properties, but these are configured the same from chart type to chart type. SSRS Mobile report charts are very different. Each chart has a specific purpose and unique properties.

The Category Chart displays a value over a series. For example, you may want to display total sales by territory. The category, or series, is required to be one of the character data types (char, nvarchar, etc.).

To demonstrate, I created a new shared dataset called SalesCountByYear. Here is the query using the AdventureWorks2014 database:

SELECT COUNT(*) AS SalesCount, YEAR(OrderDate) AS OrderYear 
FROM Sales.SalesOrderHeader 
GROUP BY YEAR(OrderYear);

After launching Mobile Report Publisher, I added a Category Chart.

dt2

After switching to the Data page, this is how the simulated data looks:

dt3.PNG

Notice that the series field can be only Category or FilterKey. These both contain character data. Next, I added the SalesCountByYear dataset to the Mobile Report.

dt4

Notice that OrderYear displays decimal points. I switched the dataset in the Series field name property, and found that neither of the columns in the dataset can be used.

dt5

Numeric columns cannot be set as a Series name field. To work around this, I modified the dataset, casting OrderYear as a CHAR(4).

dt7

You can refresh the dataset in the Mobile Report, but I found better results by deleting it and adding it back. Once that was done, the OrderYear values looked better without the decimal places, and OrderYear was available to use as the Series name field.

dt8.PNG

This is how the chart looked after making the data type conversion:

dt9.PNG

 

 

The Comparison Category chart works similarly to the Comparison Chart. The Comparison Category Chart allows you to compare two values over the series. You will see the same data type requirements for the Series name field property.

Would you like to learn more about SSRS 2016 Mobile Reports? Check out my Pluralsight course!

 

About Kathi Kellenberger

I am the editor of the online journal Simple Talk. I love talking about SQL Server to anyone who will listen, just ask my five year old granddaughter. I love to write and teach. I am so humbled and honored to say I am a Data Platform MVP, a volunteer with LaunchCode and co-leader of PASS Women in Technology Virtual Group.
This entry was posted in SSRS. Bookmark the permalink.

One Response to Data Types in SSRS Mobile Reports Category Charts

  1. Pingback: SSRS Mobile Reports | WIT Society

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s