Friday, March 23, 2012
Highlight words from search expression
I want to create a search engine which will display a short text
description in the surrounding of the searched words. The problem is I
can't find the exact words in my search phrase in the results because
of stemming. Is there any way I can which words in the results were
responsible finding this particular result due to stemming?
Thanks,
Lior
Microsoft's stemming algorithm is based on the Ported Stemming algorithm.
You can roll your own implementation of this, or something like this
http://www.indexserverfaq.com/sqlhithighlighting.htm
"Lior Shorshi" <lishorsh@.gmail.com> wrote in message
news:1177242161.666784.11460@.y5g2000hsa.googlegrou ps.com...
> Hi,
> I want to create a search engine which will display a short text
> description in the surrounding of the searched words. The problem is I
> can't find the exact words in my search phrase in the results because
> of stemming. Is there any way I can which words in the results were
> responsible finding this particular result due to stemming?
> Thanks,
> Lior
>
Friday, March 9, 2012
Hierarchy MDX
Below is my hierarchy :
Program 1
Supplier 1
Supplier 2
Supplier 3
.
.
.
Supplier N
I need an MDX expression which on retrieves Suppliers for Program 1 and so on.
So right now when i browse my cube I see all Suppliers for all Programs because of which there are alot of blank rows.
I need only Suppliers unique to each Program. So the final outcome of the hierarch above should be :
Program 1
Supplier 1
Supplier 5
Supplier 7
since Program 1 has only 3 suppliers.
TIA
- Russ
Not really all that clear on the structure of your dimension. Take a look at CROSSSJOIN, NONEMPTYCROSSJOIN, NONEMPTY, EXISTS, and the NON EMPTY keyword.
B.
|||Bryan,
Thanks for the pointers. I'll look into the Keywords that you mentioned.
However, here is my situation in a little more detail.... This is what it looks like when i browse my cube :
- Program 1
- Supplier 1
.
.
.
.
- Supplier 10
- Program 2
Supplier 1
.
.
.
.
Supplier 10
and so on..."ALL" the 10 suppliers are showing up for each program. However , Program 1 has only 3 suppliers and Program 2 has 5 suppliers. I need an MDX which can be applied as a formula at the Program level and applies to all its supplier children displaying only the ones which exist with values and not all 10 suppliers.
I could do this manuall by removing each Supplier which doesnt exist for that Program but i need a generic MDX which looks at the Program Number and applies it to its children at all levels.
Any ideas ?
Thanks
Russzee
|||Hi russzee,
how the Programs and Suppliers are related in your cube desing? Only in fact table? Do you use any of wide spreaded SSAS Client like Excel or Proclarity or you write MDX self?
|||Russzee,
Vladimir is trying to clarify the structure of your dimensions and cube. What is not clear is whether Programs and Suppliers exist within a single dimension or are part of two separate dimensions associated with your cube. Either one of these situations can give you a structure such as you identified.
B.
|||Hello,
Thanks once again for the follow up..
Program and Suppliers are two seperate dimensions in SSAS 2005 and there is a Fact Table called SupplierProgram linked in a Star Schema as shown below :
Program <- SupplierProgram > Supplier
So I have dynamic Supplier row members for each Program and i need an MDX which can identify the 'Supplier' row members on the fly from their parent 'Program' Members.
My client application is Performance Point Dashboard Designer which has no MDX support in CTP_2 so I'm looking to create this MDX in SSAS 2005 and port it to the Performance Point Designer.
Thanks
russzee
|||Here are a few queries that might get you headed in the right direction. Within a dimension, SSAS employs auto-exists functionality for this kind of thing. Across dimensions, you have to leverage a fact table to determine what represents a valid combination. These results may all look the same (except for the baseline query that demonstrates a full cross product). Still, there are subtle differences between these you need to understand before taking one path or the other.
Good luck,
Bryan
Code Snippet
select -- BASELINE QUERY
[Measures].[Reseller Sales Amount] on 0,
Product.Category.Category.Members * Employee.Employee.Employee.Members on 1
from [Adventure Works]
;
select
[Measures].[Reseller Sales Amount] on 0,
NON EMPTY Product.Category.Category.Members * Employee.Employee.Employee.Members on 1
from [Adventure Works]
;
select
{} on 0,
NONEMPTYCROSSJOIN(Product.Category.Category.Members,Employee.Employee.Employee.Members) on 1
from [Adventure Works]
where [Measures].[Reseller Sales Amount]
;
select
{} on 0,
Product.Category.Category.Members *
NONEMPTY(Employee.Employee.Employee.Members,Product.Category.Category.Members)
on 1
from [Adventure Works]
where [Measures].[Reseller Sales Amount]
;
select
{} on 0,
Product.Category.Category.Members *
EXISTS(Employee.Employee.Employee.Members,Product.Category.Category.Members,'Reseller Sales')
on 1
from [Adventure Works]
;
Sunday, February 26, 2012
Hiding tables in a report
Hi,
Can anyone help me with the expression I need to use in order to hide a table with no rows? I have put my table inside a rectangle with the idea that I would just hide the rectangle if there weren't any rows but I can't find any examples of what expression I can use to specify the no rows condition.
Thanks!
Debi
Something like for the Hidden property of the rectangle:=iif(RowCount("NameofDatasetPopulatingTheTabe") > 0, "false", "true")|||
Andy,
Thanks for the posting. RowCount doesn't work for me (unrecognized identifier). That may be because I am using the ReportViewer control in an ASP page and not actually using SQL Server Reporting Services. I probably should have included that in my original posting. Also, if it makes a difference this is a subreport that is using a filter based on a parameter passed from the main report. I'm not sure if that will makes a difference but the datasource will usually have records but a table may not have any rows due to the filter. I want to eliminate the header that gets displayed when there are no rows to show.
Thanks!
Debi
|||I have made some progress on this. The correct syntax is:
=IIf(CountRows("table1") > 0, false, true)
I added this to the visibility of the table and it does hide the table header if there aren't any rows. The only problem is that it still leaves the white space that would have been occupied by the table header. I had read some tips about creating a rectangle and then moving the table into the rectangle and setting the visibility for the rectangle but I can't get it to work. If I use the same expression I get the following error:
Error 1 The Hidden expression for the rectangle ‘rectangle1’ has a scope parameter that is not valid for an aggregate function. The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a data set.
It seems that table1 is out of scope in this instance but I can't figure out how the scope should be defined. Any one have any suggestions?
Also, will this even accomplish what I want (eliminating the whitespace)? This rectangle/table is in a subreport if that makes any difference.
Thanks!
Debi
|||You can use the same logic for a rectangle, but your scope parameter needs to be the name of the dataset, not the name of the table.So if your table uses a dataset like "MyDataSet", then use that instead of "table1". The Rectangle will be aware of that scope.|||
Just thought I would mention that there is also the ability to set a message when a table has no rows. This automatically hides the table and displays your message. Setting the "No Rows" property expression to = "" will also hide the table with no message.
Simone
hiding table with null dataset
visibility expression of table properties. any ideas for using
expressions to hide a table with a null dataset would be great.
tia
mikeHi Mike,
In my reports when there is not data to display (null data set) I have a
textbox that is hidden until the NULL dataset is verified. They it shows "No
Data To Display For the Report Criteria" You can use an expression similar
to the following, just revers the True,False logic if you need to.
=iif(rownumber("DataSetName") = 0, false, true)
Hope this helps,
--
Rodney Landrum - Author, "Pro SQL Server Reporting Services" (Apress)
http://www.amazon.com/exec/obidos/tg/detail/-/1590594231/102-0081700-1383300
http://www.apress.com/book/bookDisplay.html?bID=365
"michaelwall" <michael.w.i@.gmail.com> wrote in message
news:1102355383.431101.270290@.f14g2000cwb.googlegroups.com...
> =iif( Fields!SomeCol.IsMissing , TRUE, FALSE) does not seem to work in
> visibility expression of table properties. any ideas for using
> expressions to hide a table with a null dataset would be great.
> tia
> mike
>|||perfect ! thanks
"Rodney Landrum" wrote:
> Hi Mike,
> In my reports when there is not data to display (null data set) I have a
> textbox that is hidden until the NULL dataset is verified. They it shows "No
> Data To Display For the Report Criteria" You can use an expression similar
> to the following, just revers the True,False logic if you need to.
> =iif(rownumber("DataSetName") = 0, false, true)
> Hope this helps,
> --
> Rodney Landrum - Author, "Pro SQL Server Reporting Services" (Apress)
> http://www.amazon.com/exec/obidos/tg/detail/-/1590594231/102-0081700-1383300
> http://www.apress.com/book/bookDisplay.html?bID=365
>
>
> "michaelwall" <michael.w.i@.gmail.com> wrote in message
> news:1102355383.431101.270290@.f14g2000cwb.googlegroups.com...
> > =iif( Fields!SomeCol.IsMissing , TRUE, FALSE) does not seem to work in
> > visibility expression of table properties. any ideas for using
> > expressions to hide a table with a null dataset would be great.
> > tia
> >
> > mike
> >
>
>|||I responded early - The expression hides the table whether the dataset is
emprty or not.
any further ideas? what do you mean by "until the NULL dataset is
verified" how is this done in the report designer, do i need custom code ? It
seems as if the visibility by expression should cover this but I find very
little documentation and no intellisense to experiment... thanks again ...
"Rodney Landrum" wrote:
> Hi Mike,
> In my reports when there is not data to display (null data set) I have a
> textbox that is hidden until the NULL dataset is verified. They it shows "No
> Data To Display For the Report Criteria" You can use an expression similar
> to the following, just revers the True,False logic if you need to.
> =iif(rownumber("DataSetName") = 0, false, true)
> Hope this helps,
> --
> Rodney Landrum - Author, "Pro SQL Server Reporting Services" (Apress)
> http://www.amazon.com/exec/obidos/tg/detail/-/1590594231/102-0081700-1383300
> http://www.apress.com/book/bookDisplay.html?bID=365
>
>
> "michaelwall" <michael.w.i@.gmail.com> wrote in message
> news:1102355383.431101.270290@.f14g2000cwb.googlegroups.com...
> > =iif( Fields!SomeCol.IsMissing , TRUE, FALSE) does not seem to work in
> > visibility expression of table properties. any ideas for using
> > expressions to hide a table with a null dataset would be great.
> > tia
> >
> > mike
> >
>
>|||=iif(ReportItems!txtTotalDistribution.Value >= 1, FALSE, TRUE)
works by looking at an aggregate SUM() field in the table footer
"Rodney Landrum" wrote:
> Hi Mike,
> In my reports when there is not data to display (null data set) I have a
> textbox that is hidden until the NULL dataset is verified. They it shows "No
> Data To Display For the Report Criteria" You can use an expression similar
> to the following, just revers the True,False logic if you need to.
> =iif(rownumber("DataSetName") = 0, false, true)
> Hope this helps,
> --
> Rodney Landrum - Author, "Pro SQL Server Reporting Services" (Apress)
> http://www.amazon.com/exec/obidos/tg/detail/-/1590594231/102-0081700-1383300
> http://www.apress.com/book/bookDisplay.html?bID=365
>
>
> "michaelwall" <michael.w.i@.gmail.com> wrote in message
> news:1102355383.431101.270290@.f14g2000cwb.googlegroups.com...
> > =iif( Fields!SomeCol.IsMissing , TRUE, FALSE) does not seem to work in
> > visibility expression of table properties. any ideas for using
> > expressions to hide a table with a null dataset would be great.
> > tia
> >
> > mike
> >
>
>|||Data regions (table, list, matrix, charts, subreports) have a NoRows
property. If set, the NoRows message will be shown instead of the data
region. In addition, style properties (fonts, colors, etc.) directly set on
the data region reportitem (e.g. table) will apply to the NoRows message.
Alternatively, you could use the RowCount aggregate functions to determine
the number of rows in a dataset. E.g. =RowCount("DataSetName")
See also:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rscreate/htm/rcr_creating_expressions_v1_0k6r.asp
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"michaelwall" <michaelwall@.discussions.microsoft.com> wrote in message
news:4D53BEB6-D542-49B1-A8F5-A144990CB93C@.microsoft.com...
> perfect ! thanks
> "Rodney Landrum" wrote:
> > Hi Mike,
> > In my reports when there is not data to display (null data set) I have a
> > textbox that is hidden until the NULL dataset is verified. They it shows
"No
> > Data To Display For the Report Criteria" You can use an expression
similar
> > to the following, just revers the True,False logic if you need to.
> >
> > =iif(rownumber("DataSetName") = 0, false, true)
> >
> > Hope this helps,
> > --
> > Rodney Landrum - Author, "Pro SQL Server Reporting Services" (Apress)
> >
http://www.amazon.com/exec/obidos/tg/detail/-/1590594231/102-0081700-1383300
> > http://www.apress.com/book/bookDisplay.html?bID=365
> >
> >
> >
> >
> > "michaelwall" <michael.w.i@.gmail.com> wrote in message
> > news:1102355383.431101.270290@.f14g2000cwb.googlegroups.com...
> > > =iif( Fields!SomeCol.IsMissing , TRUE, FALSE) does not seem to work in
> > > visibility expression of table properties. any ideas for using
> > > expressions to hide a table with a null dataset would be great.
> > > tia
> > >
> > > mike
> > >
> >
> >
> >
Sunday, February 19, 2012
Hiding columns
One more query!!
What expression can I use to set the visibility of a list or a matrix
I tried
=IIf(Fields!count.Value > 20, 0 , 1 )
and
=IIf(Fields!count.Value > 20, "False", "True" )
and
=IIf(Fields!count.Value > 20, "Hidden", "Visible" )
none of these work.
Can anyone tell me what is wrong here?
Thanks
--
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.I am suspicious that you are using Fields!count.Value and not
Sum(Fields!count.Value) if you are trying to hide a list or matrix as you
will probably want to do this over multiple rows. The first one should work
as should an expression that returns a boolean, =(Fields!Count.Value>20).
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"SqlJunkies User" <User@.-NOSPAM-SqlJunkies.com> wrote in message
news:uAZQZYvVEHA.2520@.TK2MSFTNGP12.phx.gbl...
> Hi
> One more query!!
> What expression can I use to set the visibility of a list or a matrix
> I tried
> =IIf(Fields!count.Value > 20, 0 , 1 )
> and
> =IIf(Fields!count.Value > 20, "False", "True" )
> and
> =IIf(Fields!count.Value > 20, "Hidden", "Visible" )
> none of these work.
> Can anyone tell me what is wrong here?
> Thanks
>
> --
> Posted using Wimdows.net NntpNews Component -
> Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine
supports Post Alerts, Ratings, and Searching.
Hide/Show parameter based on Multi-Valued Parameter Selection
Hi!
I have a parameter that sould be visible only if certains values are selected on a
multi-value parameter. I tried to use an expression for the parameter's hidden property, but I saw it's not possible (at least not in the usual way, as with tables). Does anyone know how to do it?
Thanks!
There is no way to do this through RDL, but if you are using the report viewer controls, you can programmatically hide the parameters using the ReportViewer control API.