Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 4 and Visual Studio 2010 > BOOK: Professional Visual Studio 2010
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Visual Studio 2010
This is the forum to discuss the Wrox book Professional Visual Studio 2010 by Nick Randolph, David Gardner, Chris Anderson, Michael Minutillo; ISBN: 9780470548653
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Visual Studio 2010 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #11 (permalink)  
Old April 29th, 2012, 10:36 AM
Authorized User
Points: 32, Level: 1
Points: 32, Level: 1 Points: 32, Level: 1 Points: 32, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2012
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default I fixed it!!! is working!!!---THANK YOU CHRIS

THANK YOU!!!!!!
Reply With Quote
  #12 (permalink)  
Old April 29th, 2012, 11:39 PM
Authorized User
Points: 33, Level: 1
Points: 33, Level: 1 Points: 33, Level: 1 Points: 33, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2010
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No worries.
__________________
Chris Anderson
Co-author
Reply With Quote
  #13 (permalink)  
Old April 30th, 2012, 07:12 PM
Authorized User
Points: 32, Level: 1
Points: 32, Level: 1 Points: 32, Level: 1 Points: 32, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2012
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Display Name Field in Report from relationship

Hi Chris, the only thing left for me to finish the report application is to be able to do the following:

I have two related tables. The report dataset table has an integer field called Customer(many) and it is linked to another table called Customers which has a primary key called CustomerId(one) and that same table has another field called CustomerName. I want to be able to show in my report CustomerName. How can I do it? Please advise, thanks...

Dataset is based in an Entity Model, but I could do it from a dataset if necessary. Thanks again..
Reply With Quote
  #14 (permalink)  
Old May 1st, 2012, 01:49 AM
Authorized User
Points: 33, Level: 1
Points: 33, Level: 1 Points: 33, Level: 1 Points: 33, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2010
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

There's 2 options. One is to simply include that related object in your query using the Include method (see the Navigating Entity Associations section in Chapter 29 of the book), and then use dot notation in your report to get to the property or properties you need. Alternativately, you can create a collection of anonymous objects, including the related field in the objects, like so:

var query =
from order in context.Orders
select new
{
OrderId = order.OrderID,
OrderDate = order.Date,
CustomerName = order.Customers.CustomerName
};
__________________
Chris Anderson
Co-author
Reply With Quote
  #15 (permalink)  
Old May 1st, 2012, 11:41 AM
Authorized User
Points: 32, Level: 1
Points: 32, Level: 1 Points: 32, Level: 1 Points: 32, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2012
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need to show related field from EF designer

When I choose the dataset from the report.rdlc design (New-Dataset...), a window comes up for me to be able to choose a New Dataset. Once I choose the DataSource, then I need to choose a dataset from "Available datasets" dropdownlist. I'm choosing a dataset based on a stored procedure in EF , GetTest(). What I need is that the related field appears in the fields list so that I can bind a report textbox to that related field. I sent you an email showing graphically.Please advise. Thank you very much.
Reply With Quote
  #16 (permalink)  
Old June 6th, 2012, 04:42 PM
Authorized User
Points: 32, Level: 1
Points: 32, Level: 1 Points: 32, Level: 1 Points: 32, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2012
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Typed DataSet Table query instead of a Entity

My subreport is working with Entity data. How would it be to have it working with a typed dataset? This is the code I thought would work but it isn't, please advise. GetData() is the name of the table adapter select procedure in the dataset. Thank you very much!!!
Code:
Private Sub ProcessSubreport(ByVal sender As System.Object, ByVal e As SubreportProcessingEventArgs)
        Dim cylinderid As Integer = Convert.ToInt32(e.Parameters("CylinderID").Values(0))
        Dim Context As New TestsDataSetTableAdapters.CylindersTableAdapter

        Dim qry = From cylinder In Context.GetData
        Where (cylinder.CylinderID = cylinderid)
        Select cylinder


        e.DataSources.Add(New ReportDataSource("DataSetC", qry))
    End Sub
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Management Chapter Listing 8-30 jayeshsatam BOOK: Professional ASP.NET 3.5 : in C# and VB ISBN: 978-0-470-18757-9 1 July 2nd, 2010 02:25 PM
Questions and Issues Chapters 3 and 4 egoodenuf BOOK: Beginning Spring Framework 2 ISBN: 978-0-470-10161-2 0 October 3rd, 2009 06:09 PM
Chapter 30, Registering Component Services slginps BOOK: Professional Visual Basic 2008 ISBN: 978-0-470-19136-1 1 April 25th, 2009 02:24 PM
Chapter 7 Workflow setup issues and questions tdewey BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 3 April 21st, 2009 12:22 AM
Chapter 4 issues HenryT BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 June 9th, 2004 03:49 PM



All times are GMT -4. The time now is 09:12 PM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.