Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Services / Reporting Services / July 2008

Tip: Looking for answers? Try searching our database.

Invoice / Customer Datasets question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Microsoft Newsserver - 14 Jul 2008 10:31 GMT
Hi Guys,

I am trying to create an invoice report. Essentially, there are two datasets
in use, the invoice set itself, with the main fields such as invoice number,
invoice items etc and the dsCustomer which contains the customer addresses.

I have the invoice details fine, but I want to be able to extract the
customer address details from the dsCustomer for each invoice  in the
invoiceDetaisl Data Region and I cant work out how to do this. How can I
fill/filter/lookup List 1's fields
based on the customerID in List 2.  Yeah, I could make one huge Datasetwith
all the details repeated a billion times, but there has to be an intelligent
way to do this.  Am I just making life difficult for myself ? A different
approach ?

Any help is appreciated ! - Thanks

[*****************   List1   - dsCustomer *******************]
[     CustomerID
[     CustomerAddress
[******************************************************]

[**************** List2 - dsInvoice  ************************]
[   CustomerID
[ InvoiceNumber
[   Invoice Date
[
[  *************** List 3 Invoice Details ************
[
[*******************************************************]
toolman - 15 Jul 2008 17:14 GMT
> Hi Guys,
>
[quoted text clipped - 26 lines]
> [
> [*******************************************************]

Since the datasets have a common field (CustomerID) I'd probably do
this with a subreport.

First create a main report with a table attached to dsCustomer.
Insert CustomerAddress in the detail row and group by CustomerID.
Insert CustomerID into the group header and add a second detail row
below the first.

Now create a 2nd report (this will be your subreport) with a table
attached to dsInvoice.  Insert InvoiceDate into the detail row and add
as many additional detail rows as needed to accomodate the invoice
details.  Group by InvoiceNumber and insert InvoiceNumber into the
group header.

Back in your main report table, insert your subreport into the second
detail line.

You'll probably have to do some manipulating but this should get you
close.

HTH
toolman
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.