Showing posts with label selected. Show all posts
Showing posts with label selected. Show all posts

Monday, March 19, 2012

Displaying selected rows from a Fact table

I have a fact table which stores data ( customer name, document type, editing start time, editing end time, editor, revision id etc) for each revision of a document.

While displaying data however i need to take into account only the last revision of each document.

What is the best way of doing this? Do I need to create a separate dimension table with the document id and max revision id as fields or is there a better way of doing it?

One idea would be to mark Revision dimension as of type Time, and use semiadditive measure LastNonEmptyChild - this will show data for the last revision only.|||

I also need to create calculated members based on the lastnonemptychild. How do I do that?

Eg: for last nonemptychild ie. last revision I need to count the number of records that are of type 'S'

I also need to calculate percentage of records of last revision that are greater than target time and less than target time.....

|||This is very easy to do. Assuming you have attribute called RecordType, you can create calculated measure with|||

In the previous post you mentioned mark Revision dimension of type time. How do I do tht?

Does this also mean tht I should hv a separate dimension for revisions with attributes being documentid and revid and the hierarchy being documentid -> revid ? For the lastnonemptychild aggregation to work? That would mean tht the dimension table would contain as many records as the fact table isnt it?

|||

You don't need to change anything about your revision dimension. I imagine, that it has key attribute having values of 1,2,3,... up to whatever largest revision you think you will have in few years. I don't see the reason to include document id into this dimension - different documents can have same revision - there is no problem with it.

In the dimension editor, simply go to the properties of dimension, and choose the value Time for the property Type.

|||After changing revision dimension's property type to time, how do I use the semiadditive measure last child to sum only the records with the last revision id for the Measure InTAT ( where InTAT is either 1 or 0) ?|||You need to change Aggregation Function for this measure from Sum to LastNonEmptyChild.|||For a calculated measure how do I use the LastNonempty measure and get the sum of records with last revid?|||It is not a calculated measure. It is a real measure. Marking it as LastNonEmpty will cause returning sum of records with last revid.|||I have some calculated measures called TAT Factor, Half TAT etc for which too I need to be able to sum on the lastrevid. How do I do that?|||Make them a real measures, and move whatever expressions you use for them to the Leaves(Revision) inside MDX Script.|||I am new to analysis services. Could you explain what you mean by moving the expressions to the leaves? Should I make calculated columns in the view?

Displaying selected rows from a Fact table

I have a fact table which stores data ( customer name, document type, editing start time, editing end time, editor, revision id etc) for each revision of a document.

While displaying data however i need to take into account only the last revision of each document.

What is the best way of doing this? Do I need to create a separate dimension table with the document id and max revision id as fields or is there a better way of doing it?

One idea would be to mark Revision dimension as of type Time, and use semiadditive measure LastNonEmptyChild - this will show data for the last revision only.|||

I also need to create calculated members based on the lastnonemptychild. How do I do that?

Eg: for last nonemptychild ie. last revision I need to count the number of records that are of type 'S'

I also need to calculate percentage of records of last revision that are greater than target time and less than target time.....

|||This is very easy to do. Assuming you have attribute called RecordType, you can create calculated measure with|||

In the previous post you mentioned mark Revision dimension of type time. How do I do tht?

Does this also mean tht I should hv a separate dimension for revisions with attributes being documentid and revid and the hierarchy being documentid -> revid ? For the lastnonemptychild aggregation to work? That would mean tht the dimension table would contain as many records as the fact table isnt it?

|||

You don't need to change anything about your revision dimension. I imagine, that it has key attribute having values of 1,2,3,... up to whatever largest revision you think you will have in few years. I don't see the reason to include document id into this dimension - different documents can have same revision - there is no problem with it.

In the dimension editor, simply go to the properties of dimension, and choose the value Time for the property Type.

|||After changing revision dimension's property type to time, how do I use the semiadditive measure last child to sum only the records with the last revision id for the Measure InTAT ( where InTAT is either 1 or 0) ?|||You need to change Aggregation Function for this measure from Sum to LastNonEmptyChild.|||For a calculated measure how do I use the LastNonempty measure and get the sum of records with last revid?|||It is not a calculated measure. It is a real measure. Marking it as LastNonEmpty will cause returning sum of records with last revid.|||I have some calculated measures called TAT Factor, Half TAT etc for which too I need to be able to sum on the lastrevid. How do I do that?|||Make them a real measures, and move whatever expressions you use for them to the Leaves(Revision) inside MDX Script.|||I am new to analysis services. Could you explain what you mean by moving the expressions to the leaves? Should I make calculated columns in the view?

Displaying Selected Report Parameter on Report

Can you display the selected report parameter on the report after the user
submits? I actually want to display the label property of the report
parameter on the report, not the value behind the scenes.
If I just drag and drop from the tool bar, nothing displays.
If I use =Fields(Parameters!P1.Value).Value, I get an error saying the value
for the textbox refers to an non-existing report parameter.
Can anyone helpTry Parameters!P1.Label
Sanjeev
"dillig" <dillig@.discussions.microsoft.com> wrote in message
news:D9904481-F4B3-4585-A832-936F89C80817@.microsoft.com...
> Can you display the selected report parameter on the report after the user
> submits? I actually want to display the label property of the report
> parameter on the report, not the value behind the scenes.
> If I just drag and drop from the tool bar, nothing displays.
> If I use =Fields(Parameters!P1.Value).Value, I get an error saying the
> value
> for the textbox refers to an non-existing report parameter.
> Can anyone help

Displaying selected parameters in a report

Hi,

In the report I'm working on, I want to display a list of the parameters selected by the user, as in:

Selected Cars:
Toyota Camry
Ford Taurus
Chevy Corvette
Saturn Ion

Note that these are selected items from a multi-value parameter. How can I go about doing this with Reporting Services 2005? In ASP.NET, I'd just use the parameter array as the datasource for a repeater/datagrid/gridview. Could I do something similar with SSRS? I'd really like to use the format specified above, whether or not it is in a table; I really don't want to do the following:

Selected Cars: Toyota Camry, Ford Taurus, Chevy Corvette, Saturn Ion.

Thanks,
MarkOkay, I figured out how to do this using the following expression:

=Join(Parameters!parameter_name.Value, vbNewLine)

My question now is, can I use the parameter label instead of the value? Or, alternatively, is there a way to trim a character off the end of the value when displaying it? In my stored proc, I had to append a delimiter (a | in my case) to the value, but I don't want this to appear in the report.

Right now, it looks like:

Selected Cars:
Toyota Camry|
Ford Taurus|
Chevy Corvette|
Saturn Ion|

Thanks,
Mark|||

To show the Parameter label, use the .Label property instead of .Value:

Parameters!parameter_name.Label

For multi-value parameters, the Label property (like the Value property) will return an array of values so you will have to Join() them.

|||I tried that earlier and got an error, but I must have done something else wrong because I just tried it again and it works. Thanks!

Sunday, March 11, 2012

Displaying Multi parameter info : Report builder

Hi All,

Is there is any way to display the User selected parameter information if the parameter is multiselect ?

I was able to display if the parameter is single valued but if it is multivalued (list), i was not able to .

Any help is greatly appreciated.

Regards,

Can you elaborate your question?

Regards,
Ramesh KS

|||

Hi!

Join([your parameter, either value or label], [your delimiter]), will do the trick for you.

//H?kan

|||

Hi.

Thanks a lot , it worked.

|||

HI Bala_SSRS:

Could You Post Your Sources for a code sample ?

TKS

|||

Here is the sample code

=String.Format("Organization Name: {0}",Join(Parameters!OrganizationName.Value,";"))

Thanks,

Bala

Friday, March 9, 2012

Displaying images in a report

Hi all

I have a report and I display specific images based on the parameter selected. i.e. If parameter value = "1" then I display "image1.jpg". The images were added as a part of the project so I was able to display the images by setting the value property on the images to the image file name. So if I want to display image1.jpg then I would set the value property of the image to "image1.jpg".

Now I have decided to create a folder called "images" in which I want to keep all the images. So I have removed the images from the project. In the value property of the image when I put "/images/image1.jpg" it doesnt work. I have also tried "images/image1.jpg" When I run the report in the Preview mode, the image is not shown. How do i fix this?

The directory struncture is so:

Reports folder

--images folder

-image1.jpg

-image2.jpg

--report1.rdl

--report2.rdl

Thanks guys!!

One thing you could do is embed the images so they're available without being published separately. But if you have a very large number of alternative images, I guess this might be cumbersome.

For dynamic images, you can create a parameter with the location/path of these reports, such as file://.... or /. finishing up with the final path slash. Now your values are something like

Code Snippet

IIF(paramvalue = "1",paramlocation & "image1.jpg", paramlocation & "image2.jpg")

... or maybe if the "1" represents a part of the image filename, it's really just something like the following (no IIF):

Code Snippet

paramlocation & "image" & paramvalue & ".jpg"

... IOW, you can fully-qualify the path, and this is one way I know for sure it works.

I'm not entirely clear on where you put the images and whether, therefore, the relative path you're using is going to work as you think it is. If it's on the Report Server you can try using Globals!ReportFolderand Globals!ReportServer to build up the image path but I haven't personally had much luck doing it that way.

You may also be using ReportViewer and trying to set the folder according to where your EXE is (or your webapp if it's a webform ReportViewer)? I think you still need to fully-qualify that path.

>L<

|||I have several images that I need to change based upon a parameter being passed in. I put the images in my images folder on my website and changed the image names to each parameter being passed. I then placed a web image on the report and changed the value of the image in properties to something like the following. "=http://server/images/" & Fields!parameter.Value & ".jpg" This way it changes the image based upon a parameter. Basically changing the image property to a string. Hope this might help.

Jason

displaying different reports based on a parameter

Hi,

I have bunch of reports that take same set of parameters. I am trying parametrize the report type so that depending on the report type selected, body should display that report when user hits "View report" button. How can I do this? Pardon me if there is an obvious solution as I am pretty new to the joys of MS Reporting Services.

Thanks a bunch.

add a subreport control and then set the sub report name using an expression

Friday, February 24, 2012

Display Selected Parameters in Report

Is there a way of showing which parameter values were chosen from a multi-value parameter list in RS 2005?

I want to show in the Report Header the parameters that have been chosen. There are "Count", "Value", "Label", "IsMultiValue" options in the expression builder for the parameter but no way of knowing which ones were selected?

Found the answer....from Robert....

Once you mark a paraeter as "multi-value", the .Value property will return an object[] with all selected values. If only one value is selected, it will be an object array of length = 1. Object arrays cannot be directly compared with Strings.

To access individual values of a multi value parameter you can use expressions like this:
=Parameters!MVP1.IsMultiValue
boolean flag - tells if a parameter is defined as multi value
=Parameters!MVP1.Count
returns the number of values in the array
=Parameters!MVP1.Value(0)
returns the first selected value
=Join(Parameters!MVP1.Value)
creates a space separated list of values
=Join(Parameters!MVP1.Value, ", ")
creates a comma separated list of values
=Split("a b c", " ")
to create a multi value object array from a string (this can be used e.g. for drillthrough parameters, subreports, or query parameters)

See also MSDN:
* http://msdn.microsoft.com/library/en-us/vblr7/html/vafctjoin.asp
* http://msdn.microsoft.com/library/en-us/vbenlr98/html/vafctsplit.asp

-- Robert

Display selected multivalue parameters

I would like to display the selections made for a parameter in a multi select dropdown.

If i do as following for a textbox..doesnt work.

=Parameters!STORELOCATION.Label.ToString

I would like the labels to be displayed as below.

Report is for the following stores: abc, xyz

Pls help!

Use this expression...

=Join(Parameters!Storelocation.label, ", ")

|||Thank you !! This works..

Display selected multivalue parameters

I would like to display the selections made for a parameter in a multi select dropdown.

If i do as following for a textbox..doesnt work.

=Parameters!STORELOCATION.Label.ToString

I would like the labels to be displayed as below.

Report is for the following stores: abc, xyz

Pls help!

Use this expression...

=Join(Parameters!Storelocation.label, ", ")

|||Thank you !! This works..

Display Report Filters in Excel Problem

Dear Anyone,

I have a report that displays the user's selected filters. I have placed this on the page footer. When I export this to excel, it wont display. Am I doing something wrong?

Thanks,
JosephHi Joseph,

I had this same problem before where I place the parameter selection display in the page footer. Apparently, if you place it in the page footer, it will be exported to excel.

What you can do is place it on the body along with the report table. This wil allow you to include your additional information in excel.

Thanks,
Joseph

Friday, February 17, 2012

Display multi value parameter LABEL

Hello.
I have a multi value parameter in my report.
I want to know how can I display all of the selected values in this
parameter in a text box.
Whan I try to use this parameter in a textBox it automaticly take the
value:
Parameter.param.Value(0) Whice take only the first select value.
Is there a simple way of doing it?
Thanks.Ok.
I found it -
=3DJoin(Parameter!param1.value,",")
Thanks.
nicknack =D7=9B=D7=AA=D7=91:
> Hello.
> I have a multi value parameter in my report.
> I want to know how can I display all of the selected values in this
> parameter in a text box.
> Whan I try to use this parameter in a textBox it automaticly take the
> value:
> Parameter.param.Value(0) Whice take only the first select value.
> Is there a simple way of doing it?
> Thanks.|||On Mar 6, 7:26 am, "nicknack" <roezo...@.gmail.com> wrote:
> Ok.
> I found it -
> =3DJoin(Parameter!param1.value,",")
> Thanks.
> nicknack =D7=9B=D7=AA=D7=91:
> > Hello.
> > I have a multi value parameter in my report.
> > I want to know how can I display all of the selected values in this
> > parameter in a text box.
> > Whan I try to use this parameter in a textBox it automaticly take the
> > value:
> > Parameter.param.Value(0) Whice take only the first select value.
> > Is there a simple way of doing it?
> > Thanks.
Good thing to know.
Regards,
Enrique Martinez
Sr. SQL Server Developer|||What if the user selects All and the list of items is very long. For example
vendors you sell their items? How can you show "All Vendors" instead of the
very long list of names. It overruns the report.
--
cjm
"EMartinez" wrote:
> On Mar 6, 7:26 am, "nicknack" <roezo...@.gmail.com> wrote:
> > Ok.
> > I found it -
> > =Join(Parameter!param1.value,",")
> >
> > Thanks.
> >
> > nicknack ×?ת×?:
> >
> > > Hello.
> > > I have a multi value parameter in my report.
> > > I want to know how can I display all of the selected values in this
> > > parameter in a text box.
> > > Whan I try to use this parameter in a textBox it automaticly take the
> > > value:
> > > Parameter.param.Value(0) Whice take only the first select value.
> >
> > > Is there a simple way of doing it?
> >
> > > Thanks.
>
> Good thing to know.
> Regards,
> Enrique Martinez
> Sr. SQL Server Developer
>|||If, for example, you had a list of 25 vendors you could use:
= IIF(Parameters!Vendors.Count = 25, "All Vendors",
(JOIN(Parameters!Vendors.Label, ", ")))
Just adjust the number the .Count equals to the total number of values in
your parameter list.
"cmayers" wrote:
> What if the user selects All and the list of items is very long. For example
> vendors you sell their items? How can you show "All Vendors" instead of the
> very long list of names. It overruns the report.
> --
> cjm
>
> "EMartinez" wrote:
> > On Mar 6, 7:26 am, "nicknack" <roezo...@.gmail.com> wrote:
> > > Ok.
> > > I found it -
> > > =Join(Parameter!param1.value,",")
> > >
> > > Thanks.
> > >
> > > nicknack ×?ת×?:
> > >
> > > > Hello.
> > > > I have a multi value parameter in my report.
> > > > I want to know how can I display all of the selected values in this
> > > > parameter in a text box.
> > > > Whan I try to use this parameter in a textBox it automaticly take the
> > > > value:
> > > > Parameter.param.Value(0) Whice take only the first select value.
> > >
> > > > Is there a simple way of doing it?
> > >
> > > > Thanks.
> >
> >
> > Good thing to know.
> >
> > Regards,
> >
> > Enrique Martinez
> > Sr. SQL Server Developer
> >
> >

Tuesday, February 14, 2012

Display dropdown parameter label on report

I have a dropdown parameter in my report (Sites) with the ID field as a
integer and the display field as a string. How can I display the selected
'display' field on the report? I can display the ID (int) ok with
= Parameters!SiteID.Value
But how can I get the actual selected dropdown text? Can't find this
anywhere!
cheers,
SimonYou can try:
= Parameters!SiteID.Label
"Anonymous Poster" wrote:
> I have a dropdown parameter in my report (Sites) with the ID field as a
> integer and the display field as a string. How can I display the selected
> 'display' field on the report? I can display the ID (int) ok with
> = Parameters!SiteID.Value
> But how can I get the actual selected dropdown text? Can't find this
> anywhere!
> cheers,
> Simon
>
>|||Excellent! Thanks
Simon
"Andre" <Andre@.discussions.microsoft.com> wrote in message
news:CE5FD740-6859-4830-AA02-76C8C97AED34@.microsoft.com...
> You can try:
> = Parameters!SiteID.Label
>
> "Anonymous Poster" wrote:
> > I have a dropdown parameter in my report (Sites) with the ID field as a
> > integer and the display field as a string. How can I display the
selected
> > 'display' field on the report? I can display the ID (int) ok with
> >
> > = Parameters!SiteID.Value
> >
> > But how can I get the actual selected dropdown text? Can't find this
> > anywhere!
> >
> > cheers,
> >
> > Simon
> >
> >
> >