Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Problem with a report. Expand / Collapse
Author
Message
Posted Wednesday, February 13, 2013 4:31 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, September 6, 2014 1:45 PM
Points: 112, Visits: 1,481
Hello,


I have a Dataset with: Company, Depot, Account, Year Period, Ethical, Glaxo, Drug, Surgical, General, PI, Misc, Phone, PostCode, CustomerName, DepotName, SalesMan, Salesman Number, Drug, General, Status.


I have used Visual Studio to create a report. In design view i have created two tables.The first table contains:


Account, CustomerName, Phone, DepotName, SalesMan, Salesman Number, Depot, PostCode.


I have created a second table above using the fields: Account, CustomerName, DepotName, SalesMan, Salesman Number, Depot, PostCode.


So in essense when the report is run the Account details will be shown first and then the Sales Details will be shown below.


What is happening when i run the report is that the Account Details in the first table are appearing multiple times as opposed to only once.

I assume this is due to the number of periods and year in the Sales fields.


Can anyone suggest a solution to enable me to view the Account details per Sales in a report.
Post #1419387
Posted Wednesday, February 13, 2013 4:35 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Monday, October 13, 2014 6:42 AM
Points: 5,216, Visits: 5,111
Please provide the current report along with what the report should look like,

But it sounds me that you need to add some grouping, but cannot be sure without seeing what you have now and what you want it to actually look like.




Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1419388
Posted Wednesday, February 13, 2013 5:03 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, September 6, 2014 1:45 PM
Points: 112, Visits: 1,481
The report is supposed to look like:


Account1, Account, Custome, Phone, PostCode, Group, Status, Depot, SalesMan, Salesman Number



Account, Year, Period, Ethical, Glaxo, Drug, Generic, Surgical, General, PI, Misc, Specials.



The second line works correctly. I have Grouped on Account and created a page break so that you can see the Account sales on One Page.
Post #1419410
Posted Wednesday, February 13, 2013 6:29 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Monday, October 13, 2014 6:42 AM
Points: 5,216, Visits: 5,111
Need data or pictures of what it looks like now and what it should look like after.



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1419471
Posted Wednesday, February 13, 2013 6:43 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, September 6, 2014 1:45 PM
Points: 112, Visits: 1,481
Hi
The report is supposed to look as the image attached.

Regards


  Post Attachments 
report.png (14 views, 25.53 KB)
Post #1419477
Posted Wednesday, February 13, 2013 6:51 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Monday, October 13, 2014 6:42 AM
Points: 5,216, Visits: 5,111
Yes I get that, but what does it look like now when you run the report, and what is wrong with it so I know what I need to do to make it your required output.



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1419482
Posted Wednesday, February 13, 2013 7:10 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, September 6, 2014 1:45 PM
Points: 112, Visits: 1,481
Hello,
As i mentioned i would like the Account Details to show in the first table and in the second table the sales data.

So in image (first.png) the Account details for one Account should be displayed. When you run the report, If you click the next page button you see the same customer details 10 times. (The same account details per page). This happens with each account.


When you get to a certain page e.g. 7000, you then begin to see the start of the Account Sales (two.png).


I need the corresponding Account to show with the sales details on the same page.

Thanks


  Post Attachments 
first.png (12 views, 23.82 KB)
two.png (12 views, 33.24 KB)
Post #1419499
Posted Thursday, February 14, 2013 4:12 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, September 6, 2014 1:45 PM
Points: 112, Visits: 1,481
Anyone any ideas on a solution to this?

Thanks
Post #1419950
Posted Friday, February 15, 2013 5:45 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 8:42 AM
Points: 316, Visits: 1,493
As Anthony.Green mentioned, it sounds like you need to be grouping your data in the first table. Without seeing a sample dataset it's difficult to provide info on what to group by -- I'd be guessing if I simply said group by Account...

--Pete




Post #1420485
Posted Friday, February 15, 2013 6:20 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, July 24, 2014 1:50 PM
Points: 531, Visits: 448
Send a screenshot of the grouping section for each table so we have a better understanding of what that looks like.

Post #1420498
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse