473,782 Members | 2,487 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ReportViewer: DataSource issue with Subreports

Hi, I posted an issue previously that was entirely accurate.

I have a master report called "MasterReport.r dlc" and a subreport
called "Subreport.rdlc ". MasterReport.rd lc has a single subreport
with name Subreport and refers to Subreport.rdlc. I add a data source
in the VS 2k5 report environment to Subreport.rdlc. This data source
has name "SubreportI nfo" and is an object of type SubreportInfo.

First, say I set my ReportViewer.Lo calReport.Repor tPath to
Subreport.rdlc and add the following code to my form load function,
right before ReportViewer.Re freshReport:

ReportDataSourc e SubreportDataSo urce;
BindingSource SubreportBindin gSource = new BindingSource() ;
SubreportDataSo urce = new ReportDataSourc e("SubreportInf o",
SubreportBindin gSource);
ReportViewer.Lo calReport.DataS ources.Add(Subr eportDataSource );
SubreportBindin gSource.DataSou rce = SubreportInfo;

When I compile and run, this displays just fine. Now let's say I set
my ReportViewer.Re portPath to "MasterReport.r dlc" and make
Subreport.rdlc blank (with no data sources). This will also compile
and display fine. But if I put the data source back in Subreport.rdlc
as described above, and add another line of code to link the following
event to ReportViewer.Lo calReport.Subre portProcessing:

void SubreportProces sing(object sender, SubreportProces singEventArgs
e)
{
e.DataSource.Ad d(SubreportData Source);
}

I will have, upon running, a report that says nothing but "Error:
Subreport could not be displayed".

What am I missing?

Thank you very much,
Brandon

Apr 26 '07 #1
0 11606

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

Similar topics

4
4475
by: dgk | last post by:
VS2005. I've spent two days trying to figure out how to do a simple master/detail report using ReportViewer and am just about ready to punt. This is something that really should have been drag/drop/relationship but no. I've finally figured out that I need to use a subreport but I can't figure out how to set the datasource of the localreport object since it only seems to want a datatable and I have a function that is returning a list (of...
0
1426
by: Henry Seymour | last post by:
I need to read data from an SQLServer , massage it, and output it to a temporary dataset for ReportViewer/Chart to use. a. The incoming and outgoing datasets do not look alike. Therefore, I think that I need to create a dataset/table, within the code, for the ReportViewer/Chart. b. I can't specifiy the outgoing dataset within the DataSource window and tie it to the ReportViewer because it doesn't exist.
1
15867
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 Tableadapter as created by the wizard and all work fine However I want to be able to change the displayed report at runtime when the user selects a different report type from a combobox but am unsure how to do
1
17957
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 control. The help files state that in the form the contains the reportviewer control there is a tasks smart tags panel in design view. I don't see any such thing. Where do I need to look to see this panel? So I have been trying to follow...
0
2011
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 the toolbox - created at design time - (VB2005) and also creating a Reportviewer control at runtime on the fly. The runtime Reportviewer will populate/display data with a runtime dataAdapter, but the designer Reportviewer from the toolbox is...
0
1522
by: billygotee | last post by:
Hi, I'm having an issue with VS .NET 2k5. I have a master report that is the parent of several subreports (the report got too big to keep it all in the same report). For a while this worked fine, the BuildAction property of each was set to Embedded Resource, and the subreport name was all I needed to change in the master report for each to be displayed (I handled the SubreportProcessing event to deal with data sources).
10
3767
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 datasource. I would like to use an existing class object. The examples I have found state that the class should be in the App_Code folder. However a WAP does not have an App_Code folder. Is there any way to specify a datasource for a local report in a...
7
10769
by: AG | last post by:
I am using a ReportViewer control in an ASP.NET 2.0 WAP aspx page in remote processing mode. The report server is on a shared web host. Can anyone tell me or point me to an example of how to pass user name and password to the report server via the ReportViewer control? --
1
9492
by: gandhi.vishal | last post by:
Hello, I have an issue. I'm not seeing the reportviewer data at all. The column names come up fine but there is no data in the report table. Here is what I'm doing I created a dataset with the following query select * from av_project_mst where apm_project_id=@projectid Now I created a report (.rdlc) and dragged a table onto it and the report looks like the following
0
9639
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8967
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7492
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6733
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5509
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4043
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3639
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2874
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.