Friday, March 30, 2012
Passing OLAP-parameters between reports
OLAP cubes. Both reports has parameters and works fine.
My challenge:
When clicking in a field in ReportA, I want to navigate to ReportB, sending
the appropriate parameters from ReportA to ReportB. The first parameter I
send is the value of a fiield "Location", for instance "Seattle". However,
when I send this to reportB (which takes, amongst others, a location
parameter), the value "Seattle" is sent, and not the value which is
understood by ReportB's parameter, that is "[Dim Location].[Location].1".
To accomplsh my task I think I somehow need to print the value "[Dim
Location].[Location].1" in a hidden field in ReportA and send this fields
value to ReportB. But how do get both Seattle and [Dim
Location].[Location].1" as member values of the same OLAP dimension?
Hope I made my self clear enough here. It is a bit difficult to explain, and
don't hesitate to ask me if there is something you didn't understand.
Thanks in advance for your helpYou can return the OLAP dimension member's Unique name in your query, like
this:
with member [Measures].[MyName] as '[Gender].currentmember.name'
member [Measures].[MyLevelOrdinal] as '[Gender].currentmember.Level.Ordinal'
member [Measures].[MyUniqueName] as '[Gender].currentmember.UniqueName'
member [Measures].[MyMeasure4] as '[Measures].[Unit Sales]'
member [Measures].[MyMeasure5] as '[Measures].[Store Cost]'
member [Measures].[MyMeasure6] as '[Measures].[Store Sales]'
select {[Measures].[MyName], [Measures].[MyLevelOrdinal],
[Measures].[MyUniqueName], [Measures].[MyMeasure4], [Measures].[MyMeasure5],
[Measures].[MyMeasure6]} on columns,
{filter([Gender].members, [Measures].[Unit Sales] > 0) } on rows
from [Sales]
(try with Foodmart 2000)
In your case, this should return something like
MyName = Seattle
MyLevelOrdinal = Seattle's level ordinal
MyUniquName = [Dim Location].[Location].1
LIke: member [Measures].[MyUniqueName] as '[Dim
Location].currentmember.UniqueName'
Kaisa M. Lindahl
"Billy" <Billy@.discussions.microsoft.com> wrote in message
news:35966F0A-9112-487A-A8EC-BF6E3F2E39C3@.microsoft.com...
>I have to reports, ReportA and ReportB. Both uses datasets that are based
>on
> OLAP cubes. Both reports has parameters and works fine.
> My challenge:
> When clicking in a field in ReportA, I want to navigate to ReportB,
> sending
> the appropriate parameters from ReportA to ReportB. The first parameter I
> send is the value of a fiield "Location", for instance "Seattle". However,
> when I send this to reportB (which takes, amongst others, a location
> parameter), the value "Seattle" is sent, and not the value which is
> understood by ReportB's parameter, that is "[Dim Location].[Location].1".
>
> To accomplsh my task I think I somehow need to print the value "[Dim
> Location].[Location].1" in a hidden field in ReportA and send this fields
> value to ReportB. But how do get both Seattle and [Dim
> Location].[Location].1" as member values of the same OLAP dimension?
> Hope I made my self clear enough here. It is a bit difficult to explain,
> and
> don't hesitate to ask me if there is something you didn't understand.
> Thanks in advance for your help
Passing OLAP Parameters Within a URL
Hi there!
My report uses an OLAP query with a (multi-valued) parameter, the MDX generated query is something like "...ON ROWS FROM ( SELECT ( STRTOSET(@.Region, CONSTRAINED) ) ON COLUMNS FROM [cube]) ...".
The report works fine using the Report Manager frontend. Now I want to pass this parameter directly within the query string:
https://servername/ReportServer?/PathTo/MyReport&rs:Command=Render&rs:Format=HTML4.0&Region=[foo].[bar 123].&[baz]
But I cannot get Reporting Services to accept the parameter instead of complaining about a missing parameter value. I've already tried quoting the braces, spaces, and the ampersand, putting the dimension in curly braces and/or quotes... No success.
How do I quote this parameter correctly?
I do this befor but so it was as follow
Report server URL(http://Machinename/reportserver/) + Reports Folder (MyReports/)+Reportname (My report) +"&Firstparametername"+Value+"&secondparametername"+Value
it will be like this
http://Machinename/reportserver/(MyReports/My repor&Firstparametername=Value1&secondparametername=Value
|||
Thanks for your reply.
Normal query parameters work fine, I just can't pass OLAP parameters (dimensions like "[foo].[bar 123].&[baz]") this way. ReportServer won't accept them, I think it doesn't like the way I'm trying to quote them...
Thanks and best regards,
Thomas
Hi Tamer,
I was reading your question and i have the same problem.
Please, tell me, Have you resolved this issue ?
email me to :megch00@.hotmail.com ormanuelgo@.cr-dss.com
Thanks a lot !!
|||
Hi there!
It was indeed quoting related, I must have confused hex with decimal notation in my earlier attempts.
All you have to do is urlencode the parameter names and values. Here is how to quote correctly:
%5B%5D%26+ or%20Or you let ASP.Net do the job:
1string encodedParam = HttpContext.Current.Server.UrlEncode(myParam);
So ...&Region=[foo].[bar 123].&[baz]... becomes...&Region=%5Bfoo%5D.%5Bbar+123%5D.%26%5Bbaz%5D...
If you want this parameter to have multiple values, just use it multiple times in your URL: ...&Region=%5Bfoo%5D.%5Bbar+123%5D.%26%5Bbaz%5D&Region=%5Bfoo%5D.%5Bbar+123%5D.%26%5Bheureka%5D...
HTH and best regards,
Thomas
passing olap parameters in url
RS 2005 report? i tried to do it as such and got an error.
parameter name is AbsenceTypesAbsenceTypes
parameter value is =[Absence Types].[Absence Types].[Absence Type].&[Absent
Days]
this is the link:
http://localhost/ReportServer/Pages/ReportViewer.aspx?%2fCA_Reports%2fcAtt_01&rs:Command=Render&AbsenceTypesAbsenceTypes=[Absence
Types].[Absence Types].[Absence Type].&[Absent Days]
this is the error:
The path of the item "/CA_Reports/cAtt_01,[Absent Days]" is not valid. The
path must be less than 260 characters long and must not start with slash.
Other restrictions apply.
it's obvious that the & in the value of the parameter is causing this
problem.
also if somebody knows of a site where i can find help on this subject. i've
searched a lot and none talks about the current version of RS with olap.
ThanksURL parameter values always must be encoded. E.g. & needs to be encoded as
%26, [ would be %5B, ] would be %5D.
Lookup the HttpUtility class on MSDN - it provides a static method
HttpUtility.HtmlEncode to perform this encoding.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"TinaWina" <TinaWina@.discussions.microsoft.com> wrote in message
news:1B900061-7EF8-4FC5-AA0D-EE61C20E5E53@.microsoft.com...
> hi. could anyone pls tell me how to pass parameter values on url to an
> olap
> RS 2005 report? i tried to do it as such and got an error.
> parameter name is AbsenceTypesAbsenceTypes
> parameter value is =[Absence Types].[Absence Types].[Absence
> Type].&[Absent
> Days]
> this is the link:
> http://localhost/ReportServer/Pages/ReportViewer.aspx?%2fCA_Reports%2fcAtt_01&rs:Command=Render&AbsenceTypesAbsenceTypes=[Absence
> Types].[Absence Types].[Absence Type].&[Absent Days]
> this is the error:
> The path of the item "/CA_Reports/cAtt_01,[Absent Days]" is not valid. The
> path must be less than 260 characters long and must not start with slash.
> Other restrictions apply.
> it's obvious that the & in the value of the parameter is causing this
> problem.
> also if somebody knows of a site where i can find help on this subject.
> i've
> searched a lot and none talks about the current version of RS with olap.
> Thanks|||Thank you very much.
It worked:)
"Robert Bruckner [MSFT]" wrote:
> URL parameter values always must be encoded. E.g. & needs to be encoded as
> %26, [ would be %5B, ] would be %5D.
> Lookup the HttpUtility class on MSDN - it provides a static method
> HttpUtility.HtmlEncode to perform this encoding.
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "TinaWina" <TinaWina@.discussions.microsoft.com> wrote in message
> news:1B900061-7EF8-4FC5-AA0D-EE61C20E5E53@.microsoft.com...
> > hi. could anyone pls tell me how to pass parameter values on url to an
> > olap
> > RS 2005 report? i tried to do it as such and got an error.
> > parameter name is AbsenceTypesAbsenceTypes
> > parameter value is =[Absence Types].[Absence Types].[Absence
> > Type].&[Absent
> > Days]
> >
> > this is the link:
> > http://localhost/ReportServer/Pages/ReportViewer.aspx?%2fCA_Reports%2fcAtt_01&rs:Command=Render&AbsenceTypesAbsenceTypes=[Absence
> > Types].[Absence Types].[Absence Type].&[Absent Days]
> >
> > this is the error:
> > The path of the item "/CA_Reports/cAtt_01,[Absent Days]" is not valid. The
> > path must be less than 260 characters long and must not start with slash.
> > Other restrictions apply.
> >
> > it's obvious that the & in the value of the parameter is causing this
> > problem.
> >
> > also if somebody knows of a site where i can find help on this subject.
> > i've
> > searched a lot and none talks about the current version of RS with olap.
> >
> > Thanks
>
>
Wednesday, March 7, 2012
Pass System date as parameter in OLAP report
Hi,
How to pass system date as parameter in a OLAP report? Also let me know how to pass parameter from One OLAP report to other?Hello,I've used two separate methods for date driven reports:
1) Use the NOW() function to build strings representing members in your Date dimension. You would actually do this in the MDX.
2) Use data in your cube to dynamically determine what "today" is. In other words, find the last member in your Date dimension which has data and call that "today".
HTH
Todd
Pass parameters to OLAP sub-report
Using RS 2005
I've got a main report onto which I've placed a subreport to which I
need to pass 2 parameters.
I've done this a 100 times in the past but here I am getting this error
message:
[rsErrorExecutingSubreport] An error occurred while executing the
subreport 'subreport1': One or more parameters required to run the
report have not been specified.
(The report shows "Error: Subreport could not be shown)
The only thing different this time is that the subreport uses OLAP as
a datasource.
Is there anything else which could be producing a misleading error
message, or do I need to be aware of other things when OLAP is
involved?
Thanks
WayneCan u try to refresh the fields in the dataset of the sub-report to
make sure that the field names are being picked up correctly? I've
run into this before as well-
Matt A|||Hi Wayne,
It seems most of the questions being posted here that relate to OLAP are not
being answered. Either we're missing something obvious or not a lot of
people are doing this. Or those who are don't come to this forum!
I'm new to RS and have limited AS exposure but am slowly piecing things
together through trial-and-error - not finding much assistance in books
online or the web at large. So I can't solve your issue but maybe I'll say
something that points you in the right direction.
So far, I gather that in the case of a parameterised OLAP datasource, one
must pass in the full unique name.
Example :
territoryRegionSite = [Territory].[Region - Site].[Site].&[25]
In this example, the &[25] denotes the key value for the specified site.
Or did you know that already?
Note :
URL access requires encoding, particularly in the case of the extra
ampersand. Something like this :
territoryRegionSite =%5BTerritory%5D.%5BRegion%20-%20Site%5D.%5BSite%5D.%26%5B25%5D
Martin Dreyer
"waynest" <wayne.swaby@.tribaleducation.co.uk> wrote in message
news:1144837002.247963.133960@.i39g2000cwa.googlegroups.com...
> Hi there
> Using RS 2005
>
> I've got a main report onto which I've placed a subreport to which I
> need to pass 2 parameters.
> I've done this a 100 times in the past but here I am getting this error
> message:
> [rsErrorExecutingSubreport] An error occurred while executing the
> subreport 'subreport1': One or more parameters required to run the
> report have not been specified.
> (The report shows "Error: Subreport could not be shown)
> The only thing different this time is that the subreport uses OLAP as
> a datasource.
> Is there anything else which could be producing a misleading error
> message, or do I need to be aware of other things when OLAP is
> involved?
> Thanks
> Wayne
>|||Okay, I was missing something obvious. Well, its obvious in retrospect.
When setting, in "Jump to report" the report parameters, I needed to use the
.UniqueName property instead of the default .Value property.
Eg. Fields!Region.UniqueName instead of Fields!Region.Value
That then sends the whole value [Region-Site].[Region].&[2] , which the
receiving report is expecting. It makes sense that it needs the whole path
to uniquely identify what members you're looking for.
Martin Dreyer
"Martin Dreyer" <martindr@.avision.co.za> wrote in message
news:%23eulHH$dGHA.2068@.TK2MSFTNGP02.phx.gbl...
> Hi Wayne,
> It seems most of the questions being posted here that relate to OLAP are
> not being answered. Either we're missing something obvious or not a lot of
> people are doing this. Or those who are don't come to this forum!
> I'm new to RS and have limited AS exposure but am slowly piecing things
> together through trial-and-error - not finding much assistance in books
> online or the web at large. So I can't solve your issue but maybe I'll say
> something that points you in the right direction.
> So far, I gather that in the case of a parameterised OLAP datasource, one
> must pass in the full unique name.
> Example :
> territoryRegionSite = [Territory].[Region - Site].[Site].&[25]
> In this example, the &[25] denotes the key value for the specified site.
> Or did you know that already?
> Note :
> URL access requires encoding, particularly in the case of the extra
> ampersand. Something like this :
> territoryRegionSite => %5BTerritory%5D.%5BRegion%20-%20Site%5D.%5BSite%5D.%26%5B25%5D
> Martin Dreyer
>
> "waynest" <wayne.swaby@.tribaleducation.co.uk> wrote in message
> news:1144837002.247963.133960@.i39g2000cwa.googlegroups.com...
>> Hi there
>> Using RS 2005
>>
>> I've got a main report onto which I've placed a subreport to which I
>> need to pass 2 parameters.
>> I've done this a 100 times in the past but here I am getting this error
>> message:
>> [rsErrorExecutingSubreport] An error occurred while executing the
>> subreport 'subreport1': One or more parameters required to run the
>> report have not been specified.
>> (The report shows "Error: Subreport could not be shown)
>> The only thing different this time is that the subreport uses OLAP as
>> a datasource.
>> Is there anything else which could be producing a misleading error
>> message, or do I need to be aware of other things when OLAP is
>> involved?
>> Thanks
>> Wayne
>
Monday, February 20, 2012
Partitions OLAP SQL 2005
How I can improve particions on Analysis services?
Somebody can recommend me a link on this...?
Thanks,
Cecilia
Chile
My implementation is on SQL 2005
Thanks,
Cecilia
Chile
|||is your question more about "How to use partitions to improve performance?"
"Hoody" <Hoody.cu@.gmail.com> wrote in message
news:1163432116.400716.46580@.h48g2000cwc.googlegro ups.com...
> Hi,
> How I can improve particions on Analysis services?
>
> Somebody can recommend me a link on this...?
>
> Thanks,
> Cecilia
> Chile
>
Partitions OLAP SQL 2005
How I can improve particions on Analysis services?
Somebody can recommend me a link on this...?
Thanks,
Cecilia
ChileMy implementation is on SQL 2005
Thanks,
Cecilia
Chile|||is your question more about "How to use partitions to improve performance?"
"Hoody" <Hoody.cu@.gmail.com> wrote in message
news:1163432116.400716.46580@.h48g2000cwc.googlegroups.com...
> Hi,
> How I can improve particions on Analysis services?
>
> Somebody can recommend me a link on this...?
>
> Thanks,
> Cecilia
> Chile
>
Partitions OLAP SQL 2005
How I can improve particions on Analysis services?
Somebody can recommend me a link on this...?
Thanks,
Cecilia
ChileMy implementation is on SQL 2005
Thanks,
Cecilia
Chile|||is your question more about "How to use partitions to improve performance?"
"Hoody" <Hoody.cu@.gmail.com> wrote in message
news:1163432116.400716.46580@.h48g2000cwc.googlegroups.com...
> Hi,
> How I can improve particions on Analysis services?
>
> Somebody can recommend me a link on this...?
>
> Thanks,
> Cecilia
> Chile
>