Price filter not showing proper price range in Magento 1.7 - magento-1.7

Magento price filter on category page not showing proper price range on some category pages.
We have set price range Rs.1000 from magento admin section. Most of the categories are showing perfect product price range. For example
$ 0 - $ 1k
$ 1k - $ 2k
$ 2k - $ 3k
But some are showing categories it price range is coming Rs10k. For example
$ 0 - $10k
$ 10k - $20k
Please help me with this. If anyone have any idea.

Related

Crystal Reports SUM formula help. Don't SUM values with specific IDs

I have a table with rows of Invoice data and I want to SUM the values of all line items where the Item ID is not equal to 0000 or 9999.
The Item IDs I want to exlcude 0000 and 9999 never change.
ITEM ID
NAME
WORK VALUE
TOTAL COMPLETED
0000
HOLD 1
0.00
1,234
1234
MATERIAL A
333.00
76.00
1235
MATERIAL B
567.00
7043.00
1236
MATERIAL C
981.00
321.00
1237
MATERIAL 4
430.00
5445.00
1238
MATERIAL 5
10.00
897.00
1239
MATERIAL 6
18.00
654.00
1240
MATERIAL 7
882.00
3.00
1241
MATERIAL 8
777.00
65.00
9999
ZY HOLD
0.00
111.00
So the value returned in the report from the example above should = 18,502.00 not 20,847.00
I have tried:
IF NOT((TONUMBER({Invoices.InvoiceItems~ItemNumber}) = 9999))
THEN
(SUM({Invoices.InvoiceItems~InvoiceValue})+SUM({Invoices.InvoiceItems~TotalCompleted}
but this doesn't work, it still sums the value from the 9999 line item
I would create a Running Total Field to accomplish this.
A Running Total Field works very similar to the Summary Field, but allows a lot more control over which records are evaluated when summarizing the data. To setup a Running Total Field for your needs try the following steps.
Create a new Running Total Field.
Set the "Field to summarize" to use the Total Completed column from your database. Set the "Type of summary" to SUM.
Set the radio button in the "Evaluate" section to "Use a formula", then click the X-2 button to create the formula that will determine if a row of data should be included in the sum or not. Whatever formula you enter here will need to return a boolean value. When this value is TRUE, the row's data is included, and when it's FALSE the row's data will be excluded. I would use the following formula here: TONUMBER({Invoices.InvoiceItems~ItemNumber}) <> 9999 AND TONUMBER({Invoices.InvoiceItems~ItemNumber}) <> 0000
The last thing to do is the setup the Reset conditions for the Running Total Field. This would be used if you were grouping data in some fashion such as by Customer and would allow you to sum the data for a single customer, then reset to zero for the next customer. If you are not using any grouping you can probably just leave this set to "Never".
Click OK to finish. :)
At this point all you need to do is drop the Running Total Field you just created into your report. Be mindful about which sections you place this field within though. If you place it in a header section, you will likely find it doesn't add in the last record in your dataset because the report hasn't printed it to the details section yet. I recommend placing Running Total Fields in Footer sections to avoid this nuance.
I hope this helps! And if you do have some grouping levels that you need help with setting the reset conditions just let me know what the grouping levels are for your report and I can update this answer for you.
You can create a new formula similar to yours:
IF TONUMBER({Invoices.InvoiceItems~ItemNumber}) <> 9999
AND TONUMBER({Invoices.InvoiceItems~ItemNumber}) <> 0
THEN {Invoices.InvoiceItems~TOTALCOMPLETED}
ELSE 0
and then just sum this formula field up.

Mongodb show results by percentage

I'm trying to create a products catalog algorithm that I will control what show to the user :
My db product collection contain 1M docs.
40% - products from price range 0$-100$
25% - products from price range 100$-500$
25% - products from price range 500$-700$
100% - products from price range 700$ and up
I want to produce this in one query and and after I got list of id's that represent this division i want to create another division on the categories.
Let's say that i want to show :
40% - Clothing
20% - Shoes
20% - Accessories
20% - Jewelry
What is the fastest way to done it ?
If the db was sql so i made a subquery for each division (category / price).
Remember my db contain 1M docs!
Thanks a lot =).

Crystal Report XI: calculate subtotal % of total

I have a report that calculates a summary field by group location which I am calling a sub total. There is another summary field by company in group company section. We allocate corporate overhead costs based on volume of revenue. I need to take the location total revenue and divide by the overall company revenue to get the % of volume. My problem is that I cannot get the company total into the location group row without effecting the numbers. I have tried to create a running total field to get the total. I have tried referring to the main report to get the company total and I have tried summarizing the location totals but I cannot summarize a summarized field. Any suggestions would be really helpful, thank you!
Company Locations---------- Total Revenue-------- % of Volume
California------------------------ 500,000----------------- 500,000/950,000 ?
New York ---------------------- 300,000
Ohio ---------------------------- 150,000
Company Total: -------------- 950,000
This looks like the same thing I am trying to do but I don't understand the answer yet..
http://www.experts-exchange.com/questions/27749404/Crystal-Reports-XI-fixed-value-for-denominator.html
your best option is creating a subreport on the report header to calculate only your total revenue and then using it on your main report through a shared variable.
if sum({totalRevenue},{location}) > 0 then
sum({totalRevenue},{location})
/
sum({totalRevenue})

Cannot figure out how to get THIS running total

This question may have been asked already, however I'm not sure how to search for this specific problem.
What I'm trying to do is get a total count of "unclaimed" services.
An "unclaimed" service is a service that has a balance of greater than zero and no associated "claim" record.
- #Claimed -
IF ISNULL({CLAIM.ID}) AND SUM({#Balance}) > 0 THEN
1 //"Unclaimed"
ELSE
0 //"Claimed"
Balance is calculated by the SUM of each revenue line
- #Balance -
{REVENUE} - {PAYMENT} + {TRANSFER} - {ADJUST}
The #Claimed formula is on the group 1 footer and the #Balance formula is within the details. There can be multiple revenue lines, and the sum of each #Balance line is the remaining balance of that service.
The #Claimed formula works as expected - however I need to be able to get a SUM of all the "unclaimed" records (#Claimed) - but you cannot get a Running Total of a Running Total. So I would really appreciate some fresh eyes on the issue. I'm sure I'm attacking this the wrong way.
EDIT: More information
The report layout is as follows:
Main Service Details
GH1a | Service Date - Service ID - Etc
GH1b | {SERVICE.DATE} - {SERVICE.ID} - {ETC}
Service Revenue Line Details
GH1c | Revenue - Payment - Transfer - Adjustment - Balance
D | {REVENUE} - {PAYMENT} - {TRANSFER} - {ADJUSTMENT} - {#Balance}
Service Revenue Totals
GF1b | Claimed - Revenue - Payments - Final Balance
GF1c | {#Claimed} - RT {REVENUE} - RT {PAYMENTS} - RT of {#Balance}
ALL Services Revenue Totals
RFa | Total Unclaimed - Total Revenue - Total Payments - Total Balance
RFb | ??? - RT - RT - RT of {#Balance} no reset
RT = Running Total Fields
You can accomplish this by just adding the values as the value repeats. Something like below.
Shared numbervar Total;
Total:=Total+#claimed;
Total;
This will make sure value is added and result is displayed....
Place the formula in group footers.
Now create one more formula display and place it in report footer
Shared numbervar Total;
Total
Try create a running total field:
Running total name = UnclaimedCount
Field to summarize = #Claimed
Type of summary = sum
Evalute = on change of group 1
Reset = never
Remember to grant that fields {REVENUE}, {PAYMENT}, {TRANSFER}, {ADJUST} are not null.
EDIT:: if #Claimed is a running total field (#Claimed), change it to be an usual formula.

How can I report a percentage of the total count in the detail of a crystal report?

I'm trying to get the total count of employee ids so that I can use it as the basis for a percentage in my report. I'd like my report to look like this:
Types With Email
Customer 20% 15%
Vendor 40% 80%
Employees 40% 75%
Total People: 100
In my view I have the employee id, type and email address. I can get the count and the first percentage (percentage of customers, vendors and employees). What I'm have trouble with is the percentage of customers or vendors with email address. I've tried using formula fields and summaries, but haven't gotten too far with them. Can anyone point me in a direction?
Create a formula to calculate email-address presence:
//{#has_email}
If Isnull({employee.email}) Then
0
Else
1
It doesn't need to be added to the canvas.
Create a formula to calculate the % total:
//{#email %}
// summarize number of email address for a given type
Local Numbervar Total := Sum({#has_email}, {employee.type});
If Total <> 0 Then
Total / Count({employee.id}, {employee.type}) * 100
Add to group header or footer and format with %.