Showing posts with label expression. Show all posts
Showing posts with label expression. Show all posts

Friday, March 30, 2012

Parameter Prompts

I don't see a way to attach an expression to a parameter prompt. I have a
custom report extension I have written that works great. I make a call to it
and it retrieves label values to report items. I would like to use that to
retrieve the prompt value for my parameters. Basically everything on the
reports are dynamic including labels because its a hosted application that
has mutliple clients and each can customise their view of the world. Is this
possible? If not is my only alternative to create by own pages to get the
parameters and pass them into the report thru URL or web service?Expressions are not supported for parameter prompt yet.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Alex Telford" <atelford6@.nospam.hotmail.com> wrote in message
news:OKqtoLcfEHA.708@.TK2MSFTNGP09.phx.gbl...
>I don't see a way to attach an expression to a parameter prompt. I have a
> custom report extension I have written that works great. I make a call to
> it
> and it retrieves label values to report items. I would like to use that to
> retrieve the prompt value for my parameters. Basically everything on the
> reports are dynamic including labels because its a hosted application that
> has mutliple clients and each can customise their view of the world. Is
> this
> possible? If not is my only alternative to create by own pages to get the
> parameters and pass them into the report thru URL or web service?
>|||Alex,
I have a urgent project requirement to code for rdl reports to create
the content of the report dynamically. I just noticed at the forum
that you did the same. Can you please help with ideas/code.
basically I wish to send commandtext (of a dataset) to the rdl report
at runtime.
thanks,
anand sagar
"Alex Telford" <atelford6@.nospam.hotmail.com> wrote in message news:<OKqtoLcfEHA.708@.TK2MSFTNGP09.phx.gbl>...
> I don't see a way to attach an expression to a parameter prompt. I have a
> custom report extension I have written that works great. I make a call to it
********

Parameter prompt based on expression

Hi,

Is it possible to construct the prompt (i.e. the text that is displayed next to the parameter text box when the report runs) for a parameter from an expression

Actually i have written some custom code and i want my parameter prompts to be populated based on the returned values from that custom code. I don't want these do be fixed texts.

Thanks,

Simranjeev

Can you use SWITCH option?

Igor.

|||

But the Switch option is also used inside an expression, and i don't know how to create the parameter labels from expressions.

On my report, I have a parameter called "StartDate". I've given it the label "Start Date:". Now i want that when the locale of the user is English, this label should be displayed as "Start Date:" and when the locale of the user changes to some other language, lets say German, then the label should be displayed as the translated value for "Start Date:" in German.

I've already done this for the textboxes on my reports, by calling custom code which reads from resource files depending on user locale. I wanted to know if this is possible for parameter labels as well, as i couldn't find any option to do so.

Wednesday, March 21, 2012

ParallelPeriod MDX function not working

I created a calculated measure called [Previous Year Percent Rejected]. I used the following expression:

(ParallelPeriod([Year],1,[Time].[Time Hierarchy].CurrentMember),[Measures].[Percent Rejected])

The syntax checks out fine. However, when I try to use the calculation, I get an error message -- with a #VALUE! in the column.

The error message reads " The parallel period expression expects a level expression for the argument. A hierarchy expression was used."

I tried many different variations but I'm always receiving the same message. Any suggestions?

David

If you're using AS 2005, the problem could be that there is also an attribute hierarchy associated with [Year]. So, you could try fully specifying the [Year] level, like:

(ParallelPeriod([Time].[Time Hierarchy].[Year],1,[Time].[Time Hierarchy].CurrentMember),[Measures].[Percent Rejected])

|||

Thank you Deepak. Your solution fixed the problem.

David

ParallelPeriod Error

I keep getting an error "The ParallelPeriod function expects a member expression for the argument. A tuple set expression was used." Is there something that I can use instead of LastPeriods to get this to work?

Here is the trend expression for a KPI that I get the error for:

(KPIVALUE('ABI Aggregate Test')-(CoalesceEmpty(

Aggregate({[Entities].[SITE].&[1]}

* {[Entities].[EntityType].[Site]}

* {[TDVs].[Parameter - Material].&[Bitum_Coal_Usage_Site -]}

* {ParallelPeriod([Date].[Year - Quarter - Month - Date].[Date], 1,

LastPeriods(3, StrToMember('[TDV Result Date].[Year - Quarter - Month - Date].[Year].[Calendar ' + EssMdx.Ess.Epm.AnalysisServices.MdxFunctions.Timeframe.GetLastFullYear() + ']')))}

, [Measures].[Result]),0)))

Could you describe what you are trying to do? It looks like you are trying to go back 1 day from a set consisting of the last 3 years. If you are trying to compare the KPI value to the same day 3 years ago you could use the Lag() function instead of LastPeriods(), but I don't really think that is what you are trying to do.|||

Sorry, the above line {ParallelPeriod([Date].[Year - Quarter - Month - Date].[Date], 1, should be {ParallelPeriod([Date].[Year - Quarter - Month - Date].[Year], 1,

I am trying to get a trend expression based on 1 year back (or 2 or 3...). ParallelPeriod has been working fine except with date ranges. The KPI value expression will give me a value for the last 3 full years (2006, 2005, and 2004) and is the same expression without the ParallelPeriod function. If the trend is 1 year back then it should be 2005, 2004, and 2003 (or it may be 2003, 2002, 2001).

Thanks

|||

That makes a bit more sense. In this case you simply have the LastPeriods and ParallelPeriod function nested the wrong way around, changing it to the following should work. Basically you need to pass the result of your GetLastFullYear Function to ParallelPeriod() and then pass the member from that to LastPeriods.

eg

(KPIVALUE('ABI Aggregate Test')-(CoalesceEmpty(

Aggregate({[Entities].[SITE].&[1]}

* {[Entities].[EntityType].[Site]}

* {[TDVs].[Parameter - Material].&[Bitum_Coal_Usage_Site -]}

* {LastPeriods(3,
ParallelPeriod([Date].[Year - Quarter - Month - Date].[Date], 1,StrToMember('[TDV Result Date].[Year - Quarter - Month - Date].[Year].[Calendar ' + EssMdx.Ess.Epm.AnalysisServices.MdxFunctions.Timeframe.GetLastFullYear() + ']')))}

, [Measures].[Result]),0)))

|||Thanks.

Friday, March 9, 2012

paging

please let me know the steps to set
=Int((RowNumber(Nothing)-1)/2)
expression for pagebreak in rdl file.On Apr 18, 7:34 am, abhi <a...@.discussions.microsoft.com> wrote:
> please let me know the steps to set
> =Int((RowNumber(Nothing)-1)/2)
> expression for pagebreak in rdl file.
Something like this should work.
1. Right click the list/table/matrix control and select 'Properties'
from the drop-down list.
2. Select the 'Edit details group...' button.
3. On the 'General' tab, below 'Group on:' and 'Expression' type in
something similar to the following:
=Ceiling(RowNumber(Nothing)/25)
Where, in this example, 25 is the number of rows per page. Then select
'Page break at end' in the Properties of the list/table/matrix
control. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant

Saturday, February 25, 2012

Pagebreak before Table and Expression on value Hidden

Hi Newsgroup,
in an Reporting-Services Report i have a table that is visible/hidden by a
specific parameter and it is set the pagebreak before table to true.
Now if the table is shown in the Report (The expression for the value hidden
returns false) the flag "Pagebreak before table" does not work.
If i remove the expression for the value hidden then the flag "Pagebreak
before table" works without any problems.
Seems to be a bug. Is there a fix or workaround for it?! Does SP1 for SQL
Server 2005 help for it?!
Best regards
DanielHi,
I have the same problem here. If anyone knows something please share
Best Regards,
Rui|||I had similar problems with page breaks not working when a table
visibility was being set by an expression using a report parameter
value (using RS2000 SP2). This appears to be a known issue - a quoted
Microsoft response on another forum states "Any conditional visibility
disables page breaks. We hope to make expression-based conditional
visibility (but not toggle-based conditional visibility) compatible
with page breaks in some future version".
I don't think this has been fixed in RS2005. I managed to implement a
(not ideal) work around by nesting tables inside rectangles and
applying the visibility expression to the rectangle, not the table. I
then applied page breaks to other items within the rectangle to
separate the page break attributes and the object visibility setting.
It doesn't work well with export to Excel though, since it affects
layout spacing and prevents separate pages being displayed on different
worksheets
Rui wrote:
> Hi,
> I have the same problem here. If anyone knows something please share
> Best Regards,
> Rui|||i have now the same problem on a ReportingServices 2005 Report.
I have placed the table in a rectangle. On the rectangle i have placed the
Visible/Hidden Expression. On the Table i have placed the page break before
setting.
Now in the report i get some blank pages. I work arround this report many
hours.
Is there no solution to use the pagebreak before and a visible/hidden
expression on one and the same table?!
The blankpages are on the export to pdf.
Thanks
Daniel
"AMasson" wrote:
> I had similar problems with page breaks not working when a table
> visibility was being set by an expression using a report parameter
> value (using RS2000 SP2). This appears to be a known issue - a quoted
> Microsoft response on another forum states "Any conditional visibility
> disables page breaks. We hope to make expression-based conditional
> visibility (but not toggle-based conditional visibility) compatible
> with page breaks in some future version".
> I don't think this has been fixed in RS2005. I managed to implement a
> (not ideal) work around by nesting tables inside rectangles and
> applying the visibility expression to the rectangle, not the table. I
> then applied page breaks to other items within the rectangle to
> separate the page break attributes and the object visibility setting.
> It doesn't work well with export to Excel though, since it affects
> layout spacing and prevents separate pages being displayed on different
> worksheets
> Rui wrote:
> > Hi,
> >
> > I have the same problem here. If anyone knows something please share
> >
> > Best Regards,
> > Rui
>