Crystal Report: Suppress Hightligthed fields on print - printing

I have a crystal report which is previewed by the users (in a third party application) and they need some fields in this report highlighted (simple enough), but when they print the report to the B&W laser printer those fields must not be highlighted anymore.
Anyone know how to do this?

It can be done by using a parameter of boolean data type which will control the appearance of the fields in preview or print mode. So for example in preview mode the parameter will be set to True and False in print mode.
In the format editor there are some options to change the appearance of a field like its style, color etc. which can depend on the value of a parameter.
To find the format editor right click on the field and choose Format Object.
In the above image, the red rectangle shows the buttons which let you specify the appearance conditions.
To highlight a field you can change its color based on the preview or print mode.
First create a parameter and name it for example AppearanceParam
In the Field Explorer → right click on Parameter Fields → choose New → write the name of the parameter in the name box, choose its type to be boolean and click OK.
Click on the [x+2] button which is on the right side of the color in the format editor and write the following code there
if {?AppearanceParam} = true then
crRed
else
crBlack
The value of the parameter can be controlled programmatically before previewing or printing the report.

Related

Weird behavior for textarea in diagrams.net (draw.io) format panel

I'm facing a very weird (& blocking) issue using diagrams.net webapp.
I'm trying to add some nodes in the Format Panel. I created a new tab in this panel & added in it some new inputs.
There are text inputs, checkbox inputs & textarea.
But the behavior is absolutely not the expected one.
For text & cb inputs, everything works fine, but textareas behavior is... at least very weird:
The field can't get focus by mouse clicking (remember that click works on other inputs). The only way to set the focus on it is by using JS focus() method.
Text inside the tag can't be selected by mouse. If element has the focus, text can be updated. Moreover, even if text can be changed, text cursor cannot move from the end of the text.
Textarea box is not resizable. There is the bottom-right arrow to resize it & I added the "resize" value to be sure but the feature doesn't disable but I juste can't. BUT ! If I set the attribute "disabled" then I can resize the box. Unfortunately, I can't disable the textarea since I want to put it because I need to write in it.
I can't show you code for now (it's just a new node creation using document.createElement) but you can easily test this: go to drawio webapp & when the webapp is loaded, use the Inspector in the developer tools to add a new textarea node in the format panel (div with ".geFormatContainer" class) : element is not focusable with the mouse, text inside it is unselectable & box is not resizable as long as "disabled" attribute is not set.
I added a click listener in the component to check if click did something & it does, but it doesn't give the focus to the element (document.activeElement says that body is focused -_-) so I think there is something in mxgraph which avoids the element's classic behavior. But what ?

Is it possible to show the Wireshark Color Rule name as a Column?

I have set up some color rules matching some filters, and would like to see the name of the filter in the Wireshark window alongside each capture possibly to the left of the Time column.
Wireshark exposes the coloring rule name in the frame.coloring_rule.name display filter field. There are a couple of ways to add it as a column:
Expand the "Frame" packet detail item. Right click on "Coloring Rule Name" and select "Apply as Column".
Go to "Preferences → Columns". Create a new column. Set its type to "Custom" and set the field value to "frame.coloring_rule.name".

fr:number control with a suffix not editable after becoming relevant

I am using an fr:number control with a suffix.
It is relevant at the time the form is displayed and is editable.
On clicking (un-ticking) a tick box, the control is hidden according to custom XPath.
However, when the the tick box is re-ticked, the control reappears but on attempting to edit the text it is readonly.
This behaviour is only apparent in IE (IE11) and when the control has a suffix.
Is this a known bug?

DELPHI : String grid header background/font color

I've created a string grid with a certain amount of columns and rows. I've also handle a right clic event on the string grid which displays a popup menu when you clic on the right button. You have some options inside this popup menu.
My question is how do i change background or police font color of a cell when i select an option from my popup menu. I know we can get the selected col using stringGrid.Col and same for the row, and i also know we ca change color on draw cell event. But i want to change the color on user action only.
For example, in my table i open up a file and i load the file content into a string grid (it's a CSV file). This file will be modified in my application from the string grid and then exported to a databse. An user can select a particular col with the right clic and then press primary key or foreign key or any other option. When he selects primary key, for example, i want to change the color of the column header so he can know which clumn is the primary key, which is the foreign key and so on. See what i mean?
PS: I am using delphi 2006 and can't change to another version.
PS: i've searched for a delphi forum on stackoverflow/exchange but didn't find the correct forum i guess
Paint the background in the desired colour in an OnDrawCell handler as you currently do.
When you need to change colours, in response to user action, force a paint cycle by calling Invalidate on the grid.
If for some reason you don't want to invalidate the entire control, calculate the rectangle that needs to be re-painted and pass it to InvalidateRect.

Set default text size/color for text boxes in Master Slide PowerPoint 2013

I'm working with a PowerPoint document which annoyingly sets all newly inserted text boxes' color to Red and uses Century Gothic. I believe this is due to the Master Slide being used by the document.
I would like to remove this automatic setting from text boxes in the Master Slide but I cannot figure out how?
I have gone into the Master Slide view and found that there are no text physical text boxes, there are however "Text Placeholders" but no text boxes. I find it strange and wonder:
how are these newly inserted text boxes contain pre-set font type and color?
If you aren't trying to do this in code, StackOverflow isn't really the right place for the question; you want SuperUser for "How do I ..." questions that don't involve code.
But what you want to do is select a text box that's formatted the way you want default text to be, then right click it and choose Set As Default Text Box. You won't get that option if you've clicked WITHIN the text box and have an insertion cursor; in that case press ESC, then rightclick.
If you're trying to do this in code, select a text box formatted to taste then do something like this:
Sub SetMeAsDefault()
Dim oSh As Shape
Set oSh = ActiveWindow.Selection.ShapeRange(1)
With oSh
.SetShapesDefaultProperties
End With
End Sub
The shape and text box defaults are independent of master formatting, which controls only the formatting of placeholders and text within placeholders. Text/shapes inserted via the Insert ribbon/menu follow the defaults set for the presentation as I've described above. Each presentation (and template) can have its own set of defaults.

Resources