page footers. On the report I have a matrix, which extends the report horizontally across
two pages or more. How can I get the lines to extend to the edge of the
report?
i'm still having trouble with this, does anyone have any ideas?
page footers. On the report I have a matrix, which extends the report horizontally across
two pages or more. How can I get the lines to extend to the edge of the
report?
i'm still having trouble with this, does anyone have any ideas?
page footers. On the report I have a matrix, which extends the report horizontally across
two pages or more. How can I get the lines to extend to the edge of the
report?
i'm still having trouble with this, does anyone have any ideas?
Hello:
I have just sstayed away from Matrix'es in that I have no control. I have not found a way around your above example - maybe someone else knows but I sure don't - so I have just stayed with simple lists and have manipulated the data via a stored procedure with a "crosstab" or "pivot table" to generate the data (with respective columns) that I want and then within RS just layout the report visibility similar to a matrix.
A different subject for a different day but the same occurs within Analysis Services in that the horizontal presentation just extrapolates itself forever based upon the dimensions and columns - maybe I did not say that corectly but the same thing occurs.
So here is a nice little "generic" SQL that will allow you to present your row data as column data. A side Note - that is the ONLY issue I have with Reporting Services in that all data is always represented as a ROW - so this Stored Procedure will definitely help you control what you want to present.
There are some initial definitions you should deploy such as storing these parameters for each report within a table in SQL and if you want I can help you - but nevertheless here is the code and I rename this Stored Procedure for the name of my Reporting Services Report.
CREATE procedure Ex_CrossTab or whatever name you want (@.SQL varchar(2500),
@.PivotCol varchar(100),
@.Summaries varchar(100),
@.GroupBy varchar(100),
@.OtherFields varchar(150) = Null,
@.Debug bit = 0)
AS
set nocount on
set ansi_warnings off
declare @.Vals varchar(8000);
declare @.Vals2 varchar(8000);
declare @.Vals3 varchar(8000);
declare @.tmp varchar(1000);
declare @.TotalLen int;
set @.Vals = '';
set @.Vals2 = '';
set @.Vals3 = '';
set @.TotalLen = len(@.SQL) + len(@.GroupBy) + Len(ISNULL(@.OtherFields,''))
set @.OtherFields = isNull(', ' + @.OtherFields ,'')
create table #temp (Pivot varchar(100))
insert into #temp
exec ('select distinct convert(varchar(100),' + @.PivotCol + ') as Pivot FROM (' + @.SQL + ') A')
select @.tmp =
replace(replace(@.Summaries,'(','(CASE WHEN ' + @.PivotCol + '=''' + replace(Pivot,'''',''') +
''' THEN '),')[', ' END) as [' + Pivot ),
@.TotalLen = @.TotalLen + Len(@.tmp),
@.Vals = case when @.TotalLen < 7800 then @.Vals + ', ' + @.tmp else @.Vals end,
@.Vals2 = case when @.TotalLen between 7800 and 15799 then @.Vals2 + ', ' + @.tmp else @.Vals2 end,
@.Vals3 = case when @.TotalLen between 15800 and 23799 then @.Vals3 + ', ' + @.tmp else @.Vals3 end
from
#Temp
order by
Pivot
drop table #Temp
if (@.Debug=0)
exec ( 'select ' + @.GroupBy + @.OtherFields + @.Vals + @.Vals2 +
@.Vals3 + ' from (' + @.SQL + ') A GROUP BY ' + @.GroupBy)
else
begin
create table #Temp2 (SQLText Text);
insert into #Temp2 (SQLText)
values ('select ' + @.GroupBy + @.OtherFields + @.Vals + @.Vals2 +
@.Vals3 + ' from (' + @.SQL + ') A GROUP BY ' + @.GroupBy);
select * from #Temp2
end