473,385 Members | 1,402 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,385 software developers and data experts.

Reportviewer

Afternoon.

Having a bit of a problem with the ReportViewer that comes with VS2005.
I'd like to generate reports based on a collection of a object. Here is
the source;

public class DataColl
{
List<DataXList;
public DataColl()
{
List = new List<DataX>();
List.Add(new DataX(3, "RIO"));
List.Add(new DataX(66, "RCU"));
List.Add(new DataX(999, "COP"));
}
}

public class DataX
{
private int index;
private string name;
public DataX(int i, string n)
{
index = i;
name= n;
}
public int Index { get { return index;} }
public string Name { get { return name;} }
}

Have created an Report document (.rdlc) and tried adding both DataX and
DataColl as Data source to the report. In the report I've currently
setup a table with two columns with expressions =Fields!Index.Value and
=Fields!Name.Value.

I've used this code to init the report:

private void Report_Load(object sender, EventArgs e)
{
DataColl collection = new DataColl();
DataX d1 = new DataX(1, "TEST");

ReportDataSource reportdatasource = new ReportDataSource();
reportdatasource.Name = "_TEST_";
reportdatasource.Value = d1; // Exception (see below)

reportViewer1.ProcessingMode = ProcessingMode.Local;
reportViewer1.LocalReport.DataSources.Add(reportda tasource);
reportViewer1.RefreshReport();
}

When running the code I get the error below when trying to add DataX as
the reportdatasource value. Have also tried using DataColl as
datasource but get the same error.
ArgumentExcpetion was not handled (Value does not fall within the
expected range).

I'm stuck at the moment and was hoping for some assistance.

Dec 15 '06 #1
0 2674

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

Similar topics

2
by: Fabio Pagano | last post by:
I was wondering why is there so little interest on the reportviewer control and the report designer integrated in VS 2005. It seems very cool and i think it can replace Crystal Reports. Moreover,...
1
by: Pieter | last post by:
Hi, In my application VB.NET 2005 application I placed a ReportViewer, and link it to a server-report: Me.ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote...
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...
4
by: Sevu | last post by:
I am working with ASP.NET.I am using ReportViwer Control to show my report.I like to add dropdownlist with in the reportviewer control. ( Not top to the control some thing like that).I need to...
1
by: Rich | last post by:
Hello, I am trying to use the Reportviewer control. I have been following an example from the web, and the instructions from the help files on set up a ..rdlc and binding it to the reportviewer...
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...
0
by: Fred G. Sanford | last post by:
Firstly, I am a fairly new .Net developer, so please excuse any dumb/ignorant questions or comments. Thanks. I created a VWD Express project, which uses the ReportViewer control, on my local...
0
by: billygotee | last post by:
Hi, I posted an issue previously that was entirely accurate. I have a master report called "MasterReport.rdlc" and a subreport called "Subreport.rdlc". MasterReport.rdlc has a single subreport...
10
by: AG | last post by:
I am trying to use a ReportViewer control in a VS 2005 web application project (not Website project). When I try to create a new report (local), I can't seem to find any method to create a...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: 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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.