473,387 Members | 3,684 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

vb.net 2005 Reportviewer charting

Hi All

I want to create a Column chart showing total number of appointment hours
per staff member
Along side each bar I want to show another series of total number of
working hours per staff member

When I try to drop the 'total' datafield from the 2nd data adaptor
(HaircutsDataSet_Staffrostergraph) on to the 'Series' area on the graph I
get the message
'Cannot add a field from the dataset "HaircutsDataSet_Staffrostergraph to a
dataregion which uses the dataset HaircutsDataSet_Staffappointmenthours"

What am I doing wrong??

regards
Steve

Code....

mystarttime = dtfrom.Value
myendtime = dtto.Value.AddDays(1)

sql = "SELECT SUM(DATEDIFF(hour, a.mytime, a.endtime)) AS total, s.username
"

sql &= "FROM Appointments a INNER JOIN "

sql &= "Staff s ON a.staffnumber = s.staffnumber "

sql &= "WHERE a.myDate < '" & Format(myendtime, "MMM d, yyyy") & "' AND
a.myDate >= '" & Format(mystarttime, "MMM d, yyyy") & "' "

sql &= "GROUP BY s.username"

dtsales = getdata(sql)

sql = "SELECT SUM(DATEDIFF(hour, sr.mystarttime, sr.myendtime)) AS total,
s.username "

sql &= "FROM staffrosterdetail sr INNER JOIN "

sql &= "Staff s ON sr.staffnumber = s.staffnumber "

sql &= "WHERE sr.myDate < '" & Format(myendtime, "MMM d, yyyy") & "' AND
sr.myDate >= '" & Format(mystarttime, "MMM d, yyyy") & "' "

sql &= "GROUP BY s.username"

dtworkinghours = getdata(sql)

ReportViewer1.LocalReport.DataSources.Add(New
Microsoft.Reporting.WinForms.ReportDataSource("Hai rcutsDataSet_Staffappointmenthours",
dtsales))

ReportViewer1.LocalReport.DataSources.Add(New
Microsoft.Reporting.WinForms.ReportDataSource("Hai rcutsDataSet_Staffrostergraph",
dtworkinghours))

ReportViewer1.LocalReport.ReportPath = reportpath &
"Staffappointmenthours.rdlc"
Jun 2 '07 #1
3 6092
Hi Steve,

From your description, you're encountering some problem when try draging
two table's fields onto a chart report item inside a VS 2005 client
report(for reportviewer), correct?

According to the steps you mentioned, I think the problem here is due to
the SQL Server SSRS client report (also server report) only allow a single
dataset bound to a given report Item(such as Table, Chart ......). The
"DataSet" here is the SSRS specific dataset rather than .NET ADO.NET
dataset. You can think the "dataset" here a "resultset".

Therefore, for your scenario, if you want to display info on a single chart
from multiple resultset (from backend data storage's perspective), I
suggest you consider use a View to merge the columns in the two resultset
so that bind a single resultset(table in .net dataset) to the chart.

How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 4 '07 #2
Steven

Spot on

I have now combined the different datatables in to 1 and all works fine

Regards
Steve

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:5$**************@TK2MSFTNGHUB02.phx.gbl...
Hi Steve,

From your description, you're encountering some problem when try draging
two table's fields onto a chart report item inside a VS 2005 client
report(for reportviewer), correct?

According to the steps you mentioned, I think the problem here is due to
the SQL Server SSRS client report (also server report) only allow a single
dataset bound to a given report Item(such as Table, Chart ......). The
"DataSet" here is the SSRS specific dataset rather than .NET ADO.NET
dataset. You can think the "dataset" here a "resultset".

Therefore, for your scenario, if you want to display info on a single
chart
from multiple resultset (from backend data storage's perspective), I
suggest you consider use a View to merge the columns in the two resultset
so that bind a single resultset(table in .net dataset) to the chart.

How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.

Jun 4 '07 #3
Thanks fine:)

Have a nice day!

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 5 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: DG | last post by:
is there a charting control that comes with visual studio or i'll have to buy one? what do you reccomend? thanx
1
by: SQLJunkie | last post by:
Hi, I have installed SQL 2005 RTM on a new server and I keep getting this error (described below) quite frequently. Was wondering if anyone has a clue on what's happening here. I tried googling...
1
by: Erik | last post by:
I'm trying to get the VS 2005 ReportViewer (not crystal reports) to work in a windows form application. This is my small test project: - Created a windows form application - Added new item to...
1
by: steve | last post by:
Hi All I need help on how to manipulate the data returned from the database for displaying in the new reportviewer at runtime So far I have an rdlc file with a dataset, binding source and...
1
by: iThinkData | last post by:
Should these 3 items, .Net 2.0 Website, SQLServer 2005, Reporting Services 2005. all reside on the same computer? I know that the website issues a configuration error saying it can't find...
0
by: Rich | last post by:
Hello, I started using the Reportviewer control (very nice) for generating Reporting Services type reports in my VB2005 app. I have been experimenting using a designer Reportviewer control from...
20
by: Joe | last post by:
Is any one charting packing considered to be the "best"? We've used ChartFX but wasn't too happy about the way data had to be populated along with some other issues which slip my mind right now and...
3
by: Blasting Cap | last post by:
I'm using VS 2005, SQL 2005 reporting services. SQL reporting services is working, and I have it both on my local computer, as well as on a server. I've created a report in the SQL Business...
5
by: =?Utf-8?B?Y2hlY2tyYWlzZXJAY29tbXVuaXR5Lm5vc3BhbQ== | last post by:
I have a VS 2008 ASP.NET webform that has a reportview tag on it, accessing an .RLDC report in local report. The columns for the report are essentially: Month Item #1 Item#2 Item#3 ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.