I need help on what I believe to be a simple SSRS report function, but alas I cannot seem to get to work. I am running a SQL Server 2012, using VS2010.
The report that I'm tasked with requires multiple charts (pie, line and stacked) all based off this one query.
I have created a report with a single dataset as follows:
Use WWTP
SELECT DateAndTime, TagIndex, Val As Value
FROM FloatTable
WHERE DateAndTime BETWEEN #StartDate AND #EndDate
I then place a chart object on the report and apply a filter of TagIndex = 1 and I drag Value onto the chart for the X axis and I drag *DateAndTime* onto the chart for the Y axis. This returns the data as required.
However I'd like to add another value onto this chart (eg. TagIndex = 2). I have tried the following:
Modified the Chart Filter to TagIndex = 1 OR 2
Removed chart Filter and applied the following expression onto the value: =IIf(Fields!TagIndex.Value = 1, Fields!Value.Value, Nothing)
Both scenarios don't return anything. Should I create multiple data sets to achieve this?
Related
I'm stuck on an issue where I want my bar chart to grow vertically based on the number of groups display in my graph.
I have a shared dataset looking at a SharePoint list then I have a dataset
in my report referencing this but applying some filters based on date ranges. I've then set that as the dataset for my graph which works neatly but there's a widely varying number of potential grouping categories to be displayed. I was looking at this article here which is a neat way to do it, but I don't want a manually set parameter, I just want it to grow based on whatever shows up. One thought I had was in the DynamicHeight expression was to check the number of "CategoryGroups" that show up but I can't see a way of getting to the chart object in the VB expression editor.
I saw an example of doing group by in SQL in the dataset editor but I don't get that option looking at a SharePoint list. Is there a way in DynamicHeight expression editor to reference report objects?
Similar to the article, you can use a distinct count of the group items in a expression in order to dynamically size your chart.
The expression could look like:
= (2 + CountDistinct(Fields!item.Value, "DataSet1")) & ” cm”
Which is (minimum size + size for each group item) in cm (or any unit you prefer)
I can't figure out how to slide information up in an SSRS report if the data comes back as NULL. So if I've got an address field with the entire address i want to slide data up (remove white spaces) if data is null.
If I Understood what you are trying to achieve then that is You want to filter out the empty values from the report dataset.
There are two ways to do that
1) Set condition in your sql so that filtered data will come to the report
2) Filter data in dataset of report
If you have control over the query then always use first approach, But if you dont have control over it then use below method,
For that you can use the report filter here is more info.
For your purpose you can set the filter expression for the dataset as
1) Expression
= IIF( IsNothing(Fields!address.value) || Len(Trim(Fields!address.value)) = 0 ,False,True)
2) Set filter Operator =
3) Set filter Value to True
That will filter out the empty data
I use 2008 SSRS and am new to SSRS. I am trying to create a bar chart that has a line chart as the secondary axis. Within the Chart Data window, under Values, I have 'loan_count' as the primary axis and 'offer_percent' as the secondary axis. Under Category Groups I have the column 'month'. Under Series Groups, I have the column 'metrics'. For the 'metrics' column (Series Groups), I created a filter: [metrics] in Ending Inventory, Inventory with Offer (includes 2 values).
Let's look at the secondary axis under Values. The column used is 'offer_percent'. This is the column that does not show up in the report. In my attempt to fix this problem, under its Series Properties I have an expression: =IsNothing(Fields!offer_percent.Value) <> true = true. I am using this 'not null' expression because 'offer_percent' is present (not null) only when 'metrics' = 'offer_per_inventory'. With this expression, the report still doesn't show the values of offer_percent.
I hope I am clear with my issues. Any input would be greatly appreciated!
Thank you!
Edit : format code
This is probably an easy one for a guru here.
I have a datatable of employee results by month structured into the following fields:
Name,Metric,Jan,Feb,Mar,Apr, ...,Dec
When I take this dataset as is, and select it all as an input for a simple column graph in MS Excel, the chart figures out that each series is defined by Name+Metric, the (y-axis) is the defined by the values in Jan-Dec columns, and the columns of the graph are split by date (x-axis).
When I feed this same dataset into MS Access with a simple Select query:
Select Name, Metric, Jan, Feb, Mar... Dec from Results
I need to be able to tell the chart how to use the data. How do I do this?
Also, I know that I could flatten the dataset so the dates are in rows, and then use a Crosstab query for Access to figure it out, but it seems inefficient to condense the data so that Access can just expand it out again. I'm going to assume there is a way to tell the chart somehow how to use the data, which is what I am looking for in an answer here.
Option 1
This is a quick and dirty fix.
Excel essentially is creating 'grouped' categories of Name + Metric via concatenation. A quick and dirty solution is to use the default bar chart and set its Row Source property to:
Select Name & ' ' & Metric, Jan, Feb, Mar... Dec from Results
After that if it still needs adjustment, double click on the chart object from design view and see what chart properties you can mess around with.
Option 2
For more advanced control of the chart layout, select your table Results and mess around with the PivotChart function in Access. This chart can later be added as a subform on another report or form.
side note: you should try to avoid the field name "Name" since it is a reserved word
I am working on a Range Bar Chart in SSRS 2008 R2 that is configured to look something like a Gantt Chart. The Data set looks like:
Metric | Date-plot-1 | ... | Date-plot-n
My problem comes in with null values in Date-plot1. If my report dataset returns a data value, I see the date labels on the bottom of the chart. If that particular field is null, I either get no data labels, or "MM/dd/yyyy" (which is the formatting string I am applying to the dates).
Unfortunately, due to this being a data-quality report there can/will be NULL values in any/all of the columns. How can I get the axis label to display even if the first date plot is null?
what do you expect the values on the y axis to fall into if the X is null?
Nevertheless, I would deal with the null on the data source. Make it whatever value you answered my first question :)
If not possible, try to select the scale of the chart and see properties related with interval like intervalOffset.