Quantcast
Channel: SQLServerCentral » Reporting Services » Reporting Services » Latest topics
Viewing all articles
Browse latest Browse all 2791

Replicating a MS Access report in SSRS

$
0
0
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 SpecialsFROM GroupCustomers INNER JOIN GroupCodes ON GroupCustomers.Chain = GroupCodes.GroupCode INNER JOIN Sales_TrackingSheets ON GroupCustomers.Account = Sales_TrackingSheets.AccountGROUP BY GroupCodes.GroupCode, Sales_TrackingSheets.Period, Sales_TrackingSheets.Year, GroupCustomers.Chain, GroupCodes.GroupNameHAVING (GroupCodes.GroupCode = @GroupCode) ORDER BY Sales_TrackingSheets.Year, Sales_TrackingSheets.PeriodSELECT 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.SalesManNumberFROM 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.StatusWHERE GroupCustomers.Chain = @ChainORDER 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 thereport to show the respective shop sales.Does anyone know how i can achieve this in SSRS?

Viewing all articles
Browse latest Browse all 2791

Trending Articles