I have a hopefully simple question. I’m trying to learn SSRS a little better, and so I’m trying to abstract something out a little bit. I have a database that consists of a lot of simple frequency counts. I created one report with a table that summarizes the frequency counts and then has a pie chart next to it that is just a graphical representation of the table. What I was wondering was is there an easy way to essentially “clone” the entire (sub)report and change the dataset to another frequency count.Each query is a minor modification of something like this:[code="sql"]CREATE PROC [dbo].[usp_ECOG] @ProtocolNo varchar(30)ASSELECT enrollmentID , e_ProtocolNo , ECOGFROM enrollWHERE e_ProtocolNo = @ProtocolNo;[/code]The table I am looking at is “enrollment” – when a patient is enrolled in a study, a bunch of tests are run (once) and the measurements are recorded. There’s not much you can do with non-continuous data, except frequency counts, so I was looking to build the basic subreport and then reuse it for other datasets. (basically change the stored procedure and go from there?)[code="sql"]CREATE TABLE [dbo].[Enroll]( [enrollmentID] [int] IDENTITY(10000,1) NOT NULL, [e_PatientID] [int] NOT NULL, [e_ProtocolNo] [varchar](30) NOT NULL, [enrollDate] [datetime] NULL, [enrollOK] [bit] NULL, [leaveDate] [datetime] NULL, [PWeek] [int] NULL, [ECOG] [tinyint] NULL, [Histology] [tinyint] NULL, CONSTRAINT [PK_Enroll] PRIMARY KEY CLUSTERED [/code]I'll pretend for a minute that the design of this table doesn't look properly normalized. (Maybe that's the problem!) But the subreports for ECOG, Histology etc are just frequency counts with pie charts and relative frequencies (Frequency/EnrollCount). They work, but the design seems really bass ackwards.The idea was that I would create a "Main" report and then the users could drop in the subreports they wanted for a given Protocol (because they're similar, but some of the subreports change).Apologies if this doesn't make any sense! It's been one of those daze.Thanks!Pieter
↧