Showing posts with label filter. Show all posts
Showing posts with label filter. Show all posts

Friday, March 9, 2012

how is top % filter used?

ok question was stupid i know. i still want to know how the filters work and an example for each filter option would be great. why can't all documentations be like msdn library? the built-in documentation shipping with reporting services is just too advanced for moi.The Top% filter works similar to the TopN filter. A TopN filter with filter value =10 would return the first 10 values of the dataset - regardless of the total number of rows in the dataset. A Top% filter with filter value =10 would return the first 10% of the total number of rows in the dataset.

-- Robert|||I asked the question because the expression i wrote did not work so thought there was something wrong with my syntax. I finally found out that the reporting services filter does not correctly evaluate datatypes other than strings. So I changed my filter expression to convert the vaule into string first and now they work no thanks to the guy writing documentation. This is a bug and it took me quite a while to figure it out.|||

The alternative is to make sure it takes the value as a numeric by preceeding it with an equal sign. Without this post I would have spent a long time trying to get this to work.

how is top % filter used?

ok question was stupid i know. i still want to know how the filters work and an example for each filter option would be great. why can't all documentations be like msdn library? the built-in documentation shipping with reporting services is just too advanced for moi.
The Top% filter works similar to the TopN filter. A TopN filter with filter value =10 would return the first 10 values of the dataset - regardless of the total number of rows in the dataset. A Top% filter with filter value =10 would return the first 10% of the total number of rows in the dataset.

-- Robert|||I asked the question because the expression i wrote did not work so thought there was something wrong with my syntax. I finally found out that the reporting services filter does not correctly evaluate datatypes other than strings. So I changed my filter expression to convert the vaule into string first and now they work no thanks to the guy writing documentation. This is a bug and it took me quite a while to figure it out.
|||

The alternative is to make sure it takes the value as a numeric by preceeding it with an equal sign. Without this post I would have spent a long time trying to get this to work.

how is top % filter used?

ok question was stupid i know. i still want to know how the filters work and an example for each filter option would be great. why can't all documentations be like msdn library? the built-in documentation shipping with reporting services is just too advanced for moi.The Top% filter works similar to the TopN filter. A TopN filter with filter value =10 would return the first 10 values of the dataset - regardless of the total number of rows in the dataset. A Top% filter with filter value =10 would return the first 10% of the total number of rows in the dataset.

-- Robert|||I asked the question because the expression i wrote did not work so thought there was something wrong with my syntax. I finally found out that the reporting services filter does not correctly evaluate datatypes other than strings. So I changed my filter expression to convert the vaule into string first and now they work no thanks to the guy writing documentation. This is a bug and it took me quite a while to figure it out.|||

The alternative is to make sure it takes the value as a numeric by preceeding it with an equal sign. Without this post I would have spent a long time trying to get this to work.

How is the row filter clause and join filter should be....

Hi,
I am new to replication, I have the following tables in my
database, and I would like to replicate to other
subscriber using Merge Replication:
tblProduct (Product master)
ProdID (PK)
ProdGrp (FK to Product grouping)
ProdDesc
tblProdGrp (Product grouping)
ProdGrp (PK)
ProdGrpDesc
tblCustomer (Customer master)
CustID (PK)
BranchID (FK to branch master)
OfferGrp (FK to trade offer grouping)
CustName
tblBranch (Branch master)
BranchID (PK)
BranchName
tblTradeOfferGroup (Trade offer grouping)
OfferGrp (PK)
OfferGrpDesc
tblTradeOffer (Trade offer)
OfferID (PK)
OfferGrp (FK to Trade offer grouping)
StartEffDate
EndEffDate
tblTradeOfferProduct (Trade offer's product)
SeqID (PK)
ProdGrp (PK/FK)
OfferID (PK/FK)
OfferQty
*Note: SeqID + ProdGrp + OfferID is unique
I need all rows from tblProduct, tblProdGrp, tblBranch,
tblTradeOfferGroup, tblTradeOffer, tblTradeOfferProduct to
replicate to subscriber, but only single branch's customer
in tblCustomer at subscriber. How should I configure the
row filter and join filter in my Merge Replication?
Currently, I configure as following:-
Row Filter:
tblCustomer row filter tblCustomer.BranchID = '001'
tblProduct <publish all rows>
tblProdGrp <publish all rows>
tblBranch <publish all rows>
tblTradeOfferGroup <publish all rows>
tblTradeOffer <publish all rows>
tblTradeOfferProduct <publish all rows>
Join Filter:
Filtered table Table to filter
tblTradeOfferGroup tblTradeOffer
tblTradeOffer.OfferGrp = tblTradeOfferGroup.OfferGrp
tblTradeOffer tblTradeOfferProduct
tblTradeOfferProduct.OfferID = tblTradeOffer.OfferID
But, tblTradeOfferProduct not replicated over. A conflict
occurs saying FOREIGN KEY constraint etc. The weird case
is, when I synchorise again, the rows publisher's
tblTradeOfferProduct are deleted.
Please advice.
Thank you.
HKM
I think, replicating tblTradeOfferProduct should fix your problem.
Since tblTradeOfferProduct has relations to tblTradeOffer (and I believe to
tblProduct too ) it is better to replicate this table.
Otherwise yuo have to declare all those relations as "NOT FOR REPLICATION"
Since you dont have "NOT FOR REPLICATION" whenever that are constraint
violatins you will see merge failing with constraint violations.
And once some entries fail to propagate to the subscriber, in the next
merge, compensating actions (deletes for all the failed inserts) are made
and hence you will see that those rows vanish from the database.
You can either set the constraints to "NOT FOR REPLICATION" or replicate the
tblTradeOfferProduct table too. One of them should fix the problem
Hope that helps
--Mahesh
[ This posting is provided "as is" with no warranties and confers no
rights. ]
"HKM" <anonymous@.discussions.microsoft.com> wrote in message
news:04e801c49a0e$f4c9ebf0$a601280a@.phx.gbl...
> Hi,
> I am new to replication, I have the following tables in my
> database, and I would like to replicate to other
> subscriber using Merge Replication:
>
> tblProduct (Product master)
> --
> ProdID (PK)
> ProdGrp (FK to Product grouping)
> ProdDesc
> tblProdGrp (Product grouping)
> --
> ProdGrp (PK)
> ProdGrpDesc
> tblCustomer (Customer master)
> --
> CustID (PK)
> BranchID (FK to branch master)
> OfferGrp (FK to trade offer grouping)
> CustName
> tblBranch (Branch master)
> --
> BranchID (PK)
> BranchName
> tblTradeOfferGroup (Trade offer grouping)
> --
> OfferGrp (PK)
> OfferGrpDesc
> tblTradeOffer (Trade offer)
> --
> OfferID (PK)
> OfferGrp (FK to Trade offer grouping)
> StartEffDate
> EndEffDate
> tblTradeOfferProduct (Trade offer's product)
> --
> SeqID (PK)
> ProdGrp (PK/FK)
> OfferID (PK/FK)
> OfferQty
> *Note: SeqID + ProdGrp + OfferID is unique
> I need all rows from tblProduct, tblProdGrp, tblBranch,
> tblTradeOfferGroup, tblTradeOffer, tblTradeOfferProduct to
> replicate to subscriber, but only single branch's customer
> in tblCustomer at subscriber. How should I configure the
> row filter and join filter in my Merge Replication?
> Currently, I configure as following:-
> Row Filter:
> tblCustomer row filter tblCustomer.BranchID = '001'
> tblProduct <publish all rows>
> tblProdGrp <publish all rows>
> tblBranch <publish all rows>
> tblTradeOfferGroup <publish all rows>
> tblTradeOffer <publish all rows>
> tblTradeOfferProduct <publish all rows>
> Join Filter:
> Filtered table Table to filter
> tblTradeOfferGroup tblTradeOffer
> tblTradeOffer.OfferGrp = tblTradeOfferGroup.OfferGrp
> tblTradeOffer tblTradeOfferProduct
> tblTradeOfferProduct.OfferID = tblTradeOffer.OfferID
> But, tblTradeOfferProduct not replicated over. A conflict
> occurs saying FOREIGN KEY constraint etc. The weird case
> is, when I synchorise again, the rows publisher's
> tblTradeOfferProduct are deleted.
> Please advice.
> Thank you.
> HKM
>