0
votes

I want to recreate an old SSRS report for SSRS 2014. The old report was made in SSRS 2005 with the support of Dundas Chart for Reporting Services. Since Dundas was acquired by Microsoft, the Addon isn’t available anymore for SSRS 2014.

The critical object of the report is a scatter chart. In the old report it was possible to add custom code to the Dundas chart. With the custom code, we built a chart which had different spline ranges with data from somewhere in the database in the background of the actual data in the chart. The code that was used is the following:

String connString01b = 
"SERVER=SERVER;database=DATABASE;Trusted_Connection=Yes";
String commandText01b = "SELECT xx_X, xx_Min, xx_Max 
FROM table WHERE (xx_X IS NOT NULL) ORDER BY 
xx_X;";

System.Data.SqlClient.SqlConnection conn01b = new 
System.Data.SqlClient.SqlConnection(connString01b); 
System.Data.SqlClient.SqlCommand command01b = new 
System.Data.SqlClient.SqlCommand(commandText01b, conn01b); 
conn01b.Open(); 
System.Data.SqlClient.SqlDataReader aReader01b = 
command01b.ExecuteReader(System.Data.CommandBehavior.CloseConnection); 

strLegend = "xxx";
Series Series01b = chartObj.Series.Add(strLegend); 
Series01b.Type = SeriesChartType.SplineRange; 
Series01b.ChartArea = chartObj.ChartAreas[0].Name;
Series01b.Color = Color.FromArgb(127, Color.Blue);

Series01b.Points.DataBind(aReader01b,"xx_X","xx_Min, 
xx_Max
","");

Now i want to build this chart in SSRS 2014 without the possibility to use dundas custom code.

Is there a chance to do this without having to combine the data for the scatter chart and the spline range into one dataset?
Also even if i was able to combine the data into one dataset i think i couldn't get the result i want because of the chosen category and series group for the actual data.

I've already thought about the Lookup function but thats also not possible because the data doesn't have an identical column.

1

1 Answers

0
votes

You can run queries against the database (outside of the dataset) using custom assemblies (which are pretty much C# classes compiled to a DLL, loaded to the SSRS server, and then referenced in your RDL).

I have done this in the past. The C# class effectively took as input a string representing a query and then executed that query in a database (either hardcoded or provided as another parameter). You can discuss security and permissions all day I am sure...you will need to make your own determinations there.

You call the custom code in expressions just as you would VBA custom code.

What I don’t know is if you can return more than 1 value and act on those values in SSRS. I only ever had the use case of calling the custom assembly to get 1 scalar value.