Showing posts with label subreport. Show all posts
Showing posts with label subreport. Show all posts

Monday, March 26, 2012

Matrix-How to tell when you're in a subtotal cell

I have a matrix where the detail cells are set to navigate to a subreport.
However I *don't* want them to provide navigation if they're in a subtotal
row or column. I can't figure out what to call in order to determine
whether the cell is a subtotal or not.
Any ideas?This is a multi-part message in MIME format.
--=_NextPart_000_0049_01C625AB.01FC8700
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Try playing around with this formula:
=3Diif(InScope("ColumnGroup1"), iif(InScope("RowGroup1"), "In Cell", ="In Subtotal of RowGroup1"), iif(InScope("RowGroup1"), "In Subtotal of =ColumnGroup1", "In Subtotal of entire matrix"))
Paste it into your usual matrix cell, and change RowGroup1 to whatever =your row group is called etc.
Kaisa M: Lindahl
"Greg S" <gregslistacct@.hotmail.com> wrote in message =news:ecBRlY7IGHA.1180@.TK2MSFTNGP09.phx.gbl...
>I have a matrix where the detail cells are set to navigate to a =subreport. > However I *don't* want them to provide navigation if they're in a =subtotal > row or column. I can't figure out what to call in order to determine > whether the cell is a subtotal or not.
> > Any ideas?
> >
--=_NextPart_000_0049_01C625AB.01FC8700
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Try playing around with this formula:
=3Diif(InScope("ColumnGroup1"), =iif(InScope("RowGroup1"), "In Cell", "In Subtotal of RowGroup1"), iif(InScope("RowGroup1"), "In =Subtotal of ColumnGroup1", "In Subtotal of entire matrix"))
Paste it into your usual matrix cell, and =change RowGroup1 to whatever your row group is called etc.
Kaisa M: Lindahl
"Greg S" wrote =in message news:ecBRlY7IGHA.1180@.TK2MSFTNGP09.phx.gbl...>I have a matrix where the =detail cells are set to navigate to a subreport. > However I *don't* want them =to provide navigation if they're in a subtotal > row or =column. I can't figure out what to call in order to determine > whether the =cell is a subtotal or not.> > Any ideas?> >

--=_NextPart_000_0049_01C625AB.01FC8700--|||This worked perfectly! Thanks.
"Kaisa M. Lindahl" <kaisaml@.hotmail.com> wrote in message
news:eWe1hKaJGHA.1832@.TK2MSFTNGP11.phx.gbl...
Try playing around with this formula:
=iif(InScope("ColumnGroup1"), iif(InScope("RowGroup1"), "In Cell", "In
Subtotal of RowGroup1"), iif(InScope("RowGroup1"), "In Subtotal of
ColumnGroup1", "In Subtotal of entire matrix"))
Paste it into your usual matrix cell, and change RowGroup1 to whatever your
row group is called etc.
Kaisa M: Lindahl
"Greg S" <gregslistacct@.hotmail.com> wrote in message
news:ecBRlY7IGHA.1180@.TK2MSFTNGP09.phx.gbl...
>I have a matrix where the detail cells are set to navigate to a subreport.
> However I *don't* want them to provide navigation if they're in a subtotal
> row or column. I can't figure out what to call in order to determine
> whether the cell is a subtotal or not.
> Any ideas?
>|||I am not familiar with the InScope function. You did not really use all
those words did you? For instance "in Subtotal of entire matrix" ' or did
you substitute names for your matrix in there. Like I said ... I am not
familiar with that function and I am trying to learn how to use it. This
seems like a very good example and I want to understand it correctly. Thanks.
"Greg S" wrote:
> This worked perfectly! Thanks.
>
> "Kaisa M. Lindahl" <kaisaml@.hotmail.com> wrote in message
> news:eWe1hKaJGHA.1832@.TK2MSFTNGP11.phx.gbl...
> Try playing around with this formula:
> =iif(InScope("ColumnGroup1"), iif(InScope("RowGroup1"), "In Cell", "In
> Subtotal of RowGroup1"), iif(InScope("RowGroup1"), "In Subtotal of
> ColumnGroup1", "In Subtotal of entire matrix"))
> Paste it into your usual matrix cell, and change RowGroup1 to whatever your
> row group is called etc.
> Kaisa M: Lindahl
>
> "Greg S" <gregslistacct@.hotmail.com> wrote in message
> news:ecBRlY7IGHA.1180@.TK2MSFTNGP09.phx.gbl...
> >I have a matrix where the detail cells are set to navigate to a subreport.
> > However I *don't* want them to provide navigation if they're in a subtotal
> > row or column. I can't figure out what to call in order to determine
> > whether the cell is a subtotal or not.
> >
> > Any ideas?
> >
> >
>|||The InScope function relates to the name of the scope, which can be a row
group name, a column group name, a matrix name or a dataset name.
If you have one ColumnGroup called thisColumnGroup, one RowGroup called
thisRowGroup and a Matrix called thisMatrix, the following code
=iif(InScope("ColumnGroup1"),
iif(InScope("RowGroup1"), "In Cell", "In Subtotal of RowGroup1"),
iif(InScope("RowGroup1"), "In Subtotal of ColumnGroup1", "In Subtotal of
entire matrix"))
would be translated to
=IIF(Inscope("thisColumnGroup"),
IIF(inScope("thisRowGroup"), "This is the text that will show up in cells in
thisColumnGroup", "This is the text that will show up in the subtotal of
thisRowGroup"),
IIF(InScope("thisRowGroup"), "This is the text that will show up in the
subtotal of thisColumnGroup",
"This is the text that shows up in the intersection between your row and
column groups"))
Create a matrix with a row group and a column group, change the names of
thisColumnGroup and thisRowGroup with the names of your groups, and put the
statement above in a detail cell, and see what shows up. :)
A more normal statement would be
=IIF(Inscope("thisColumnGroup"),
IIF(inScope("thisRowGroup"), Fields!Name.Value,
um(Fields!ColumnName.Value ),
IIF(InScope("thisRowGroup"), sum(Fields!ColumnName2.Value ,
"x"))
But the best thing is to try it out, the scopes are a bit abstract, it's
easier to understand if you try playing with it. (At least that's what I do.
:) )
Kaisa M. Lindahl Lervik
"MJT" <MJT@.discussions.microsoft.com> wrote in message
news:1901C919-A4EA-48D0-B8FE-56F059A8660F@.microsoft.com...
>I am not familiar with the InScope function. You did not really use all
> those words did you? For instance "in Subtotal of entire matrix" ' or
> did
> you substitute names for your matrix in there. Like I said ... I am not
> familiar with that function and I am trying to learn how to use it. This
> seems like a very good example and I want to understand it correctly.
> Thanks.
> "Greg S" wrote:
>> This worked perfectly! Thanks.
>>
>> "Kaisa M. Lindahl" <kaisaml@.hotmail.com> wrote in message
>> news:eWe1hKaJGHA.1832@.TK2MSFTNGP11.phx.gbl...
>> Try playing around with this formula:
>> =iif(InScope("ColumnGroup1"), iif(InScope("RowGroup1"), "In Cell", "In
>> Subtotal of RowGroup1"), iif(InScope("RowGroup1"), "In Subtotal of
>> ColumnGroup1", "In Subtotal of entire matrix"))
>> Paste it into your usual matrix cell, and change RowGroup1 to whatever
>> your
>> row group is called etc.
>> Kaisa M: Lindahl
>>
>> "Greg S" <gregslistacct@.hotmail.com> wrote in message
>> news:ecBRlY7IGHA.1180@.TK2MSFTNGP09.phx.gbl...
>> >I have a matrix where the detail cells are set to navigate to a
>> >subreport.
>> > However I *don't* want them to provide navigation if they're in a
>> > subtotal
>> > row or column. I can't figure out what to call in order to determine
>> > whether the cell is a subtotal or not.
>> >
>> > Any ideas?
>> >
>> >
>>|||Thanks for the great explanation Kaisa ... I will try playing around with it
using this example. I appreciate your help!
"Kaisa M. Lindahl Lervik" wrote:
> The InScope function relates to the name of the scope, which can be a row
> group name, a column group name, a matrix name or a dataset name.
> If you have one ColumnGroup called thisColumnGroup, one RowGroup called
> thisRowGroup and a Matrix called thisMatrix, the following code
> =iif(InScope("ColumnGroup1"),
> iif(InScope("RowGroup1"), "In Cell", "In Subtotal of RowGroup1"),
> iif(InScope("RowGroup1"), "In Subtotal of ColumnGroup1", "In Subtotal of
> entire matrix"))
> would be translated to
>
> =IIF(Inscope("thisColumnGroup"),
> IIF(inScope("thisRowGroup"), "This is the text that will show up in cells in
> thisColumnGroup", "This is the text that will show up in the subtotal of
> thisRowGroup"),
> IIF(InScope("thisRowGroup"), "This is the text that will show up in the
> subtotal of thisColumnGroup",
> "This is the text that shows up in the intersection between your row and
> column groups"))
> Create a matrix with a row group and a column group, change the names of
> thisColumnGroup and thisRowGroup with the names of your groups, and put the
> statement above in a detail cell, and see what shows up. :)
> A more normal statement would be
> =IIF(Inscope("thisColumnGroup"),
> IIF(inScope("thisRowGroup"), Fields!Name.Value,
> um(Fields!ColumnName.Value ),
> IIF(InScope("thisRowGroup"), sum(Fields!ColumnName2.Value ,
> "x"))
> But the best thing is to try it out, the scopes are a bit abstract, it's
> easier to understand if you try playing with it. (At least that's what I do.
> :) )
> Kaisa M. Lindahl Lervik
> "MJT" <MJT@.discussions.microsoft.com> wrote in message
> news:1901C919-A4EA-48D0-B8FE-56F059A8660F@.microsoft.com...
> >I am not familiar with the InScope function. You did not really use all
> > those words did you? For instance "in Subtotal of entire matrix" ' or
> > did
> > you substitute names for your matrix in there. Like I said ... I am not
> > familiar with that function and I am trying to learn how to use it. This
> > seems like a very good example and I want to understand it correctly.
> > Thanks.
> >
> > "Greg S" wrote:
> >
> >> This worked perfectly! Thanks.
> >>
> >>
> >> "Kaisa M. Lindahl" <kaisaml@.hotmail.com> wrote in message
> >> news:eWe1hKaJGHA.1832@.TK2MSFTNGP11.phx.gbl...
> >> Try playing around with this formula:
> >> =iif(InScope("ColumnGroup1"), iif(InScope("RowGroup1"), "In Cell", "In
> >> Subtotal of RowGroup1"), iif(InScope("RowGroup1"), "In Subtotal of
> >> ColumnGroup1", "In Subtotal of entire matrix"))
> >>
> >> Paste it into your usual matrix cell, and change RowGroup1 to whatever
> >> your
> >> row group is called etc.
> >>
> >> Kaisa M: Lindahl
> >>
> >>
> >> "Greg S" <gregslistacct@.hotmail.com> wrote in message
> >> news:ecBRlY7IGHA.1180@.TK2MSFTNGP09.phx.gbl...
> >> >I have a matrix where the detail cells are set to navigate to a
> >> >subreport.
> >> > However I *don't* want them to provide navigation if they're in a
> >> > subtotal
> >> > row or column. I can't figure out what to call in order to determine
> >> > whether the cell is a subtotal or not.
> >> >
> >> > Any ideas?
> >> >
> >> >
> >>
> >>
>
>sql

Friday, March 23, 2012

Matrix subtotals jump to subreport?

I have a complex issue. I have a matrix that has a cell that jumps the user to a subreport sending parameters. Well the report also has subtotals compliments of the matrix. Well those subtotals also jump to the subreport sending *first* parameters. I don't want the subtotals tojump anywhere! How do I disable navigation on the subtotal row? Crazy!

Have you found a solution to this? I am having the same problem.

Wednesday, March 21, 2012

Matrix report not setting the pagewidth properly

Hi,
I have a matrix report that displays offices down the page and all the
days in a month across the page, with a subreport in each cell
displaying other data.
The problem i am having is when i load the page the first time it will
only display half the days, when i press refresh or change the zoom
level it correctly displays all the data.
I have tried setting the zoom level on the url and setting the actual
and interactive page size to A2 (594mm x 420mm) and it has made no
difference.
Any suggestions on how i can get this to display correctly?
Thanks
DarrynOn Mar 11, 9:49 pm, darryn.brya...@.gmail.com wrote:
> Hi,
> I have a matrix report that displays offices down the page and all the
> days in a month across the page, with a subreport in each cell
> displaying other data.
> The problem i am having is when i load the page the first time it will
> only display half the days, when i press refresh or change the zoom
> level it correctly displays all the data.
> I have tried setting the zoom level on the url and setting the actual
> and interactive page size to A2 (594mm x 420mm) and it has made no
> difference.
> Any suggestions on how i can get this to display correctly?
> Thanks
> Darryn
Usually, when including subreports in a table, etc of another report,
the format tends to be a little hard to control (at least, at the
granular level). If there is a way to avoid using the subreport(s) in
this way, I would suggest it. I would check the complexity of the
queries/stored procedures used for the subreports and maybe use the
Database Engine Tuning Advisor to improve the performance of the
queries/stored procedures. It seems like there might be a bottleneck
with the queries. Hope this helps.
Regards,
Enrique Martinez
Sr. SQL Server Developer

Wednesday, March 7, 2012

Matrix

I've produce a report using a matrix.

Within that matrix I want to navigate to a subreport, however this only applies to certain columns in the matrix and within only when a cell contains a certain value.

Can anybody tell me how to reference individual matrix columns and whether the above is possible?

It sounds like you want a "drillthrough" to another report rather than a subreport.

You can use an expression to dynamically determine the drillthrough target report name, e.g. based on a value in the matrix cell or based on a certain grouping scope. For instance, add a drillthrough navigation action on a matrix cell with an expression-based drillthrough report name: =iif(InScope("Matrix_ColumnGroupName"), "DrillthroughReportName", Nothing)

If the expression for the report name evaluates to Nothing, no drillthrough link will be shown.

-- Robert

Saturday, February 25, 2012

Master-detail subreports and performance.

If I create a master detail-report using subreports, will a separate query
run for each subreport at the time it loads? Lets say I have a report with
500 master rows, will it have to run 500 queries for the subreports before
the first page loads?
I know there is no on-demand subreport load, and from what I read you can't
do a heterogeneos joins between 2 record sets in the same report - so that
the detail recordset would filter under each master row based on an id.
So what is the best way to produce a large master-detail report with
reasonable performance?
Thanks.You are correct, the subreport is executed for each master record. Other
than making sure your database is optimized (correct indexes for example)
there isn't much you can do to speed it up the report running. However, if
the report is only needed for a particular time (for instance, this report
is run daily) you could use snapshots. Read up on that in books online.
The other possibility is to consider drill through. In that case you show
the master tables with a link that when the user wants additional data they
click on the link and use jump to report to pull up the additional data.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"David W" <spivey@.nospam.post.com> wrote in message
news:eSsZCOqlHHA.4628@.TK2MSFTNGP06.phx.gbl...
> If I create a master detail-report using subreports, will a separate query
> run for each subreport at the time it loads? Lets say I have a report
> with 500 master rows, will it have to run 500 queries for the subreports
> before the first page loads?
> I know there is no on-demand subreport load, and from what I read you
> can't do a heterogeneos joins between 2 record sets in the same report -
> so that the detail recordset would filter under each master row based on
> an id.
> So what is the best way to produce a large master-detail report with
> reasonable performance?
> Thanks.
>|||Thanks Bruce for confirming my suspicions. I'm definitely not doing a
report that generates over 500 queries to load a page regardless of database
optimizations or snapshot usage.
Well, I ended up doing a SQL join between my master recordset query and my
detail recordset query to produce one mammoth recordset containing all
fields. Then I grouped on the master columns, and displayed the detail
records as expandable sections. Its not efficient by any means but it works
reasonably well, and its only a single query, and it gives me the
master-detail effect.
Any idea when we are going to see the next version of Reporting Services.
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:%23AwSqovlHHA.4552@.TK2MSFTNGP04.phx.gbl...
> You are correct, the subreport is executed for each master record. Other
> than making sure your database is optimized (correct indexes for example)
> there isn't much you can do to speed it up the report running. However, if
> the report is only needed for a particular time (for instance, this report
> is run daily) you could use snapshots. Read up on that in books online.
> The other possibility is to consider drill through. In that case you show
> the master tables with a link that when the user wants additional data
> they click on the link and use jump to report to pull up the additional
> data.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "David W" <spivey@.nospam.post.com> wrote in message
> news:eSsZCOqlHHA.4628@.TK2MSFTNGP06.phx.gbl...
>> If I create a master detail-report using subreports, will a separate
>> query run for each subreport at the time it loads? Lets say I have a
>> report with 500 master rows, will it have to run 500 queries for the
>> subreports before the first page loads?
>> I know there is no on-demand subreport load, and from what I read you
>> can't do a heterogeneos joins between 2 record sets in the same report -
>> so that the detail recordset would filter under each master row based on
>> an id.
>> So what is the best way to produce a large master-detail report with
>> reasonable performance?
>> Thanks.
>|||What you are explaining here is drill down. It is a nice user interface but
not one I do too often because of the amount of data returned.
I would consider looking into using drill through in the future. Users are
very comfortable with it and you get really good performance.
The next release of RS (non-service pack) is with Katmai (next version of
SQL Server). RS is part of SQL Server and releases with both service packs
and major releases for SQL Server. Early on this was not true but now it is
totally in sync with the rest of SQL Server.
http://www.microsoft.com/presspass/press/2007/may07/05-09KatmaiPR.mspx
Right now they are just saying 2008.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"David W" <spivey@.nospam.post.com> wrote in message
news:u4QXU2vlHHA.3872@.TK2MSFTNGP04.phx.gbl...
> Thanks Bruce for confirming my suspicions. I'm definitely not doing a
> report that generates over 500 queries to load a page regardless of
> database optimizations or snapshot usage.
> Well, I ended up doing a SQL join between my master recordset query and my
> detail recordset query to produce one mammoth recordset containing all
> fields. Then I grouped on the master columns, and displayed the detail
> records as expandable sections. Its not efficient by any means but it
> works reasonably well, and its only a single query, and it gives me the
> master-detail effect.
> Any idea when we are going to see the next version of Reporting Services.
>
>
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:%23AwSqovlHHA.4552@.TK2MSFTNGP04.phx.gbl...
>> You are correct, the subreport is executed for each master record. Other
>> than making sure your database is optimized (correct indexes for example)
>> there isn't much you can do to speed it up the report running. However,
>> if the report is only needed for a particular time (for instance, this
>> report is run daily) you could use snapshots. Read up on that in books
>> online.
>> The other possibility is to consider drill through. In that case you show
>> the master tables with a link that when the user wants additional data
>> they click on the link and use jump to report to pull up the additional
>> data.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "David W" <spivey@.nospam.post.com> wrote in message
>> news:eSsZCOqlHHA.4628@.TK2MSFTNGP06.phx.gbl...
>> If I create a master detail-report using subreports, will a separate
>> query run for each subreport at the time it loads? Lets say I have a
>> report with 500 master rows, will it have to run 500 queries for the
>> subreports before the first page loads?
>> I know there is no on-demand subreport load, and from what I read you
>> can't do a heterogeneos joins between 2 record sets in the same report -
>> so that the detail recordset would filter under each master row based on
>> an id.
>> So what is the best way to produce a large master-detail report with
>> reasonable performance?
>> Thanks.
>>
>