Is there anyway to do a simple line chart that compares 5 fields? For
example, X axis shows fieldA, fieldB, fieldC, etc where Y axis is the value.
I'm having such a hard time with this, the report keeps wanting to take the
Sum or Count (aggregate) of fields. The values don't need summed, they're
already contained in the fields. Please help.
Thanks,
RyanHello Ryan,
I would like to know how you use the SQL Statement to get the dataset.
Also, please give me some sample data.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||2 Tables
table_items
item_id (PK)
item_name
table_values
value_id (PK)
year
actual_amount
item_id (FK)
SQL statement used for the dataset (for years 2002-2004 for example)
(the embedded selects are because some items will not have a row for years,
this puts a 0 value in for those years)
SELECT A.item_id, A.item_name, ISNULL
((SELECT actual_amount
FROM dbo.amounts
WHERE (item_id = A.id) AND (year = 2002)),
0) AS [2002 Actual], ISNULL
((SELECT actual_amount
FROM dbo.amounts AS amounts_5
WHERE (item_id = A.id) AND (year = 2003)),
0) AS [2003 Actual], ISNULL
.....
ETC.
The SQL resultset looks like this:
item_id
item_name
2002 Actual
2003 Actual
2004 Actual
Each item (detail row) is displayed on it's own page. I want each item to
have it's own graph. Just a simple line graph in this example would display
on the X-axis 2002 Actual, 2003 Actual, and 2004 Actual.
Probably too much info for a simple problem but there it is!
Thanks!
Ryan
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message
news:HQcIY19CIHA.360@.TK2MSFTNGHUB02.phx.gbl...
> Hello Ryan,
> I would like to know how you use the SQL Statement to get the dataset.
> Also, please give me some sample data.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Hello Ryan,
I suggest you just use another dataset for the chart.
Since the chart is based on the dataset's column and you could not put
multiple columns into the X Axis, you need to use another dataset like this:
item_id, item_name, Actual value, Year.
So that when you put the Year into the X axis, you could get the result you
want.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hmmm, this looks good. The problem though is that the last year in the
chart is a different field. For example:
[2006 Actual], [2007 Actual], [2008 Budget].
The last year draws from a Budget field and not the Actual field.
Looks like this may not be doable. We did have the chart in Microsoft
Access. I may have them use that or see if there's any way to accomplish
this in Crystal Reports (I need something I can build into my VS project).
Thanks,
Ryan
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message
news:7$yFzgvDIHA.5256@.TK2MSFTNGHUB02.phx.gbl...
> Hello Ryan,
> I suggest you just use another dataset for the chart.
> Since the chart is based on the dataset's column and you could not put
> multiple columns into the X Axis, you need to use another dataset like
> this:
> item_id, item_name, Actual value, Year.
> So that when you put the Year into the X axis, you could get the result
> you
> want.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Hello Ryan,
If you are using VS 2005, you could use the ReportViewer Control to
complish this report in the WinForm or Web Form.
Reporting Services and ReportViewer Controls in Visual Studio
http://msdn2.microsoft.com/en-us/library/ms345248.aspx
Hope this helps.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment