Magento: Custom attribute ranges in layered navigation - magento-1.9

1) In Magento I have the possibility to set the price in ranges like this:
Price ranges
2) Beside that I can easily manipulate the range and give it some individual values like:
Individual price ranges
What I need is a custom attribute e.g. height but with the same functionalities like the price attribute (Range and individual values).
I already tried this solution: https://magento.stackexchange.com/questions/60467/how-to-group-numeric-attribute-ranges-similar-to-prices-in-layered-navigation
It would give me the range which I need but unfortunately not the individual part which I mentioned in part 2).
Could anyone give me some advice how to achieve it?

You can accomplish this with the Improved Layered Navigation extension.
To create a new numeric attribute (e.g. length, width, height) please follow these steps:
Go to admin panel > Catalog > Attributes > Manage Attributes > Create New
Choose catalog input type ‘Price’ for numeric attributes if you would like to use sliders for them.
Set the ‘Use in Layered Navigation’ option to ‘Filterable’.
Once you create the ‘price’ attributes please go to Catalog > Improved Navigation > Filters and click ‘Load’ button. After that the numeric attributes will appear in the list of filters.

Related

Dynamically changing the bound entity of a list box on a canvas

I'm wondering if anyone has come across this issue.
I have two radio buttons on a canvas app that I am attempting to control the values displayed within a list box.
RadioButtons.Items: ["SomeValueA","SomeValueB"]
The list box control should be getting reset whenever the value of the radio button changes.
UpdateContext({resetList: !resetList});
UpdateContext({resetList: !resetList});
Reset(lbListbox);
lbListbox.Reset: resetList
For the list box itself I have the following for Items:
Switch(
RadioButtons.Selected.Value,
"SomeValueA",
Sort(
EntityA.FieldName,
Descending
),
"SomeValueB",
Sort(
EntityB.'Some other field name',
Descending
)
)
The problem is when I select 'SomeValueA' the list box properly populates with the values from EntityA.FieldName but when I then select 'SomeValueB' from the radio buttons the list box blanks out with empty records. There appears to be items in the list box that I can scroll through and select but not see.
If I put two list boxes on the screen and set their Items event to the specific entity the values show up properly in both list boxes so I know the entity naming/field is correct.
I've tried it without the reset of the list box, I've tried it using collections made out of the entity records.
Has anyone come across this who maybe has a solution. I was going to try to put two list boxes on top of one another and either hide/show or bring to front the active list but that also doesn't want to work.
thanks!
(Received this post from another source, figured I might as well post back here as well)
Got this to work, but it was a bit finicky. The catch seemed to be giving the List a value-pairing table, instead of just a list of values.
First I collected the Option Sets from CDS, and added a column to indicate the source name, for reference. This could easily be combined into a single collection, and then filtered later but I was thinking simple.
ClearCollect(colOptionSet1,AddColumns(Choices('Ownership (Accounts)'),"appSource","Ownership"));
ClearCollect(colOptionSet2,AddColumns(Choices('Preferred Method of Contact (Accounts)'),"appSource","Preferred Method"));
Next added a Radio button identical to yours.
Then added a List control with Items equal to
If( Radio1.Selected.Value = "SomeValueA", colOptionSet1, Radio1.Selected.Value = "SomeValueB", colOptionSet2 )
You may need to use the right-side property pane to toggle between Value and "appSource" (from collections above), but this did allow me to toggle between two separate Option Set fields in a single list.
Patching/writing this back is gonna be another hurdle. 😝

Oracle forms 10, change visible elements depending on query parameters

I have different datablocks to show the results of a query. This query gets the input parameters from two lists selected by the user.
I want to change the view after the query depending on the parameters introduced, so I made different tables and change the properties before showing the results.
Example:
IF :BLOCK.EST_TRAMITA = '1' AND :BLOCK.EST_TIPO = '2' THEN
SET_ITEM_PROPERTY('FEFOR',VISIBLE,PROPERTY_TRUE);
ELSE
SET_ITEM_PROPERTY('FEFOR',VISIBLE,PROPERTY_FALSE);
END IF;
The problem is that I have to put all the tables in the same place so the editor is getting messy. Is there a better way to change the visible elements without overlapping the tables in the editor? Thanks
You can create two canvasses and each canvas on the same place.
And then use show_view to show the canvas you need.
You also have to take in account that you should create on the correct item a key-next-item trigger and key-prev-item and also at block level a key-nxtblk and a key-prvblk trigger. Because otherwise you could get in the items in the other canvas by going over the items or using the key next block.

Hide multiple rows or columns in SSRS report with same Expression at same time

I have a report containing a Tablix/table with sets of rows and columns which I am hiding conditionally using Expressions, via the Column/Row Visibility dialog.
If for example I have 3 columns which I want to all have the same Expression to determine their visibility, is there any way for me to achieve this without opening the Column Visibility dialog for each Column and entering the appropriate Expression?
I've tried selecting multiple columns, but then the right-click context menu no longer offers the Column Visibility option (it's greyed out) and I have also tried out the Hidden property of the columns (which can be amended in bulk by selecting multiple columns), but this only stops the columns from being rendered, leaving a blank space where they used to be (rather than how Column Visibility works, where columns to the right of the hidden columns are moved across to fill the gap, like hiding columns in an Excel sheet).
Is it possible to achieve what I'm after, or will I have to continue opening the Column/Row Visibility dialog for each column/row I wish to conditionally hide/show?
If the columns you want to control the visibility for are next to each other, you can create a Column Group for them and manage the visibility via the Group.
Add a new column group at the appropriate level so that only the relevant columns will be included.
If you already have Column Groups this will likely be a Child Group or an Adjacent Group.
If not, you can create an initial Column Group by dragging a Dataset field from the Report Data into the Groups pane.
Insert new columns inside the new group, and move the data from your existing relevant columns into the group.
The new group does not need to repeat, so in it's properties window set Group on: to a plain text value, e.g. "1".
Input the desired visibility settings into the Visibility page of the properties window.
For each of the individual columns inside the group set the Hidden property to False, to remove any other expressions or settings that might interfere.
Not exactly what you are looking for but perhaps a midway point - and this can apply to many things other than visibility (e.g. background colour, tooltip) - edit the RDL directly using View Code. This has the added benefit of being able to implement changes that are almost identical per column instead of identical with a minimum of mouse usage.
Typically I have set one column up the way I like it in the designer and then copy/paste under the other columns. In the case of visibility look for <TablixColumnHierarchy><TablixMemebers>. You will see a list of empty <TablixMember /> items along with the expanded <TablixMember><Visibility><Hidden>=... block where you have set up one column. Simply copy paste that block over the empty items at the position of interest (you will need to count it out unfortunately as there are no identifiers).
Bonus Tip: If you make a mistake or want to change something later, you can do a replace on all expressions at once (optional regex allowed).
Remember to backup or check in your work first because the designer may not open that report again correctly if you make a mistake :-)
Select the columns you want to conditionally hide and press F4 to see the Properties Window. Look for the Visibility node and use the Hidden property to set the conditionally expression.
The expression should evaluate to True for hiding and False for showing.
Let me know if this helps.

Different color chart

I have 2 kinds of charts,pie chart and column chart.
I present the same data of both charts, the problem is that color that presents each equipment is not the same in both of them.
Thanks
The chart legend uses color fields to match the legend items to the
visible data points. The legend can only show one color field per
legend item (data series); hence, it shows the color of the first data
point within that series. Remember this when you use expressions to
dynamically determine the color of individual data points within a
series; the legend item always shows the actual color of the first
data point.
Using the same legend order in both charts should do the trick.
Series are ordered in the legend according to the order that they are
processed by the Reporting Services processing engine. You can change
the order by changing the order of fields in the data fields
drop-zone. If you are using series grouping, the series data is not
known until processing, so that there is no way for you to re-order
these items.
If you're using series, which you probably are, you should make sure they're ordered correctly before sending them to the reporter.
Another solution is to create a custom legend for your charts. Which gives you a lot more control, especially if you define a custom color palette aswell.
You can get more flexibility and control over the legend by generating
your own custom legend by using a table or a matrix. The easiest way
to synchronize the colors in the chart with your custom legend is to
define your own custom chart color palette.
To build a custom legend
Add a table data region to the report.
Place the table next to the chart and bind it to the same dataset as the chart.
Mirror the chart grouping structure in the table by adding table
groups.
If the chart uses series groupings, add them to the table by
adding table groups that are based on the same group expression as
the one in the chart series groupings. Then add chart category
groupings (if present) as inner table groups.
In general, if the
chart has m series grouping and n category grouping, you add m+n
table groups for your custom legend.
For the individual table
groups, make sure to show only the group header (which will contain
the legend description). Also, remove the table detail row unless
you want to use the table detail rows to simulate a chart data
table.
Design the custom legend.
Add a rectangle for the color field of the
custom legend. For example, you might add it to the first table
column. As indicated in step 2, you should only have group header
rows in the table. The rectangle goes into the innermost group
header level.
Set the rectangle BackgroundColor property to the equivalent expression used on the chart data point's fill color. In the most
trivial case, the expression would just contain one grouping value as
in the following code.
=Code.GetColor(Fields!Country.Value)
For the legend text, use either the same expression as in the category and series group/label expressions, or experiment until you
achieve the legend description text that you want.
Sources:
Get More Out of SQL Server Reporting Services Charts
Formatting the Legend on a Chart

Changing properties for multiple fields at once in SSRS Designer

This is very similar to the post on Formatting multiple fields at once in RDL, but there are still issues with setting properties like Size.Width and Font.FontSize when the underlying data is different between selected cells.
Here's the accepted answer:
Select all the controls in the designer and press F4 for properties. Change the background color
But if falls short when there is a property that is made up of several child properties. Here's an example using font and size, each of which are comprised of several properties.
This is what it looks like when a single field is selected or when multiple fields are selected that all have the same value:
But if I highlight several cells that have different font sizes, or widths, I lose the ability to edit them all simultaneously. For example if I wanted to make consistent column widths across an entire report.
Here's what the properties look like when multiple fields are selected and any of them have a different value:
It's not ideal, but in the case of the size property, I can enter the shorthand value which includes both width and height separated by a comma and it will apply that change to all the selected cells.
But for some reason, in the Font section, I can't even do that.
Other things I've tried:
Using the Formatting Toolbar - which seems to be always greyed out for SSRS:
Using the Formatting Menu Item - which doesn't expose the FontSize property:
Using the Context Menu to enter the Properties Form, which is disabled:
They will be greyed out if they are not identical in all fields selected. This can depend on a related formatting field being different.
One workaround is to create an internal text parameter:
With default value of the value you want to use for the property:
Then set the property for each cell that should have the same formatting to this parameter individually:
Repeat this for each of the relevant child properties, you will then be able to change formatting across the report by changing the parameters.