Stripes in background in RDL - reporting-services

Is it possible to add stripes in the textbox in report?
So the result looks like in the picture?
User chooses color for the column in the application
color

This is no built in way of doing this (no fill style) but you could use an image of the stripes as a background image. You would need to create and save images for each colour and style and add them as embedded images in the report.
You can then set the background image of a textbox to the required image.
... or better still use an expression to select the image based on conditions.
=SWITCH(
Fields!ItemCode.Value >10 , "RedStripe",
Fields!ItemCode.Value >50 , "GreenStripe",
True, Nothing
)
Where Redstripe and GreenStripe are the image names you embedded.
You can set the image to repeat etc from the properties panel
Update after OP stated that colour is parameterised.
If the colour is a parameter then we need a slightly different approach.
First you need to create an image with stripes (any colour will do ), and then remove the stripe pixels so that the stipes are now transparent. Save this as a PNG.
I created one quickly whist testing which you can save from here hopefully. You'll just have to move the mouse around in the area below as it's a white on white image! Or switch StackOverflow to the dark theme, then you can right-click and save the image. If not you'll just have to create one yourself.
Image below here.. switch StackOverflow to Dark theme to see it
Image above here..
Now you will need to set the background image to this image but also set the backgroundcolor property to an expression. In this exmaple, I set the background to the value of my parameter.
My parameter is just text and I typed in some hex values in the form #FFFFFF. You will have to work out how to get the value from your color pickers to the report yourself, ask a new question if required.
Here's the report design
and here is the report running using a few sample hex values.

Related

Sikuli, Java & Selenium - How to detect image background colour change?

Looking at Sikuli (in conjunction with Selenium) as a possibility for automating the more visual elements of our UI testing, in particular issues that may crop up when the expected branding is not applied.
In my test, I have a white navigation icon image sat on a purple nav bar. I take a screen grab of the white icon sat on it's purple background and that is used as my Pattern in the Sikuli test class. If I then change the CSS in my web app so the nav bar is red, I want the test to fail.
Unfortunately, the background colour change is ignored and the icon is clicked regardless. If I set the pattern's similarity value to 1f (i.e. an exact match), the icon is not clicked. However, it also does not clicked the icon if I change the nav bar colour to the correct purple so it matches the icon screenshot I am using for the pattern.
A "similar" parameter value of anything from 0 to 0.9 lets the test pass once again, regardless of the nav bar colour.
Is this a restriction in the ability of Sikuli or am I missing something?
Edit:
So I found THIS ANSWER to a similar question and it prompted me to check the score returned when trying to match the white icon on red pattern and the white icon on purple pattern to the web page which had the purple branding. The score for both was over 0.9, with the difference from about the second decimal place onward, hence the match of both when I set the "similar" property of the pattern to 0.9.
It prompted me to try increasing the area of the screen shot to include more background relative to the icon size. This resulted in a score of 0.9x for the white on purple pattern and 0.7x for the white on red pattern.
So my conclusion is that the matching does take account of the background colour but if the majority of the screenshot pattern you are using is the same colour, the difference in score is minute.
Can you bypass the background directly behind the icon and look to the side of it? Excuse my lack of coding knowledge just trying to help come up up with a work-around
exists (icon):
if exists(whitebg): #capture a small area with just the color near the icon
pass
if exists(redbg):
fail

How to remove yellow dots gif

i need remove all the yellow dots.
I removed white background in photoshop and save it for web and they are still here, if I set a black background in browser.
the same effect happend if I add new layer in photoshop ...
screen from photoshop
You can do it pretty easily with ImageMagick which is installed on most Linux distros and is also available for OSX and Windows. Just in the Terminal window at the command-line:
convert globe.png -fuzz 10% -fill gray -opaque "rgb(232,235,144)" result.png
That says... "open "globe.png" and find any pixels that are within 10% of rgb(232,235,144) and fill them with mid-grey, saving the result as "result.png"
Of course, you can fill the dots with another colour by changing the word gray to pink or any other rgb() colour you like!
GIF has indexed colors. If you use the classic dialogue save for web. You can manually assign a color to a table indexed color. Like this: http://sklad.bereza.cz/00-jarda/00_screenshot/2016-06-18_174624.jpg
The problem is that the GIF has a limited number of colors and some colors consists from several different colors. By assigning a color to a table you stop composing and is used direct color.

In SSRS how to conditionally change the colour of a datalabel font on a chart when it appears on the bar

I have created a bar chart that shows values on data labels.
The Data label is placed outside the bar
But in some cases the label appears on the bar where the bar is too long.
In this scenario I would like to conditionally change the font/colour of the data label so that it's more visible.
However I can't see a way to dynamically determine where the label has been placed.
What I can think of is this. You can change the background/font color of all those series labels who's value lies in the range of 95%-100% of the maximum "Value". To be exactly precise as to what should be the threshold to change the bg/font color seems a daunting task, but you could play around with test data.
For writing the expression to change the font color,I would first change the dataset and add a column on the lines of PercOfMax. This column can be calculated easily in the dataset by using basic aggregate functions.
Then you need to go to the Chart Series Label properties-->Color and write the expression on the lines of -
=IIF(Fields!PercOfMax.Value>=95, "YELLOW", "BLACK")
As I said, you might need to do some more research to finalize the value of this threshold(which I am assuming to be 95).
Another solution to this problem is to use fill colour of the label and set its background to a bright colour (e.g. colour), and leave the font colour of the label black. Thus you can always see the label, and there is no difference when it's outside of the bar.

changing indicator background

I have a table with alternating row colors (I used the following expression =iif(RowNumber(Nothing) Mod 2, "Gainsboro", "White")). Now in one of the table's cell I putted an indicator.
When I run my report, the indicator's background color stay fixed as white:
I tried to set the indicator background color to no color.
I also did some workarounds (created image files with the indicator icons - 2 images per icon (each one with different background color), and used an expression to switch between the images. but this workaround is restrictive (because i have to keep the cell proportions right as the image proportion - otherwise the images presented badly)
Do you know any option/better workaround to solve this issue ? thank you.
Ok,
The way to fix it is as follow
Solution for problem 1:
Click on the "Row" itself not on one of the columns (See screenshot)
Then add your expression to the "Background Color" Property
=iif(RowNumber(Nothing) Mod 2, "Gainsboro", "White")
Solution for problem 2
The way to force the image not to increase is to set the column property "Can Grow" to False
Please do so to every column (See screenshot)
I hope it helped you :)
This thread may help: it suggests you wrap the img inside a rectangle, apparently transparency in images is then forced to be rendered correctly.

Can you change the default color for selected text in MS Access?

I haven't found an existing post about this so I'll give it a shot.
I'd like to know if there is a way to change the default highlight color for selected text? Right now, whenever I invoke .SetFocus on a field, Access "selects" the contents of the field. The color it uses is black, and makes the data very hard to see. Is there a way to change that color?
Access simply swaps the background and foreground color as its means of highlighting text in a text box. As far as I know there is no way to change this behavior.
Obviously you can change the foreground and background colors themselves, but there is no separate "highlight" color that you can set independent of the foreground/background.
Although this isn't specificity for List Boxes I still think it is worth a note that List Boxes work slightly different (not sure why... maybe a different developer!) the selected row on a list box will inverts the colour of the background and foreground separately instead of swapping them.
For example if you had a light blue text on a white background normally the selected row would be a red text on a black background. The white inverts to black and the light blue inverts to red.
Or if you had
Not sure which method I like better but it would be nice if they where the same! Makes UI's look a lot better when they are consistent throughout the form!
Sometimes this problem can be caused by using a transparent text box on a background that is the same or similar color (with contrasting-colored text). Make sure you have the text box back color set to a same/similar color as the background.
Basically, you need the text box back color to contrast with the text. When highlighted, the highlight will be a contrasting color to the text box background color.