Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Reporting Services
»
Reporting Services
»
Problem with a report.
13 posts, Page 1 of 2
1
2
»»
Problem with a report.
Rate Topic
Display Mode
Topic Options
Author
Message
dbman
dbman
Posted Wednesday, February 13, 2013 4:31 AM
Valued Member
Group: General Forum Members
Last Login: Today @ 10:48 AM
Points: 72,
Visits: 1,074
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
anthony.green
anthony.green
Posted Wednesday, February 13, 2013 4:35 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
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
dbman
dbman
Posted Wednesday, February 13, 2013 5:03 AM
Valued Member
Group: General Forum Members
Last Login: Today @ 10:48 AM
Points: 72,
Visits: 1,074
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
anthony.green
anthony.green
Posted Wednesday, February 13, 2013 6:29 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
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
dbman
dbman
Posted Wednesday, February 13, 2013 6:43 AM
Valued Member
Group: General Forum Members
Last Login: Today @ 10:48 AM
Points: 72,
Visits: 1,074
Hi
The report is supposed to look as the image attached.
Regards
Post Attachments
report.png
(
13 views,
25.53 KB
)
Post #1419477
anthony.green
anthony.green
Posted Wednesday, February 13, 2013 6:51 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
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
dbman
dbman
Posted Wednesday, February 13, 2013 7:10 AM
Valued Member
Group: General Forum Members
Last Login: Today @ 10:48 AM
Points: 72,
Visits: 1,074
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
(
11 views,
23.82 KB
)
two.png
(
11 views,
33.24 KB
)
Post #1419499
dbman
dbman
Posted Thursday, February 14, 2013 4:12 AM
Valued Member
Group: General Forum Members
Last Login: Today @ 10:48 AM
Points: 72,
Visits: 1,074
Anyone any ideas on a solution to this?
Thanks
Post #1419950
peterzeke
peterzeke
Posted Friday, February 15, 2013 5:45 AM
SSC Veteran
Group: General Forum Members
Last Login: Today @ 10:04 AM
Points: 285,
Visits: 1,203
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
Tee Time
Tee Time
Posted Friday, February 15, 2013 6:20 AM
Old Hand
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 11:27 AM
Points: 321,
Visits: 236
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 »
13 posts, Page 1 of 2
1
2
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.