472,989 Members | 2,890 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

LocalReport: Object-in-Object as DataSource not working?

Hi,

I have a Report (VB.NET 2005), and I'm using Objects as DataSource.

I have the object objCompany, which contains a public property MyAdress
(instance of objAdress). objAdress has a propert Street.

When I add objCompany as a DataSource, I want to be able to show the
Street-property of MyAdress. So I do a drag-and-drop of that property from
the Data Sources - Window to the Report. Everything seems fine: I get a
textbox on my report with Value "=First(Fields!Street.Value,
"MyApplication_objCompany")".

But when I run the report, it doesn't show any value in it...

Does anybody knows why this happens? I somehow think because of the fact
that Street isn't directly on MyApplication_objCompany, but when I change it
into MyApplication_objCompany_MyAdress is complains about the fact that it
doesn't exist...

How should I do this?

Thanks a lot in advance,

Pieter
Jun 7 '06 #1
1 1661
I found the solution here for nested objects and reporting services
localreport in the reportviewer:

http://www.gotreportviewer.com/objec...ces/index.html

Apparently I have to do something like "=First(Fields!MyAdress.Value.Street,
"MyApplication_objCompany")".

It gave me these 2 errors:
The Value expression for the textbox 'Adresse' refers to the field
'ReportAdresse'.
Report item expressions can only refer to fields within the current data set
scope or, if inside an aggregate, the specified data set scope.

The Value expression for the textbox 'textbox19' has a scope parameter that
is not valid for an aggregate function.
The scope parameter must be set to a string constant that is equal to either
the name of a containing group, the name of a containing data region, or the
name of a data set.

But sddenly it started to work...
strange... :-/

"Pieter" <pi**********@hotmail.com> wrote in message
news:u6****************@TK2MSFTNGP02.phx.gbl...
Hi,

I have a Report (VB.NET 2005), and I'm using Objects as DataSource.

I have the object objCompany, which contains a public property MyAdress
(instance of objAdress). objAdress has a propert Street.

When I add objCompany as a DataSource, I want to be able to show the
Street-property of MyAdress. So I do a drag-and-drop of that property from
the Data Sources - Window to the Report. Everything seems fine: I get a
textbox on my report with Value "=First(Fields!Street.Value,
"MyApplication_objCompany")".

But when I run the report, it doesn't show any value in it...

Does anybody knows why this happens? I somehow think because of the fact
that Street isn't directly on MyApplication_objCompany, but when I change
it into MyApplication_objCompany_MyAdress is complains about the fact that
it doesn't exist...

How should I do this?

Thanks a lot in advance,

Pieter

Jun 8 '06 #2

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

Similar topics

0
by: ad | last post by:
Hi, There is no print button when use LocalReport with WebApplicaiton. The article http://forums.microsoft.com/msdn/showpost.aspx?postid=22277&siteid=1 Show us how to print with program, but it...
0
by: meska | last post by:
Hi all, anyone has ideas how to display on ReportViewer items filtered through BindingSource.Filter? Adding a BindingSource through ReportDataSource to LocalReport.DataSources doesn't...
0
by: Rod | last post by:
I'm using: Microsoft.Reporting.WinForms.ReportPageSettings pgSettings = reportViewer1.LocalReport.GetDefaultPageSettings(); pgSettings.Margins.Right = 40; pgSettings.Margins.Left = 40; ... to...
1
by: jay | last post by:
I saw an example somewhere that looked like this: Me.ReportViewer1.Reset() Me.ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local Dim newDS As New...
0
by: Andy | last post by:
Please excuse my post if its somewhat off-topic, but I'm hoping to reach a wider audience that may have a solution but doesn't frequent the SSRS group.. thanks. I have a LocalReport, when I'm...
2
by: Gilbert Tordeur | last post by:
Bonjour. Mon application Web génère plusieurs fichiers pdf, que l'utilisateur doit télécharger sur son poste local. Pour provoquer le téléchargement du premier fichier, je fais : Dim...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

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.