Showing posts with label chaging. Show all posts
Showing posts with label chaging. Show all posts

Wednesday, March 7, 2012

Chaging the Min and Max Scale of a Chart at run time

I have a stored procedure which will bring me back the Min, Max and Mean of different result sets. What I want to do with the Y-Axis is set the Min scale value of the chart to be Min -%5 and the Max scale value to be Max + 5%.

Is there a way to change the Y-Axis values at report run time without spitting my own RDL?

In RS 2005, the Min/Max/CrossAt/MajorInterval/MinorInterval settings can be expression based. Note that by using an aggregate function such as first you can even reference certain values from another dataset than the chart is bound to. For example, you could use an expression similar to:

=CDbl(First(Fields!MinValue.Value, "StoredProcDataset")) - 0.05

-- Robert

|||That's great Robert but it's not apparent seeing that it doesn't follow the usual standard of having the combo box with the <expression> as a selection. Worked for me though and I thank you.|||

Hi!

I want to change my y-axis into always showing integers, start with zero and show an y-axis longer than the maximum value of the points.
How do I do that in csharp?

My code is like this now: (Chart looks ok for values between 0 and 25, but makes a chart with a max value 1 have an Y axis that is divided into 0.1 and up to 1.0 ):

chartGraf.Axis.Y.TickmarkStyle = AxisTickStyle.Smart;

chartGraf.Axis.Y.LineThickness = 1;

chartGraf.Axis.Y.RangeMin = 0;

if ( MyMaximumValue < 3) {

chartGraf.Axis.Y.RangeMax = 3;

}

-Heidi

Chaging the Min and Max Scale of a Chart at run time

I have a stored procedure which will bring me back the Min, Max and Mean of different result sets. What I want to do with the Y-Axis is set the Min scale value of the chart to be Min -%5 and the Max scale value to be Max + 5%.

Is there a way to change the Y-Axis values at report run time without spitting my own RDL?

In RS 2005, the Min/Max/CrossAt/MajorInterval/MinorInterval settings can be expression based. Note that by using an aggregate function such as first you can even reference certain values from another dataset than the chart is bound to. For example, you could use an expression similar to:

=CDbl(First(Fields!MinValue.Value, "StoredProcDataset")) - 0.05

-- Robert

|||That's great Robert but it's not apparent seeing that it doesn't follow the usual standard of having the combo box with the <expression> as a selection. Worked for me though and I thank you.|||

Hi!

I want to change my y-axis into always showing integers, start with zero and show an y-axis longer than the maximum value of the points.
How do I do that in csharp?

My code is like this now: (Chart looks ok for values between 0 and 25, but makes a chart with a max value 1 have an Y axis that is divided into 0.1 and up to 1.0 ):

chartGraf.Axis.Y.TickmarkStyle = AxisTickStyle.Smart;

chartGraf.Axis.Y.LineThickness = 1;

chartGraf.Axis.Y.RangeMin = 0;

if ( MyMaximumValue < 3) {

chartGraf.Axis.Y.RangeMax = 3;

}

-Heidi

Saturday, February 25, 2012

Chaging SSN Format

This is a repost due to know response:
If I use this formula:
SELECT LEFT(ssnum, 3) + '-' + SUBSTRING(ssnum, 4, 2) + '-' + RIGHT(ssnum, 4)
as SSN, Clients.First_Name + ' ' + Clients.Last_Name
FROM Clients
It recodes the SSN as I need it. How do I get this result to the UPDATE
function inside the main db?
Possibly:
Update Clients
Set LEFT(ssnum, 3) + '-' + SUBSTRING(ssnum, 4, 2) + '-' + RIGHT(ssnum, 4)
I tried that code but get a syntax error. Any ideas?> Possibly:
> Update Clients
> Set LEFT(ssnum, 3) + '-' + SUBSTRING(ssnum, 4, 2) + '-' + RIGHT(ssnum,
> 4)
Try:
UPDATE dbo.Clients
SET ssnum = LEFT(ssnum, 3) + '-' + SUBSTRING(ssnum, 4, 2) + '-' +
RIGHT(ssnum, 4)
However, I generally suggest storing unformatted data and instead format
strings in the application/report during presentation
Hope this helps.
Dan Guzman
SQL Server MVP
"JOHN HARRIS" <harris1113@.fake.com> wrote in message
news:E9C89F84-1950-4670-A852-49033092BD83@.microsoft.com...
> This is a repost due to know response:
> If I use this formula:
> SELECT LEFT(ssnum, 3) + '-' + SUBSTRING(ssnum, 4, 2) + '-' + RIGHT(ssnum,
> 4)
> as SSN, Clients.First_Name + ' ' + Clients.Last_Name
> FROM Clients
> It recodes the SSN as I need it. How do I get this result to the UPDATE
> function inside the main db?
> Possibly:
> Update Clients
> Set LEFT(ssnum, 3) + '-' + SUBSTRING(ssnum, 4, 2) + '-' + RIGHT(ssnum,
> 4)
> I tried that code but get a syntax error. Any ideas?