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


Replicating a MS Access report in SSRS


Replicating a MS Access report in SSRS

Author
Message
dbman
dbman
Say Hey Kid
Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)

Group: General Forum Members
Points: 689 Visits: 1537
I am trying to replicate a report a user uses in MS Access.

In MS Access a user can enter a Group Code and view the sales for that particular group over a 12 month period on one page as a print preview. Behind this report appears In print preview the sales of each particular shop within this group appear. So for instance there might be 8 shops within a Group.

In SQL Server reporting services i have created two queries where. One where the user enter a groupname and the consolidated sales of shops appear. In another report the user can enter the individual shops in a text box and the sales appear.


In SSRS I would like the user to be able to enter the group name and then after that report page i would like the user to be able to view the individual shops. So in effect, the user would click next and would be able to view shop sales. The shops within that Group.

I have two queries that actually do the above which are:



SELECT GroupCodes.GroupCode, Sales_TrackingSheets.Period, Sales_TrackingSheets.Year, SUM(Sales_TrackingSheets.Ethical) AS Ethical, SUM(Sales_TrackingSheets.Drug) AS Drug, SUM(Sales_TrackingSheets.Glaxo) AS Glaxo, SUM(Sales_TrackingSheets.Generic)
AS Generic, SUM(Sales_TrackingSheets.Surgical) AS Surgical, SUM(Sales_TrackingSheets.General) AS General, SUM(Sales_TrackingSheets.PI) AS PI, SUM(Sales_TrackingSheets.Misc) AS Misc, SUM(Sales_TrackingSheets.CaseSales) AS Totals,
GroupCustomers.Chain, GroupCodes.GroupName, SUM(Sales_TrackingSheets.Numark) AS Specials
FROM GroupCustomers INNER JOIN
GroupCodes ON GroupCustomers.Chain = GroupCodes.GroupCode INNER JOIN
Sales_TrackingSheets ON GroupCustomers.Account = Sales_TrackingSheets.Account
GROUP BY GroupCodes.GroupCode, Sales_TrackingSheets.Period, Sales_TrackingSheets.Year, GroupCustomers.Chain, GroupCodes.GroupName
HAVING (GroupCodes.GroupCode = @GroupCode)
ORDER BY Sales_TrackingSheets.Year, Sales_TrackingSheets.Period




SELECT Sales_TrackingSheets.Company, Sales_TrackingSheets.Depot, Sales_TrackingSheets.Account, Sales_TrackingSheets.Year, Sales_TrackingSheets.Period, Sales_TrackingSheets.Ethical, Sales_TrackingSheets.Glaxo, Sales_TrackingSheets.Drug, Sales_TrackingSheets.Generic, Sales_TrackingSheets.Surgical, Sales_TrackingSheets.General,
Sales_TrackingSheets.PI, Sales_TrackingSheets.Numark, Sales_TrackingSheets.Misc, Sales_TrackingSheets.CaseSales, GroupCustomers.Salesman, GroupCustomers.Phone, GroupCustomers.PostCode, BDMs.Name, GroupCustomers.CustomerName,
Depots.Depot AS DepotName, GroupCustomers.[Group], StatusDescription.StatusDescription, BDMs.SalesManNumber
FROM Sales_TrackingSheets INNER JOIN
GroupCustomers ON Sales_TrackingSheets.Account = GroupCustomers.Account INNER JOIN
BDMs ON GroupCustomers.Salesman = BDMs.SalesManNumber INNER JOIN
Depots ON Sales_TrackingSheets.Depot = Depots.DepotNo INNER JOIN
StatusDescription ON GroupCustomers.Status = StatusDescription.Status
WHERE GroupCustomers.Chain = @Chain
ORDER BY Sales_TrackingSheets.Account,Sales_TrackingSheets.Year, Sales_TrackingSheets.Period





I would like my report to first show the Group Sales on page 1 and then on page two, page three etc i would like the
report to show the respective shop sales.


Does anyone know how i can achieve this in SSRS?
dbman
dbman
Say Hey Kid
Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)Say Hey Kid (689 reputation)

Group: General Forum Members
Points: 689 Visits: 1537
Any ideas anyone?
eric.muller
eric.muller
SSC Eights!
SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)

Group: General Forum Members
Points: 850 Visits: 1379
If I were you, I would start by making one dataset that has all the appropriate parameters and conditions on it, and then put it into Table 1 (Summary) and Table 2 (Details).

Your one dataset will have all the details, so you'll let SSRS do the summarizing in Table 1 via SUM and COUNT functions in the table, at least at first (it's slower, but simpler so you're just working with the one dataset). You can break them up into seperate datasets later if you so choose, depending on performancy.

In Table 2 just list all the values from the dataset you wish to display.

In the Properties for Table 1 you can add a page break after it, which will always cause Table 2 to start on a new page.

Play around with it, it sounds like you're most of the way there, but you just need to get familiar with SSRS. Good luck!

Cheers,
EJM
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