Showing posts with label dates. Show all posts
Showing posts with label dates. Show all posts

Saturday, February 25, 2012

Charts and Graphs Question

I have a chart that has dates list on the x axis in a horizontal fashion. I
would like to change them to be vertical. Can anyone tell me how todo this'
Thanks,Andy,
I don't think you can set it, it seems to be automatic. If the dates
don't fit horizontally, it turns them for you.
The only thing you can affect is the data labels inside the chart area.
Chris
Andy Jones wrote:
> I have a chart that has dates list on the x axis in a horizontal
> fashion. I would like to change them to be vertical. Can anyone tell
> me how todo this'
> Thanks,

Charting simple value over time chart problems.

I am using Visual Studio Academic version 2002.

I have a simple table with dates and values that correspond to those dates and I would like to chart it using crystal reports. I have created a new report and pulled in the 2 columns from the table.

Now I am lost. When ever I try to do a chart it only gives me the option to continue if I select the "show value and select a field". Thats fine and dandy but when I select a field under any chart type or any chart option it always says "Count of <fieldname>" which is totally wrong.

I only want

for each x value show a y value. (basically like a stock ticker)

This is incredibly frustrating since this is the simplest graph type I can imagine and it just completely is not user friendly for it. Any help would be hugely appreciated.

Thank you.Btw, I downloaded the latest version of crystal reports and it does the same thing.

So obviously I just have no clue how to do this type of chart.

The "do not summarize" button is PERMA disabled, so no matter what field I select in the "Show Values" area, they are always Counted instead rather than just showing the value.

I am puting the date field in the "on Change of" column.

and the corresponding value in the "Show value(s)" column, but again in the show value(s) column it always Counts them rather than just displaying the value.

I tried inverting the selection with putting the value field in the "on change of" and the date field in the "show values" column with erradic results.

Can this type of simple graph even be created in crystal??|||Well now I know what the problem is. Called the company and they said that only the advanced developer version of crystal reports gives the functionality to not summarize the selected values with VS.net.

This is also the same case with the downloadable evaluation versions of their software.

Personally that makes me so annoyed I just won't recommend the product as our reporting solution. If I cannot even show my boss a working example of what types of charting and reports we will be getting with the product, there is no way I am going to even try to sell it to them because the software hasn't even sold me.|||After thinking about this, I came to the conclusion that the sales lady I spoke with must have been smoking crack.

I called Crystal again, went through an hour hugabaloo to get to a tech support guy to finally get the real answer.

The "don't summarize field" works with formulas. So that if you want to create a simple x, y graph, you must create a formula to show the value of the y field.

Don't worry you are not really creating a formula and changing the value at all, it is just the stupid interface they have for their 3rd party charting tool. So, you just have to jump through their hoops to get your work done. It is not intuative at all, but it works and luckily it is simple to do.

So

Task 1: create your report,

Task 2: before you add a chart to it, click on the solution explorer and select formula fields. Right click and select -> New

Task 3: Select the field you want to display as the y value from the database connection explorer and double click on it. This will move something like { <field name> } into the textbox at the bottom of the formula form. Leave it like that. Save and close the formula dialog box.

Task 4: Add a chart to your report.
-In the data fields (you should see your new formula field in the data field there with what ever name you named it when you saved it), select your x value (field) in the top list box that has the drop down that says "On Change of".

-Then select the formula field for the bottom list box that says "show value(s)". The don't summarize button now becomes upchecked if you needed it to be, and your chart should display something near correctly at this point.

There you go.|||I've got exactly the same problem. I tried your solution but that doesn't work.. the don't summarize button is still disabled.

I'm using Visual Studio .Net 2003

Do you have any idea why the charts' not working?|||for wwater:
Make sure that you select an item in the Show Values list box, otherwise the "Don't Summarize Values" option will be greyed out. Took me a while to cotton on to how that area works - not very untuitively, as it happens!

And of course "Don't Summarize Values" won't be enabled if the field you have selected is a "Sum of Group xxxx" type field, because you can't un-sum a summing operation.....:-))

Dave|||When I select the formula field (Y) in the Show Value's list box, the "Don't Summarize Values" option is still disabled..
The chart gives always a Y value of 1 for each X value, that is totaly wrong according to the table..|||might pay you to check Crystal Support site re evaluation precedence, because some formulae are evaluated on first poass thru report, and others are done on second pass, and depending what type of formula and where it is (detail vs group) can impact on this.

MOre info on actual formula, whether it's SUM, running total, etc etc, and where it's placed may help.

Dave|||might pay you to check Crystal Support site re evaluation precedence, because some formulae are evaluated on first poass thru report, and others are done on second pass, and depending what type of formula and where it is (detail vs group) can impact on this.

MOre info on actual formula, whether it's SUM, running total, etc etc, and where it's placed may help.

Dave
hey can u help me fix my project in vb.net...please lemme know if u can help ...i would b very thankful if u could help me...please reply soon...
thanks
shruti.|||I found out why charts didn't work. I did not found a direct solution, but i did found a way to work around the problem.

Instead of making a Blank Report, choose the Report Expert and insert the Chart. Then the chart works..

wil.

Chart warning when "time-scaled values" is enabled.

I have a line chart with an x-axis of dates. When I enable "time-scaled
values" on the x-axis of the chart properties, I get this warning and the
chart does not graph the data properly.
"The sorting applied to the category grouping of the chart â'chart2â' is
different from the grouping expression."
If I disable "time-scaled values" the chart graphs the data properly, but
then I see way too many date labels on the x-axis that makes it unreadable.
Does anyone know how to resolve the above warning and still get the same
readability on the x-axis?You can ignore this particular warning. It should not be shown when
time-scaled values is selected.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jeff" <Jeff@.discussions.microsoft.com> wrote in message
news:8344F12E-2AB5-4341-8FF3-46A553E2B242@.microsoft.com...
> I have a line chart with an x-axis of dates. When I enable "time-scaled
> values" on the x-axis of the chart properties, I get this warning and the
> chart does not graph the data properly.
> "The sorting applied to the category grouping of the chart 'chart2' is
> different from the grouping expression."
> If I disable "time-scaled values" the chart graphs the data properly,
> but
> then I see way too many date labels on the x-axis that makes it
> unreadable.
> Does anyone know how to resolve the above warning and still get the same
> readability on the x-axis?
>|||I noticed the warning on some of the Microsoft created reports that are
similar to mine, but the chart in my report does not graph the data
correctly. Instead of a slow growth curve, I get what looks like a toddler
scribbled on my graph. If I disable "time-scaled values" then the data
graphs properly, but then the x-axis is unreadable due to the numerous
samples of data.
"Robert Bruckner [MSFT]" wrote:
> You can ignore this particular warning. It should not be shown when
> time-scaled values is selected.
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Jeff" <Jeff@.discussions.microsoft.com> wrote in message
> news:8344F12E-2AB5-4341-8FF3-46A553E2B242@.microsoft.com...
> > I have a line chart with an x-axis of dates. When I enable "time-scaled
> > values" on the x-axis of the chart properties, I get this warning and the
> > chart does not graph the data properly.
> > "The sorting applied to the category grouping of the chart 'chart2' is
> > different from the grouping expression."
> > If I disable "time-scaled values" the chart graphs the data properly,
> > but
> > then I see way too many date labels on the x-axis that makes it
> > unreadable.
> > Does anyone know how to resolve the above warning and still get the same
> > readability on the x-axis?
> >
>
>|||If time-scaled is turned OFF, you have to add an explicit sorting expression
on the chart category groups. The sorting has to be identical to the
grouping expression. Then the data will be sorted and you will get a slow
growth curve.
You can solve the issue with too many labels on the x-axis by setting the
x-axis MINOR interval value to e.g. 5 (i.e. one label per 5 categories /
data samples).
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jeff" <Jeff@.discussions.microsoft.com> wrote in message
news:7BED67CB-B8E0-4D08-8F80-CB4DD2463EF7@.microsoft.com...
> I noticed the warning on some of the Microsoft created reports that are
> similar to mine, but the chart in my report does not graph the data
> correctly. Instead of a slow growth curve, I get what looks like a
> toddler
> scribbled on my graph. If I disable "time-scaled values" then the data
> graphs properly, but then the x-axis is unreadable due to the numerous
> samples of data.
> "Robert Bruckner [MSFT]" wrote:
>> You can ignore this particular warning. It should not be shown when
>> time-scaled values is selected.
>> -- Robert
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "Jeff" <Jeff@.discussions.microsoft.com> wrote in message
>> news:8344F12E-2AB5-4341-8FF3-46A553E2B242@.microsoft.com...
>> > I have a line chart with an x-axis of dates. When I enable
>> > "time-scaled
>> > values" on the x-axis of the chart properties, I get this warning and
>> > the
>> > chart does not graph the data properly.
>> > "The sorting applied to the category grouping of the chart 'chart2'
>> > is
>> > different from the grouping expression."
>> > If I disable "time-scaled values" the chart graphs the data properly,
>> > but
>> > then I see way too many date labels on the x-axis that makes it
>> > unreadable.
>> > Does anyone know how to resolve the above warning and still get the
>> > same
>> > readability on the x-axis?
>> >
>>

Sunday, February 19, 2012

Chart Axis Scaling - labelling every 5 points

Hi,
I have alot of trend data to display on a chart. The x-axis is used for
dates. However not only dont I need to display all the labels but they
clutter the chart.
Is there a way of only displaying every 5th date?
I tried using the following expression for the label colour but it didnt
work:-
=Iif(RowNumber("OrderDetail") Mod 5, "Black", "White")
Many thanks in advance for any help,
Steve.Please see this related posting:
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=05353b5e-f780-406c-9da8-cd4a26bc8e09&sloc=en-us
In your case you should set the major interval of the x-axis to 5 (i.e.
interval of 5 days)
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"fisab" <fisab@.discussions.microsoft.com> wrote in message
news:AFEE1ACE-4CAD-4682-99BF-AD7872CAE024@.microsoft.com...
> Hi,
> I have alot of trend data to display on a chart. The x-axis is used for
> dates. However not only dont I need to display all the labels but they
> clutter the chart.
> Is there a way of only displaying every 5th date?
> I tried using the following expression for the label colour but it didnt
> work:-
> =Iif(RowNumber("OrderDetail") Mod 5, "Black", "White")
> Many thanks in advance for any help,
> Steve.
>|||Thanks. Appreciate the help.
"Robert Bruckner [MSFT]" wrote:
> Please see this related posting:
> http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=05353b5e-f780-406c-9da8-cd4a26bc8e09&sloc=en-us
> In your case you should set the major interval of the x-axis to 5 (i.e.
> interval of 5 days)
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "fisab" <fisab@.discussions.microsoft.com> wrote in message
> news:AFEE1ACE-4CAD-4682-99BF-AD7872CAE024@.microsoft.com...
> > Hi,
> > I have alot of trend data to display on a chart. The x-axis is used for
> > dates. However not only dont I need to display all the labels but they
> > clutter the chart.
> > Is there a way of only displaying every 5th date?
> > I tried using the following expression for the label colour but it didnt
> > work:-
> > =Iif(RowNumber("OrderDetail") Mod 5, "Black", "White")
> >
> > Many thanks in advance for any help,
> >
> > Steve.
> >
>
>

Sunday, February 12, 2012

Char to smalldatetime

SQL Server 2000

Used to know how to do this but am having no luck today. I have data coming in from a .txt file that gives me char strings for dates, e.g. 02242003 for Feb. 2, 2003.

Need to whomp this into small datetime with the whole convert/cast thing but I guess I've previously only gone the other way--smalldatetime to char.

Thanks!!!declare @.dString char(8)
set @.dString = '02242003'
select cast(substring(@.dString, 5, 4) +
substring(@.dString, 1, 4) as smalldatetime)|||Ok, that's a good step in the right direction. Now, how do I get the result to be 02/24/2003?

Tried Convert(smalldatetime, cast(substring(@.dString, 5, 4) +
substring(@.dString, 1, 4) as smalldatetime), 101) and it barked at me.|||declare @.dString char(8)
set @.dString = '02242003'
select CONVERT(varchar,cast(substring(@.dString, 5, 4) +
substring(@.dString, 1, 4) as smalldatetime),101)|||Brett,

Sorry for not getting back to you. Thanks mucho! This was exactly what I needed.

One bright spot in a lot of messy T-SQL writing!