Formatting doors table in rpe - ibm-doors

I want to display a Doors table with a different style for the first row using RPE.
for example, make the first row have a diferent background color, or other border style.
is there any simple way to do that?
Thanks,
Boris.

My solution was to use a variable called "firstRow" which is Assigned to True in an empty Container before the table, then on the row of the table it is assigned to False.
Then in the background properties I have a script that looks something like:
if (firstRow == "True") {
"SpecialColour";
} else {
"NormalColour";
}
A variation of this script needs to be used for each different property that changes, for example if the first row was centered, with a blue background and bold text, this would need three duplicates of the script. Alternatively if you are exporting to Word you can set a table style in the stylesheet, although I am not quite sure how to explain this without going through it myself again.
Hope that helped!

Related

Google Sheets: Conditionally Shade an Individual Set of Repeating Groups of Cells Based on Value

I have a Google Sheet I use to document my quotes for customers. I've copied and pasted it down the sheet several times. Within each quote is a list validated field where the options are "Won" or "Lost." When I select "Won," I want to turn that background color of JUST that quote green. However, I also only want to shade green the fields that I am not entering text into or accomplishing the calculations on (the data fields); I want to shade the background of the "form" and the "labels." (See screenshot where I did this by hand.)
I've attempted do this myself, but I'm having two issues.
I have to create separate conditional format rules for each quote/group of cells. This is tedious. I'd like, if possible, to create one rule that is able to adapt the conditional test of ="Won" to each group/quote separately.
I have to individually select each and every cell to be highlighted because if I just do A1:G33, all of the cells change color, even the ones in black and gray. I know this is expected, but is there a way around it?
I'm confused why applying the rule to the first group and copying and pasting it doesn't work. All of the quotes change green if the first quote shows "Won." This functionality works correctly with the built-in conditions that test the value of the cell itself. However, custom formulas to test the value of another cell don't "repeat" and operate individually it seems.
EDIT: Link to spreadsheet: https://docs.google.com/spreadsheets/d/1OH16NXLiRzY3-EdZaxmUl5Vp6cQNPzY-_-LV7VIDl8U/edit#gid=983650786
in your case perhaps best would be to color the first table exactly as you wish and then select it, copy it, select the first cell of the next table and:
Use Apps Script
This way you can have a lot of flexibility and its easier to manage.
You seem to already have an onEdit trigger, so you could integrate some more logic into that to test for statues. I can't implement everything you want but this should get you well on the way.
function onEdit(e){
// Getting the information on the edited cell
let editedCell = e.range;
let sheet = editedCell.getSheet()
// If the edited cell is in column 6, in "Quotes" and is value "Won"
if (editedCell.getColumn() == 6 && sheet.getName() == "Quotes" && editedCell.getValue() == "Won") {
// Get the row to know where to change the format
let statusRow = editedCell.getRow();
// Get the range of the whole form
let formRange = sheet.getRange(statusRow, 3, 17, 6)
// Set the background color
formRange.setBackground("green")
}
}
Hopefully you can see how you might extend this to include other ranges. You would need to base everything of the position of the edited cell. I have identified it by its column, the sheet that contains it, and its value. You can extend this to include checks on the value next to it for example. Then to change the color of each black box, you would need to define a range for each, relative to the edited cell.
References
setBackgroundColor
getRange

how can i combine cells in fastreport?

i have a table. to print like this
https://up.djelfa.info/uploads/155762484493151.png
I want to make the observation take the whole table means it remains empty. The empty box takes all the table.
https://up.djelfa.info/uploads/155762492124361.png
im working with fastreport 5 vcl
master data
https://up.djelfa.info/uploads/155762509600791.png
Per your last link, it appears that you have hard-drawn the cell lines in your master data row. This means they will print for each row. There are, however, multiple ways to get around this:
Make the upper and lower lines for your Observation column separate objects (e.g. LineObsTop and LineObsBottom). Then, in the MasterData Band's OnBeforePrint, adjust the visibility of these based on the values of the column
Don't hard-code cell lines! Instead, make sure the cell fields all align perfectly and use the fields' Frame properties. Then use the Observation field's OnBeforePrint to adjust the frame based on value.
Similar to #2, but use conditional formatting for the cell, adjusting the frame.

Can you set up conditional formatting based on colors of other cells?

I'm a projectionist at a movie theater, and we have a spreadsheet to track all of our content chronologically. Each show has its own row, complete with all of the details regarding time, theater number, format (digital DCP, Blu-ray, 35mm, etc).
We use this to verify at-a-glance where we're at on managing the content to make sure everything is set up to go. I have conditional formatting set up in every cell so that if it's a Yes or - (meaning not applicable to that show) it turns green, and if it's a No or ? (meaning we haven't gotten that information yet) it turns red.
What I want to know is if it's possible to have another column specifically for an overall "Yes" or "No", based automatically on the contents of the rest of the row (for example, column "D" will be green for yes and red for no). So if a show has all of its criteria met for the rest of the row (E* through Z*), manually filled out to turn green, that one cell (D*) will automatically follow suit. If something is missing from the rest of the row and contains even one red cell (anywhere in E* through Z*), that one cell (D*) will stay red as well.
I realize it probably needs a bit of scripting involved for this, which is not within my realm of experience, but I'm not even sure if it's possible. A lot of the spreadsheet is inputted manually, so one more column with a manual cell isn't the most inconvenient, but if we could set it up to be automatic, that would be incredible.
To branch off my comment above:
Additionally, have the cells by default set to red (using the fill option). If any of the cells are "NO", the condition won't be met, and it'll show as red:
Using OR:
=AND(OR(A1="YES",A1="-"),OR(B1="YES",B1="-"),OR(C1="YES",C1="-"))

cxGrid expand row height to new line with enter

This is a little hard to explain so please bear with me. When I am editing a text field in one of the columns I would like to,when I hit enter, go to new line under the edited text so the grid basically expands.
Options-View-CellAutoHeight set to true expands the cell but editing is terrible.Cant
see a thing where the first line is,where it ends,etc...
Here is the grid:
I can not go after the last letter 'a' with my mouse cursor and hit enter so another line gets added. Which settings regulate this ? I know it can be done since I had a grid once and could do this.
EDIT: This requires no code just applied settings.
Just tested it with DevExpress VCL 13.2 and it can be easily done without coding (if I understood what you want to achieve).
Basically, you need to set following properties:
Assign a Memo to the Properties of your column and make sure its WantReturns property is set to true.
In your TableView set the OptionsView.CellAutoHeight property to true.
Also in your TableView, set the OptionsBehavior.EditAutoHeight to either eahEditor (editor is sized vertically to fit the content) or eahRow (the entire row is sized when editing) as needed.

Delphi 7 - cxDBGrid Column : How to display a check mark next to some character string

I have to display in a cxdbGrid column 'Test √', and I got the check mark by using a symbol font but the rest of the characters changed.
I don't have an answer if you do actually need to have the check as part of actual text in the text column. I don't think I've ever seen an app that did it that way though. The usual way of doing this is to add a column to the left or right of the text column in question and have the new column use a checkbox control. Then just set the value of the checkbox column to true or false.
It's quite common to include some type of image to represent the state of a column in a grid control. You could implement your own OnCustomDrawCellEvent to put an icon image there, instead of text and a font. Below is a link to a tutorial of how to accomplish this.
How to draw an icon along with the text in a grid cell

Resources