Slope line in SSRS
How to create slope line in SSRS. Like we have three points. The line should tilt based on the centre point
Thanks in advance
Hi PrakashThandra,
As per my understanding, you want to create a line chart, in which the line tilt based on the center point. If that is the case, we can use smooth line chart to achieve your goal as Olaf mentioned. For detail information, please refer to the following steps:
In Layout view, in the Toolbox, click Chart.
Click on the design surface where you want the upper-left corner of the chart, the Select Chart Type dialog box appears.
Select Smooth Line, then click OK.
Click the chart to display the Chart Data pane.
Add one or more fields to the Values area. This information will be plotted on the value axis.
Add a grouping field to the Category Groups area. When you add this field to the Category Groups area, a grouping field is automatically created for you. Each group represents a data point in your series.
To summarize the data by category, right-click the data field and click Series Properties. In the Category box, select the category field from the drop-down list. Click OK.
For more information about Creating chart reports, please refer to the following document:
https://www.simple-talk.com/sql/reporting-services/sql-server-reporting-services-advanced-charting/
If there is any misunderstanding, please feel free to let me know.
Thanks,
Wendy Fu
Similar Messages
-
Diagonal line on SSRS line chart
Hi all,
I'm struggling with a charting issue that I was hoping someone here might be able to help with - I've looked through various blogs without success. I need to insert a diagonal line running the full width of a line chart, representing the linearly increasing
target value over a month. The actual data will then be a secondary series on the same vertical axis, showing progress against the target based on today's data.
This report has several limitations that I should emphasise before someone says "Well, why can't you just generate the target data in the SQL query?". It's for Dynamics CRM Online, so the only type of data source and query allowed is FetchXML.
I can't even use a simple SQL query that returns constant values, let alone an actual SQL DB query. It also doesn't seem to be possible to have any custom code in the report, which makes it even more frustrating. FetchXML is just not set up to do things like
return constant values in a query, or return a dataset which is the set of days in the current month.
What I do have is two datasets, one of which returns the actual data, which I've used as the first series in the table, and a second dataset that returns a single value that represents the target for the month. There's no way, as far as I'm aware, to cross-join
that with a set of dates and then use a calculated field in the dataset to turn it into a linear series.
I've set the min and max values of the X-axis to show me all dates, and my initial solution to the problem was to have a horizontal line at the target value, as shown below (red dotted line). However, I've been asked to change that to the solid red diagonal
line as shown:
Series 1 (Total order value) is the RunningValue of the daily order values, summed across the dates.
Series 1 data looks something like this:
[Date] [Order Value]
1 Mar 100
3 Mar 20
3 Mar 35
24 Mar 400
Series 2 data just has
[Target Name] [Target Value]
Sales Target 25000
Does anyone have ideas on how I can do this? I'm happy to take any suggestions; the line doesn't have to be interactive or be an action, so it could even be rendered directly onto the chart, if that's possible. The only limitation is that it needs to be
viewed on screen, and be printable. I'd prefer some sort of elegant approach that allows me to do it as two series on the same chart, but frankly at this point I'm beyond caring how it's done - so long as it works, it can be held together with chewing gum
and string.Hi Anuruddha,
When you want to see the diagonal line, you should divide the target value with number of values in x-axis,
let say Month March has 31 days, your target is 25000
then 25000/31=806.4516129032258
But to do dynamic you need to get the number of days in month
=day(DateAdd("d",-1,DateAdd("M",1,cdate(cstr(Month(First(Fields!workday.Value, "DataSet3")) )+"/01/" + cstr(Year(First(Fields!workday.Value, "DataSet3")))))))
Create another series like below shown:-
a Above expression :-
= (Sum(Fields!target.Value, "DataSet2")/ (day(DateAdd("d",-1,DateAdd("M",1,cdate(cstr(Month(First(Fields!workday.Value, "DataSet3")) )+"/01/" + cstr(Year(First(Fields!workday.Value, "DataSet3")))))))))*Fields!id.Value
Run the report:-
Orange Line is yours previously, Red Line is what you want.
I am doing calculation in series, so there is no problem for you as you can't write SQL query.
Below is the RDL code , which will help you to check the expressions.
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Body>
<ReportItems>
<Textbox Name="textbox1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Sparkline</Value>
<Style>
<FontFamily>Tahoma</FontFamily>
<FontSize>12pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>SteelBlue</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>textbox1</rd:DefaultName>
<Height>0.37in</Height>
<Width>5in</Width>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Chart Name="Chart1">
<ChartCategoryHierarchy>
<ChartMembers>
<ChartMember>
<Group Name="Chart1_CategoryGroup">
<GroupExpressions>
<GroupExpression>=Fields!workday.Value</GroupExpression>
</GroupExpressions>
</Group>
<SortExpressions>
<SortExpression>
<Value>=Fields!workday.Value</Value>
</SortExpression>
</SortExpressions>
<Label>=Fields!workday.Value</Label>
</ChartMember>
</ChartMembers>
</ChartCategoryHierarchy>
<ChartSeriesHierarchy>
<ChartMembers>
<ChartMember>
<Label>value</Label>
</ChartMember>
<ChartMember>
<Label>target</Label>
</ChartMember>
<ChartMember>
<Label>id</Label>
</ChartMember>
</ChartMembers>
</ChartSeriesHierarchy>
<ChartData>
<ChartSeriesCollection>
<ChartSeries Name="value">
<ChartDataPoints>
<ChartDataPoint>
<ChartDataPointValues>
<Y>=RunningValue(Fields!value.Value,Sum,"DataSet3")</Y>
</ChartDataPointValues>
<ChartDataLabel>
<Style />
</ChartDataLabel>
<Style />
<ChartMarker>
<Style />
</ChartMarker>
<DataElementOutput>Output</DataElementOutput>
</ChartDataPoint>
</ChartDataPoints>
<Type>Line</Type>
<Style />
<ChartEmptyPoints>
<Style />
<ChartMarker>
<Style />
</ChartMarker>
<ChartDataLabel>
<Style />
</ChartDataLabel>
</ChartEmptyPoints>
<ValueAxisName>Primary</ValueAxisName>
<CategoryAxisName>Primary</CategoryAxisName>
<ChartSmartLabel>
<CalloutLineColor>Black</CalloutLineColor>
<MinMovingDistance>0pt</MinMovingDistance>
</ChartSmartLabel>
</ChartSeries>
<ChartSeries Name="IDDetails">
<ChartDataPoints>
<ChartDataPoint>
<ChartDataPointValues>
<Y>=Sum(Fields!target.Value, "DataSet2")</Y>
</ChartDataPointValues>
<ChartDataLabel>
<Style />
</ChartDataLabel>
<Style />
<ChartMarker>
<Style />
</ChartMarker>
<DataElementOutput>Output</DataElementOutput>
</ChartDataPoint>
</ChartDataPoints>
<Type>Line</Type>
<Style />
<ChartEmptyPoints>
<Style />
<ChartMarker>
<Style />
</ChartMarker>
<ChartDataLabel>
<Style />
</ChartDataLabel>
</ChartEmptyPoints>
<ValueAxisName>Primary</ValueAxisName>
<CategoryAxisName>Primary</CategoryAxisName>
<ChartSmartLabel>
<CalloutLineColor>Black</CalloutLineColor>
<MinMovingDistance>0pt</MinMovingDistance>
</ChartSmartLabel>
</ChartSeries>
<ChartSeries Name="Series">
<ChartDataPoints>
<ChartDataPoint>
<ChartDataPointValues>
<Y>= (Sum(Fields!target.Value, "DataSet2")/ (day(DateAdd("d",-1,DateAdd("M",1,cdate(cstr(Month(First(Fields!workday.Value, "DataSet3")) )+"/01/" + cstr(Year(First(Fields!workday.Value, "DataSet3")))))))))*Fields!id.Value</Y>
</ChartDataPointValues>
<ChartDataLabel>
<Style />
</ChartDataLabel>
<Style />
<ChartMarker>
<Style />
</ChartMarker>
<DataElementOutput>Output</DataElementOutput>
</ChartDataPoint>
</ChartDataPoints>
<Type>Line</Type>
<Style />
<ChartEmptyPoints>
<Style />
<ChartMarker>
<Style />
</ChartMarker>
<ChartDataLabel>
<Style />
</ChartDataLabel>
</ChartEmptyPoints>
<ValueAxisName>Primary</ValueAxisName>
<CategoryAxisName>Primary</CategoryAxisName>
<ChartSmartLabel>
<CalloutLineColor>Black</CalloutLineColor>
<MinMovingDistance>0pt</MinMovingDistance>
</ChartSmartLabel>
</ChartSeries>
</ChartSeriesCollection>
</ChartData>
<ChartAreas>
<ChartArea Name="Default">
<ChartCategoryAxes>
<ChartAxis Name="Primary">
<Style>
<FontSize>8pt</FontSize>
</Style>
<ChartAxisTitle>
<Caption>Axis Title</Caption>
<Style>
<FontSize>8pt</FontSize>
</Style>
</ChartAxisTitle>
<ChartMajorGridLines>
<Enabled>False</Enabled>
<Style>
<Border>
<Color>Gainsboro</Color>
</Border>
</Style>
</ChartMajorGridLines>
<ChartMinorGridLines>
<Style>
<Border>
<Color>Gainsboro</Color>
<Style>Dotted</Style>
</Border>
</Style>
</ChartMinorGridLines>
<ChartMinorTickMarks>
<Length>0.5</Length>
</ChartMinorTickMarks>
<CrossAt>NaN</CrossAt>
<Minimum>NaN</Minimum>
<Maximum>NaN</Maximum>
<ChartAxisScaleBreak>
<Style />
</ChartAxisScaleBreak>
</ChartAxis>
<ChartAxis Name="Secondary">
<Style>
<FontSize>8pt</FontSize>
</Style>
<ChartAxisTitle>
<Caption>Axis Title</Caption>
<Style>
<FontSize>8pt</FontSize>
</Style>
</ChartAxisTitle>
<ChartMajorGridLines>
<Enabled>False</Enabled>
<Style>
<Border>
<Color>Gainsboro</Color>
</Border>
</Style>
</ChartMajorGridLines>
<ChartMinorGridLines>
<Style>
<Border>
<Color>Gainsboro</Color>
<Style>Dotted</Style>
</Border>
</Style>
</ChartMinorGridLines>
<ChartMinorTickMarks>
<Length>0.5</Length>
</ChartMinorTickMarks>
<CrossAt>NaN</CrossAt>
<Location>Opposite</Location>
<Minimum>NaN</Minimum>
<Maximum>NaN</Maximum>
<ChartAxisScaleBreak>
<Style />
</ChartAxisScaleBreak>
</ChartAxis>
</ChartCategoryAxes>
<ChartValueAxes>
<ChartAxis Name="Primary">
<Style>
<FontSize>8pt</FontSize>
</Style>
<ChartAxisTitle>
<Caption>Axis Title</Caption>
<Style>
<FontSize>8pt</FontSize>
</Style>
</ChartAxisTitle>
<ChartMajorGridLines>
<Style>
<Border>
<Color>Gainsboro</Color>
</Border>
</Style>
</ChartMajorGridLines>
<ChartMinorGridLines>
<Style>
<Border>
<Color>Gainsboro</Color>
<Style>Dotted</Style>
</Border>
</Style>
</ChartMinorGridLines>
<ChartMinorTickMarks>
<Length>0.5</Length>
</ChartMinorTickMarks>
<CrossAt>NaN</CrossAt>
<Minimum>NaN</Minimum>
<Maximum>NaN</Maximum>
<ChartAxisScaleBreak>
<Style />
</ChartAxisScaleBreak>
</ChartAxis>
<ChartAxis Name="Secondary">
<Style>
<FontSize>8pt</FontSize>
</Style>
<ChartAxisTitle>
<Caption>Axis Title</Caption>
<Style>
<FontSize>8pt</FontSize>
</Style>
</ChartAxisTitle>
<ChartMajorGridLines>
<Style>
<Border>
<Color>Gainsboro</Color>
</Border>
</Style>
</ChartMajorGridLines>
<ChartMinorGridLines>
<Style>
<Border>
<Color>Gainsboro</Color>
<Style>Dotted</Style>
</Border>
</Style>
</ChartMinorGridLines>
<ChartMinorTickMarks>
<Length>0.5</Length>
</ChartMinorTickMarks>
<CrossAt>NaN</CrossAt>
<Location>Opposite</Location>
<Minimum>NaN</Minimum>
<Maximum>NaN</Maximum>
<ChartAxisScaleBreak>
<Style />
</ChartAxisScaleBreak>
</ChartAxis>
</ChartValueAxes>
<Style>
<BackgroundGradientType>None</BackgroundGradientType>
</Style>
</ChartArea>
</ChartAreas>
<ChartLegends>
<ChartLegend Name="Default">
<Style>
<BackgroundGradientType>None</BackgroundGradientType>
<FontSize>8pt</FontSize>
</Style>
<ChartLegendTitle>
<Caption />
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
<TextAlign>Center</TextAlign>
</Style>
</ChartLegendTitle>
<HeaderSeparatorColor>Black</HeaderSeparatorColor>
<ColumnSeparatorColor>Black</ColumnSeparatorColor>
</ChartLegend>
</ChartLegends>
<ChartTitles>
<ChartTitle Name="Default">
<Caption>Chart Title</Caption>
<Style>
<BackgroundGradientType>None</BackgroundGradientType>
<FontWeight>Bold</FontWeight>
<TextAlign>General</TextAlign>
<VerticalAlign>Top</VerticalAlign>
</Style>
</ChartTitle>
</ChartTitles>
<Palette>BrightPastel</Palette>
<ChartBorderSkin>
<Style>
<BackgroundColor>Gray</BackgroundColor>
<BackgroundGradientType>None</BackgroundGradientType>
<Color>White</Color>
</Style>
</ChartBorderSkin>
<ChartNoDataMessage Name="NoDataMessage">
<Caption>No Data Available</Caption>
<Style>
<BackgroundGradientType>None</BackgroundGradientType>
<TextAlign>General</TextAlign>
<VerticalAlign>Top</VerticalAlign>
</Style>
</ChartNoDataMessage>
<DataSetName>DataSet3</DataSetName>
<Top>0.59667in</Top>
<Left>0.24667in</Left>
<Height>3.55in</Height>
<Width>4.53667in</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>White</BackgroundColor>
<BackgroundGradientType>None</BackgroundGradientType>
</Style>
</Chart>
<Textbox Name="Textbox2">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=day(DateAdd("d",-1,DateAdd("M",1,cdate(cstr(Month(First(Fields!workday.Value, "DataSet3")) )+"/01/" + cstr(Year(First(Fields!workday.Value, "DataSet3")))))))</Value>
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName>
<Top>4.33833in</Top>
<Left>2.21333in</Left>
<Height>0.25in</Height>
<Width>1in</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Height>4.71333in</Height>
<Style />
</Body>
<Width>5in</Width>
<Page>
<LeftMargin>1in</LeftMargin>
<RightMargin>1in</RightMargin>
<TopMargin>1in</TopMargin>
<BottomMargin>1in</BottomMargin>
<Style />
</Page>
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="DataSource1">
<DataSourceReference>DataSource1</DataSourceReference>
<rd:SecurityType>None</rd:SecurityType>
<rd:DataSourceID>6abd5341-c043-4ab1-b449-c32e00efc4ac</rd:DataSourceID>
</DataSource>
</DataSources>
<DataSets>
<DataSet Name="DataSet1">
<Query>
<DataSourceName>DataSource1</DataSourceName>
<CommandText>SELECT 1 ID, 1 MONTH, 50 VALUE
UNION
SELECT 1 ID, 2 MONTH, 30 VALUE
UNION
SELECT 1 ID, 3 MONTH, 20 VALUE
UNION
SELECT 1 ID, 4 MONTH, 10 VALUE
UNION
SELECT 1 ID, 5 MONTH, 25 VALUE
UNION
SELECT 1 ID, 6 MONTH, 50 VALUE
UNION
SELECT 1 ID, 7 MONTH, 10 VALUE
UNION
SELECT 1 ID, 8 MONTH, 20 VALUE
UNION
SELECT 1 ID, 9 MONTH, 30 VALUE
UNION
SELECT 1 ID, 10 MONTH, 40 VALUE
UNION
SELECT 1 ID, 11 MONTH, 45 VALUE
UNION
SELECT 1 ID, 12 MONTH, 50 VALUE
UNION
SELECT 2 ID, 1 MONTH, 25 VALUE
UNION
SELECT 2 ID, 2 MONTH, 30 VALUE
UNION
SELECT 2 ID, 3 MONTH, 10 VALUE
UNION
SELECT 2 ID, 4 MONTH, 30 VALUE
UNION
SELECT 2 ID, 5 MONTH, 45 VALUE
UNION
SELECT 2 ID, 6 MONTH, 35 VALUE
UNION
SELECT 2 ID, 7 MONTH, 10 VALUE
UNION
SELECT 2 ID, 8 MONTH, 50 VALUE
UNION
SELECT 2 ID, 9 MONTH, 20 VALUE
UNION
SELECT 2 ID, 10 MONTH, 14 VALUE
UNION
SELECT 2 ID, 11 MONTH, 40 VALUE
UNION
SELECT 2 ID, 12 MONTH, 45 VALUE</CommandText>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
</Query>
<Fields>
<Field Name="ID">
<DataField>ID</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="MONTH">
<DataField>MONTH</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="VALUE">
<DataField>VALUE</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
</Fields>
</DataSet>
<DataSet Name="DataSet2">
<Query>
<DataSourceName>DataSource1</DataSourceName>
<CommandText>Select 25000 target</CommandText>
</Query>
<Fields>
<Field Name="target">
<DataField>target</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
</Fields>
</DataSet>
<DataSet Name="DataSet3">
<Query>
<DataSourceName>DataSource1</DataSourceName>
<CommandText>
select 1 id, '03/01/2015' workday , 100 value
union
select 2 id, '03/02/2015' workday , 50 value
union
select 3 id, '03/03/2015' workday , 400 value
union
select 4 id, '03/04/2015' workday , 300 value
union
select 5 id, '03/05/2015' workday , 250 value
union
select 6 id, '03/06/2015' workday , 200 value
union
select 7 id, '03/07/2015' workday , 500 value
union
select 8 id, '03/08/2015' workday , 700 value
union
select 9 id, '03/09/2015' workday , 50 value
union
select 10 id, '03/10/2015' workday , 450 value
union
select 11 id, '03/11/2015' workday , 350 value
union
select 12 id, '03/12/2015' workday , 100 value
union
select 13 id, '03/13/2015' workday , 100 value
union
select 14 id, '03/14/2015' workday , 100 value
union
select 15 id, '03/15/2015' workday , 200 value
union
select 16 id, '03/16/2015' workday , 700 value
union
select 17 id, '03/17/2015' workday , 450 value
union
select 18 id, '03/18/2015' workday , 100 value
union
select 19 id, '03/19/2015' workday , 700 value
union
select 20 id, '03/20/2015' workday , 300 value
union
select 21 id, '03/21/2015' workday , 100 value
union
select 22 id, '03/22/2015' workday , 200 value
union
select 23 id, '03/23/2015' workday , 700 value
union
select 24 id, '03/24/2015' workday , 100 value
union
select 25 id, '03/25/2015' workday , 100 value
union
select 26 id, '03/26/2015' workday , 450 value
union
select 27 id, '03/27/2015' workday , 200 value
union
select 28 id, '03/28/2015' workday , 100 value
union
select 29 id, '03/29/2015' workday , 450 value
union
select 30 id, '03/30/2015' workday , 300 value
union
select 31 id, '03/31/2015' workday , 700 value</CommandText>
</Query>
<Fields>
<Field Name="id">
<DataField>id</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="workday">
<DataField>workday</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="value">
<DataField>value</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
</Fields>
</DataSet>
</DataSets>
<Language>en-US</Language>
<ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
<rd:ReportUnitType>Inch</rd:ReportUnitType>
<rd:ReportID>59e8101c-8585-409d-82e7-c6719e928567</rd:ReportID>
</Report>
Thanks
Prasad
Mark this as Answer if it helps you to proceed on further. -
Linear trend line in ssrs 2008
Hello,
I am looking to add a linear trend line in my report. I am trying to replicate the linear trend line from excel.
The calculated field option like running total, etc isnt getting what we need.
Any thoughts?Hi Ships18,
I have check your snapshot, from the excel, you have the amount in the data field, Date Type field in the "Category groups" and the field(ProductCategory) with the value of DOWNLOAD and UPLOAD in the Series groups, Now the DOWNLOAD need to display
the liner trend line in chart.
We don't have any function to automatically get the Chart like you provided in the excel. Please design the chart manually following the details steps below.
I have tested on my local environment with similar sample data as yours as below and finally got the chart as the excel shows:
Details information below for your reference:
Right click the series group to select the "Series Properties" to get the name of the Series Group like"Chart3_SeriesGroup1"
Follow the step1 in the last reply to modify the expression like below if you want to only show the liner of the download:
=IIF(Fields!ProductCategory.Value="Download",RunningValue(Fields!Amount.Value,Sum,"Chart3_SeriesGroup1"),Nothing)
If you want to show both the liner(DownLoad and Upload), you can use the expression like:
=RunningValue(Fields!Amount.Value,Sum,"Chart3_SeriesGroup1")
If you want to rename the chart Legend you can rignt click it to select the chart and select the "Series Properties"
Add expression in the "Custom Legend text" of the Legend session.
="Liner_"&Fields!ProductCategory.Value
If you still have any problem, please feel free to ask.
Regards,
Vicky Liu
Vicky Liu
TechNet Community Support -
How do I find slope of a waveform
This seems pretty simple but I'm having trouble with this:
I have a waveform that I need to filter to get only a subset of it (I'm ok with that part - using a lib vi), then take that subset, find its slope and intercept, then draw that line on the origninal waveform graph.
On the original waveform I have put in 0s for the first 100 ms of time, on my slope line I need to plug in the zeroed out x values with result of the slope equation.
Any suggestions appreciated.
Mike
Attachments:
JustDoIt.vi 53 KBSlope is defined as dY / dX, where, in this case, your X-axis is time.
You could call it dY / dT.
d represents delta, or the difference between two Y values (or time-values).
Pick two points from your graph - T0,Y0, and T1,Y1
Your slope is (Y1 - Y0) / (T1 - T0)
If you're measuring volts, the slope is in Volts/second.
Simple, right?
The kicker is in picking the points to use. If you pick them close together, you run a larger risk of noise polluting your answer. If you pick them farther apart, you may miss some feature.
In your example data, if you pick T0 = 0.07, and T1 = 0.1, you'll get a negative slope.
If you pick T0 = 0.1 and T1 = 0.2 you'll get a positive slope.
If you pick T0 = 0.1 and T1 = 0.4, you'll get a lower positive slope.
All of them are correct, it depends on what you want to know.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com
Blog for (mostly LabVIEW) programmers: Tips And Tricks -
Poor Processing Performance after Migration from SSRS 2005 to SSRS 2014
Hello all,
a customer is moving from SQL Server 2005 to SQL Server 2014 (clean install on a new machine). There are a lot of reports against an Analysis Services database. I have converted and deployed the reports. Most of them are showing a significant performance
improvement, but some of them became very slow.
Analyzing the report server's execution log I have discovered that the rendering time has increased very much (see picture for a specific report below - above the blue line is SSRS 2005 on an older machine, below is SSRS 2014 on a new machine).
Do you have any hints what I can do?
Thanks in advance and best regards,
GeraldThank you for your reply. Cumulative Update 4 has already been installed (I have just compared the installed version number with the list on
sqlserverbuilds.blogspot.com).
My first suspicion was also a rdl conversion problem. But as even reports with a blank page where showing this rendering performance problem I began to look at the datasets (although they are executed very fast according to the report server's
execution log view).
All MDX queries have been designed using the
Analysis Services MDX Query Designer. The option for not showing empty cells is activated to supress empty rows. But this option always applies to both axes (when usings the query designer). Thus columns for measures with null values in all rows are omitted
from the result set. When rendering a report the rsMissingFieldInDataSet-Error is shown, but in SSRS 2005 and also in the Data Tools for SQL Server 2014 this has no further impact.
But SSRS 2014 is performing very bad in this case. If I remove the NON EMPTY clause for the columns (which only works when switching to the text query builder, so the customer is not able to modify the queries anymore) the report performance will be as expected.
So far there're only two reports left where this does not solve the performance issue.
During testing I have also observered the BIDS - SQL 2008 R2 Warnings not clearing-bug which can be reproduced by everyone except
Microsoft ;)
Regards,
Gerald -
Scripting error when opening Interactive Form
Hi all,
I'm experimenting with adobe interactive forms (in web dynpro), but things aren't going as expected. I'm getting scripting errors when clicking (in Internet Explorer) on a link that opens a view with an interactive form. Please see below for details.
I've found a similar error description /thread/80059 [original link is broken], but the context is different. It seems to be related to namespaces, but I have no idea what I'm doing wrong.
Any help is greatly appreciated!
line 59: 'sapUrDomainRelaxing' is undefined
line 109: Object expected
line 113: Object expected
line 137: 'SSR' is undefined
line59
ur_system = {<<SNIP>>, domainrelaxing: sapUrDomainRelaxing.MINIMAL, <<SNIP>>};
line 109
sapUrMapi_init();
line 113
sapUrMapi_Focus_RegisterCreate('');
if( SSR && SSR.windowManager) SSR.windowManager.hideEventBlocker();
sapUrMapi_initLinkStatus();
line 137
if (SSR.showInfo){ <<SNIP>> }Hello Jeroen and welcome to the SDN!
It seems like an error in the WebDynpro-part, not in the Adobe forms-part. Please check if all your elements (views, windows, controllers, etc.) are in valid namespaces.
Could you try to create an application for the WebDynpro-project in the NDS, and try to <i>deploy new archive and run </i>? Does this work?
Perhaps you could even copy the project, and replace the Adobe Inter Form element by a static text, to test if it is in the WebDynpro part or that it really has something to do with the Adobe.
Good luck,
Jan-Willem Kaagman -
Hi
i have a set of Rectangle2D, and i want to rotate them separatly
when i used g2.rotate(angle), it Concatenates the current rotate with the previous one.
How can appley separate rotation to each rectangle?
please help meeee!i have tried this but it didn't work
can you help me please!
import java.awt.*;
import java.awt.Stroke.*;
import java.applet.*;
import java.applet.Applet;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import java.awt.event.*;
class RectCanvas extends Canvas implements MouseListener {
Applet app;
// The X-coordinate and Y-coordinate of the click.
double xpos;
double ypos;
public void init(Applet app)
setBackground(new Color(165, 215, 220));
this.app=app;
addMouseListener(this);
public void paint(Graphics g)
Graphics2D g2 = (Graphics2D)g;
Color c = new Color(0,120,170); // line color
g2.setPaint(c);
Rectangle2D.Double h_rect = new Rectangle2D.Double(50,50,50,7);
Rectangle2D.Double s_rect = new Rectangle2D.Double(200,200,50,7);
Rectangle2D.Double v_rect = new Rectangle2D.Double(350,350,50,7);
////////////////////////////////////// horizontal line////////////////////////////////////////////////////
if( h_rect.getBounds2D().contains(xpos,ypos) )
g2.drawString("clicked inside h line",70,70);
else
g2.drawString("click out sideh line",10,10);
g2.fill(h_rect);
/////////////////////////////// slope line////////////////////////////////////////////////////////////
if(s_rect.getBounds2D().contains(xpos,ypos) )
g2.drawString("clicked inside slope line",220,220);
else
g2.drawString("click out side line",10,10);
//g2.rotate(45); // it didn't work
g2.fill(s_rect);
//g2.rotate(- 45); // back
///////////////////////////// vertical line/////////////////////////////////////////////////////////////
if( v_rect.getBounds2D().contains(xpos,ypos) )
g2.drawString("clicked inside v line",370,370);
else
g2.drawString("click out side line",10,10);
//g2.rotate(90); // i know that rotate(45) here gives 90 but i have many rect after this, which should be rotated
g2.fill(v_rect);
public void mouseClicked (MouseEvent me) {
// Save the coordinates of the click
xpos = me.getX();
ypos = me.getY();
//show the results of the click
repaint();
public void mousePressed (MouseEvent me) {}
public void mouseReleased (MouseEvent me) {}
public void mouseEntered (MouseEvent me) {
public void mouseExited (MouseEvent me) {
public class Rectangles extends Applet{
RectCanvas canvas;
Panel button_panel;
Button reset;
public void init()
canvas = new RectCanvas();
canvas.init(this);
reset = new Button("Reset");
button_panel = new Panel();
button_panel.setLayout(new BorderLayout());
button_panel.add(reset);
this.setLayout(new BorderLayout());
add("Center", canvas); // to set the animation section location
add("South",button_panel);
} -
What is the best way to create a SSRS 2005 Line Chart Report for a 12 month period?
I'm looking for advice on how to create a SQL Server 2005 query and line chart report for SSRS 2005.
I need to display the peak number of patients assigned to a medical practice each month for a 12 month period based on the end-user selecting a
single month and year.
I've previously created a report that displays all patients assigned to the practice for any single month but I’m looking for advice on how to
how to produce a resultset that shows the peak number of patients each month for a 12 month period. I thought about creating a query that returns the peak count for each month (based on my previously created report which displays all patients assigned to the
practice for any single month) and then use a UNION statement to join all 12 months but I'm sure that isn't the most efficient way to do this. The other challenge with this approach (twelve resultsets combined via a UNION) is that the end-user needs to be
able to select any month and year for the parameter and the report needs to display the 12 month period based on the month selected (the month selected would be the last month of the 12 month period).
For the report I’ve previously created that displays all patients assigned to the practice for any single month, the WHERE statement filters the
resultset on two fields:
Start Date - The date the patient was assigned to the practice. This field is never null or blank.
End Date - The date the patient left the practice. This field can be null or blank as active patients assigned to the practice do not have an End Date. When the patient
leaves the practice, the date the patient left is populated in this field.
Using these two fields I can return all patients assigned to the practice during Nov 2012 by looking for patients that meet the following criteria:
start date prior to 11/30/2012 (using the last day of the month selected ensures patients added mid-month would be included)
AND
end date is null or blank (indicates the patient is active) OR the end date is between 11/1/2012 -11/30/2012 (returns patients that leave during the month
selected)
Regarding the query I need to create for the report that displays the peak count each month for 12 months, I'm looking for advice on
how to count patients for each month the patient is assigned to the practice if the patient has been assigned for several months (which applies to most patients). Examples are:
John Doe has a start date of 6/01/2012 and an End Date of 10/07/2012
Sally Doe has a start date of 8/4/2012 and no End Date (the patient is still active)
Jimmy Doe has a start of 7/3/2012 and an End Date of 9/2/2012
Given these examples how would I include John Doe in the peak monthly count each month for May - October, Sally Doe in the peak monthly count for
August - December and Jimmy Doe in the peak monthly count for July – Sept if the end-user running the report selected December 2012 as the parameter?
Given the example above and the fact I'm creating a line chart I think the best way to create this report would be a resultset that looks like
this:
Patient Name
Months Assigned
John Doe
June 2012
John Doe
July012
John Doe
Aug 2012
John Doe
Sept 2012
John Doe
Oct 2012
Sally Doe
Aug 2012
Sally Doe
Sept 2012
Sally Doe
Oct 2012
Sally Doe
Nov 2012
Sally Doe
Dec 2012
Jimmy Doe
July 2012
Jimmy Doe
Aug 2012
Jimmy Doe
Sept 2012
From the resultset above I could create another resultset that would count\group on month and year to return the peak count for each month:
June 2012 - 1
July 2012 – 2
Aug 2012 - 3
Sept 2012 - 3
Oct 2012 - 2
Nov 2012 - 1
Dec 2012 - 1
The resultset that displays the peak count for each month would be used to create the line chart (month would be the X axis and the count would
be the y axis).
Does this sound like the best approach?
If so, any advice on how to create the resultset that lists each patient and each month they were assigned to the practice would be greatly appreciated.
I do not have permissions to create SPs or Functions within the database but I can create temp tables.
I know how to create the peak monthly count query (derived from the query that lists each patient and month assigned) as well as the line chart.
Any advice or help is greatly appreciated.Thanks for the replies. I reviewed them shortly after they were submitted but I'm also working on other projects at the same time (hence the delayed reply).
Building a time table and doing a cross join to my original resultset gave me the desired resultset of the months assigned between dates. What I can't figure out now is how to filter months I don't want.
Doing a cross join between my original resultset that had two dates:
08/27/2010
10/24/2011
and a calendar table that has 24 rows (each month for a two year period)
my new resultset looks like this:
I need to filter the rows in yellow as the months assigned for stage 3 that started on 8/27/2010 should stop when the patient was assigned to stage 4 on 10/24/2011.
You'll notice that Jan - Sept 2011 isn't listed for Stage 4 assigned on 10/24/2011 as I included a filter in the WHERE clause that states
the Months Assigned value must be greater than or equal to the date assigned value.
Any advice would be appreciated. -
How do you type multiple lines on a path? (label for top slope of bottle)
Ill describe the best I can...
I am making a label that will wrap around the top half of a bottle, the part that slopes to the spout. Because of this, the label is actually shaped more like an arch so when it goes onto the bottle, it will look more straight. The top part of the label of course will be a tighter arch than the bottom half. This is part of why its hard to make things look right. I know I can bend a line at the same angle and type on it and it looks right but I have a paragragh I have to do this with, about 5 lines worth. I dont want to have to make a different path line for each one because that would be a nightmare to get each line perfect with each other. Is there a way to do the "type on a path" to work with multiple lines at once?Scott Falkner wrote:
You can't. Each line of text requires an explicit path. You could draw the top line and the bottom line, then make a three-step blend between the two. Expand the blend then link the paths so that text from path 1 flows to path 2, and so on. In the example below each path is linked to the one below. I only needed to paste text into the top path. I was able to link to each following path by clicking on the red + at the end of the previous path, then clicking on the path below.
You could also design the label flat and use a distortion envelope or Warp effect to bend it. This is how I have done such labels in the past. That method requires more experimentation, but makes edits easier.
That seems to be something that might work out. How do you separate each of the strokes from the blend to make them typable though? -
SSRS 2008 - hide chart lines based on parameter selected
How to control visibility of chart lines based on Params selected by user?
By default, my report display last 3 years worth of data (including current) with Month on the x axis and Counts on the y axis. I have two Boolean parameters:
TwoYrs? T/F
ThreeYrs? T/F
if False is selected for TwoYr and ThreeYr parameters then I want to hide chart lines corresponding to last year and the year before.
What I've tried: Created 3 Series groups with filters. eg. YearSeries1 to return only current year data and applying an expression to display it if params TwoYrs and ThreeYrs = False. and so on for YearSeries2 to return current + last
years data if param TwoYrs is True and ThreeYrs = False. But I don't see where to add expression to control the display of the individual series groups. I am open to any way of doing this, but this seemed most logical.Hi Ok-Hee,
In your Source Query just need to filter the series data based on the Parameters.
I have written sample query below:-
select * from
select 1 monthnumber , 'Jan' MonthName, 2013 year,100 amount
union
select 1 monthnumber , 'Jan' MonthName, 2014 year ,200 amount
union
select 1 monthnumber , 'Jan' MonthName, 2015 year , 300 amount
union
select 2 monthnumber , 'Feb' MonthName, 2013 year, 300 amount
union
select 2 monthnumber , 'Feb' MonthName, 2014 year, 350 amount
union
select 2 monthnumber , 'Feb' MonthName, 2015 year,200 amount
union
select 3 monthnumber , 'Mar' MonthName, 2013 year, 380 amount
union
select 3 monthnumber , 'Mar' MonthName, 2014 year, 100 amount
union
select 3 monthnumber , 'Mar' MonthName, 2015 year, 500 amount
)t
where year in (
select distinct FilterYear from
select case when @TwoYrs=1 then year(getdate())-1 else year(getdate()) end FilterYear
union
select case when @TwoYrs=1 and @ThreeYrs =1 then year(getdate())-2 else year(getdate()) end FilterYear
union
select year(getdate()) FilterYear
) t
I have created one post in my blog , you can check the result.
https://msbitips.wordpress.com/2015/03/12/ssrs-2008-hide-chart-lines-based-on-parameter-selected/
Thanks
Prasad -
Ssrs 2008 r2 straight line within a matrix
In an SSRS 2008 R2 new report have placed a matrix on the end of the report for information the user wants to see at the end of the report. The user wants to place a straight line between the different infomation sections in the tablix. Here are the problems
I am having:
1. In a row I would like to merge 2 cells together so that a line placed within the matrix is the same length. The problem is that I do not know how to merge the cells.
2. When I drag a line into a cell in the matrix, the line is not straight. The line points to an angle. I have tried to change the properties of the line on the endpoint values but that has not worked. Thus can you tell me how to make the line placed within
a matrix cell to be straight?Take a look at this post for inserting a horizontal (or vertical) line into a tablix cell:
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/397d6dc4-766a-43c9-9706-5370a2bfaeb4/insert-line-into-table?forum=sqlreportingservices
For merging cells, you simply select a set of contiguous cells, right-click, merge cells. There is a catch of course. The catch is that all of the cells you are trying to merge must be in the same scope. Below are some screenshots showing a simple Matrix
with 1 column group and 1 row group.
As you can see in this screenshot, I have selected 2 adjacent cells that are both in the same scope, and merge cells is available.
In this screenshot, I have selected 2 adjacent cells that are not in the same scope. The left cell is only scoped by the row group while the cell on the right is scoped by both the row and the column group. As a result, I cannot merge the cells.
"You will find a fortune, though it will not be the one you seek." -
Blind Seer, O Brother Where Art Thou
Please Mark posts as answers or helpful so that others may find the fortune they seek. -
Ssrs 2008 r2 black line incorrectly being displayed
In an existing SSRS 2008 r2 report, I just added a page header so that I can display global values in the page header like run date, run time, and page number. Within the report header, I placed all the report header data within a rectangle. Now when I run
the report, there is a black line appearing after the report header but before the details of the report.
I have changed all the border colors to be white and the borderstyle to none. The black solid line between last part of report header to before the detail data keeps appearing.
Thus can you tell me how to keep this black line from end of pageheader or rectangle to before the detail data from appearing?Hi wendy,
According to your description, I taken a simple test in my local environment (SSRS 2008R2). In my scenario, I insert a page header in the report, then use a rectangle to contain all the items (such as global values) within the page header after creating
a table in the report body. While everything goes well, and there is no such a black line between page header and report body.
As per my understanding, may be you have set the BorderColor property to Black and BorderStyle to Solid of Page header or Rectangle or Report Body. So we can double check those item properties in the report.
If this issue still exists, could you please post the .rdl file and your dataset with sample datato us by the following E-mail address? It is benefit for us to do further analysis.
E-mail: [email protected]
Thanks,
Katherine Xiong
If you have any feedback on our support, please click
here.
Katherine Xiong
TechNet Community Support -
Hi,
I am working on SSRS 2008 R2.
My Colleague gave me one RDL. I have added it to my SSRS project on BIDS & Tried to Open by double-click on that RDL.
I got a popup error saying "Failed to open report 'reports_List.rdl'. clicked on
Details button & noticed error explanation as . "Invalid character in the given encoding. Line 1, position 1".
When i try to View Code of this RDL, I got another error message saying "Exception from HRESULT: 0x80041FEB"
Can anybody suggest me ... what exactly the root cause of it? how can i resolve it ?
thanks a lot in advance !
best regards,
VenkatHi Venkat,
Did you use Visual Studio 2010 on your test? It is a known issue of Visual Studio 2010. Please refer to the following document. It has fix method provided by the Microsoft Web Development Tools team to work around the issue.
https://connect.microsoft.com/VisualStudio/feedback/details/552134/hresult-error-creating-timetracking-sample-web-site-project
Since the issue related to Visual Studio. I suggestion you post the question in the following forum:
http://social.msdn.microsoft.com/Forums/en-US/home?forum=Vsexpressvb
It is appropriate and more experts will assist you.
Regards,
Alisa Tang
Alisa Tang
TechNet Community Support -
How to draw cumulative line graph over the stacked bar chart?(SSRS)
Hello,
I need your help to draw a cumulative line graph over this bar chart.
I need your help to draw a cumulative line graph over this bar chart in SSRS.
The dimension (Category Group) is "Hour" in this case. and expression is sum of two distinct values like 'Y' and 'N' in Activity column(Series Groups). The sum(Activity=Y) in green color and sum(Activity='N') in Red color.
I require to draw a cumulative line graph in this same chart, that should give the result of cumulative Sum(Activity) for each hour?? I mean sum of (Y+N) for each hour and that should be cumulative over the hour.
I mean sum of (Y+N) for each hour and that should be cumulative over the hour.
SSRS Version details:
Microsoft SQL Server Reporting Services Designers
Version 10.50.1600.1
--SivaHi Siva,
It seems that you need to verify your email address to post images, etc
Besides, Microsoft® SQL Server™ 2008 Reporting Services: Step by Step is a good choice to you. With STEP BY STEP, you work at your own pace through hands-on, learn-by-doing exercises. A companion CD includes data sets and sample code. You can download
it from this link http://my.safaribooksonline.com/9780735626041 Click the Extras, you can get the samples and database from Supplemental Content.
And there are vast of valuable articles and SQL Server Reporting Services Books Online in MSDN ,you can click these link to begin your learning journey, SQL Server Reporting Services 2008 Books Online:
http://msdn.microsoft.com/en-us/library/ms159106(v=SQL.100).aspx
Besides these, there are still many valuable videos in Microsoft Webcast, click this link
https://msevents.microsoft.com/cui/SearchDisplay.aspx?culture=en-US#culture=en-US;eventType=0;sortKey=;sortOrder=;pageEvent=false;hdnInitialCount=;searchcontrol=yes;kwdAny=Reporting%20service to register with a windows live ID, then download the ones you
want.
Hope this helps.
Regards,
Charlie Liao
TechNet Community Support -
Show Timestamp on Y axis in a SSRS line chart.
I have a column with datatype as timestamp. And i want to show that column on Y axis in a line chart. two sample values from that column are 03/01/2014 11:30 PM and 03/02/2014 12:10 AM. In this case the data point for first value should be less compare
to the second one, i.e. the series should consider the complete timestamp. Is there a way in SSRS to achieve it.
If I only take the time value from timestamp on Y axis and plot the chart then the data point for 12:10 AM is less than the 11:30 PM, which is not true in this case.
ApoorvaWHi ApoorvaW,
In Reporting Services, if we directly add the Timestamp field to Y Axis, it displays the count values in the line chart. When we modify the expression of the value to [Timestamp], it displays the date value in the Y Axis. Though it displays date type as
the axis label, it represent the complete timestamp.
So in my environment, the timestamp display very well in the line chart. If there are any misunderstanding, please elaborate the issue for further investigation.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support
Maybe you are looking for
-
Printer working Scanner not working after changing to a static ip address
I have an HP 7500A wide format printer. I recently added a second router at my house to extend my wifi signal. After that, the printer kept dropping the network connection. So I set a static ip address of 192.168.1.250 for the printer. Now the ne
-
Exit Code: 6 Please see specific errors and warnings below for troubleshooting. For example, ERROR: DW050 ... Exit Code: 6 Please see specific errors and warnings below for troubleshooting. For example, ERROR: DW050 ... ----------------------------
-
Hi Experts, I encountered a strange scenario, I have created Purchase Requisition and taking reference of that PR I created Purchase order. Now the problem is in S_alr_87013558 Report, Commitments are showing as total value of PR + P
-
[CS3/4] activeBook does not point to "active Book"
Is it me misunderstanding something, or is the "activeBook" property broken? Found out the hard way today that "app.activeBook" does *not* point to the, erm, 'active' book. Or maybe I don't understand what makes it the active one ... Remember, Books
-
I do not get a picture on my phone all I want know is where Ican send it to be repaired