SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL/SRSS Newbie Assistance Needed :)


SQL/SRSS Newbie Assistance Needed :)

Author
Message
richardgregory06
richardgregory06
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 8
Hi all:

Ok, I'm somewhat new to SQL/SRSS and could really use some help in getting started on something I"m tasked with below. If anyone can chime in to point me to the right path, I'd be very thankful for.

I am trying to create a report that summarizes the total count of transactions that each salesperson has processed per a given month.

A transaction is defined when there is a $ value populated in the "Sold" column. Ie. if there is an amount in the row table for the salesperson, it means that a transaction was done.

The report would be simple:


Salesperson Number of Transactions

John 5
Jane 8
Robert 9
Rick 15
Mary 0


Would someone be able to direct me to the steps required to generate the above report? Not sure what the query would be, so if someone could help me on that that'll be great.

I'm thinking that after the dataset is completed, all I would need to do is bind it to the new report correct?


Thanks!
gbritton1
gbritton1
SSChasing Mays
SSChasing Mays (655 reputation)SSChasing Mays (655 reputation)SSChasing Mays (655 reputation)SSChasing Mays (655 reputation)SSChasing Mays (655 reputation)SSChasing Mays (655 reputation)SSChasing Mays (655 reputation)SSChasing Mays (655 reputation)

Group: General Forum Members
Points: 655 Visits: 864
1. Define a datasource (points to your database)
2. Define a dataset (query that gets the data from the datasource)
3. Choose a Table from the toolbox and bind it to the dataset, selecting the fields you want in your report.
4. Voila!
richardgregory06
richardgregory06
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 8
Thanks! So I would just create the dataset to include all fields and have the the grouping done in SSRS?
gbritton1
gbritton1
SSChasing Mays
SSChasing Mays (655 reputation)SSChasing Mays (655 reputation)SSChasing Mays (655 reputation)SSChasing Mays (655 reputation)SSChasing Mays (655 reputation)SSChasing Mays (655 reputation)SSChasing Mays (655 reputation)SSChasing Mays (655 reputation)

Group: General Forum Members
Points: 655 Visits: 864
Yeah, that's the easy way
a4apple
a4apple
SSC Veteran
SSC Veteran (262 reputation)SSC Veteran (262 reputation)SSC Veteran (262 reputation)SSC Veteran (262 reputation)SSC Veteran (262 reputation)SSC Veteran (262 reputation)SSC Veteran (262 reputation)SSC Veteran (262 reputation)

Group: General Forum Members
Points: 262 Visits: 406
see this article I wrote on how to create a basic SSRS report using parameters http://sqlsaga.com/ssrs/how-to-create-a-basic-ssrs-report-with-parameters/. In your case I don't think you need the parameters.

SSRS again, not SRSS BigGrin Smile

Good Luck Smile .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.
richardgregory06
richardgregory06
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 8
Great link! Thank you for sharing and it really really helps me put things into context!

I"m still a bit confused which is typically the "Best Practice" to where I should put the criteria: in the SQL query, or should it be done within filters in the SSRS? Ie. if the critieria is *** simple as say SalespersonID = 12345


Thanks again.

P.S. SRSS Smile Yeah, I did a typo, and wanted to change it but editing the post didn't allow me to correct it......besides, I was just testing you all who would point it out BigGrin BigGrin
David Burrows
David Burrows
SSCrazy Eights
SSCrazy Eights (9.6K reputation)SSCrazy Eights (9.6K reputation)SSCrazy Eights (9.6K reputation)SSCrazy Eights (9.6K reputation)SSCrazy Eights (9.6K reputation)SSCrazy Eights (9.6K reputation)SSCrazy Eights (9.6K reputation)SSCrazy Eights (9.6K reputation)

Group: General Forum Members
Points: 9615 Visits: 9758
richardgregory06 (4/23/2014)
I"m still a bit confused which is typically the "Best Practice" to where I should put the criteria

It depends!
Check which method yields the best performance.

p.s.
Which is better
asking SQL Server to select a thousand rows from one million and pass a thousand rows to the Report Server
or
asking SQL Server to pass a million rows to the Report Server and asking the Report Server to filter for a thousand rows.


Far away is close at hand in the images of elsewhere.

Anon.


richardgregory06
richardgregory06
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 8
Well, that makes sense now now that you put it into perspective. It would be more efficient for SQL to do the front work in filtering the records first before passing it into the Report Server.

p.s.
Which is better
asking SQL Server to select a thousand rows from one million and pass a thousand rows to the Report Server
or
asking SQL Server to pass a million rows to the Report Server and asking the Report Server to filter for a thousand rows.

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search