how to prevent some columns from being highlighted when selecting a row - highlighting

I have a semi-dynamically created window ( and use PowerBuilder 10.5 ). Now there are a couple of columns which can have different colours and I want to see those colours when selecting a row. However I don't know how to deselect these columns and have the first couple of columns remain selected.
The highlight function in our application just does a dw.selectrow( x, true ).
Regards,
Marinus

I don't think you'll get what you want using selectrow. If you don't need multiple selections you could change the background of the current row with an expression in the datawindow. If you want some columns to stay normal you could do that with a rectangle behind the ones you want to highlight instead of changing the row color. If you need multiple rows highlighted you will have to simulate multi-select by adding a dummy column and using that to control the background, and of course you need to handle the selecting and deselecting in the clicked event. If you've got code that deals with selected rows you'll have to change them to use the new scheme, for example by checking the value in your dummy column.

If you want to use SelectRow(), maybe use of SetRowFocusIndicator() would help. IIRC (it's been pretty close to decade*s* since I've used it), it disables the row colouring in favour of the new method.
The other way that comes to mind is setting an expression for background colour that uses GetRow() and CurrentRow(). This wouldn't be my first choice, as it doesn't let users with vision impairment choose their colours through standard Windows colour selection to something they can deal with, but if you're dead set on colour indications on selective columns, this would be the way to go.
Good luck,
Terry.

Related

How to add button for each row in table?

Labview,
i would like to add button for each row in table and this button depends on number of rows of data in the table,Button will add programatically in each row.
Reference Image: Cross button
When do you say "Table", Are you referring to "Multi-Column ListBox" or "Table Control" or Individual 1D arrays that are arranged like a Table? There are many ways you can do this!
An array of Clusters as Dave_St suggested.
Using a Table control & Boolean Array.
Using a Table control & Array of Picture Ring.
Using individual 1D Arrays Arranged like a Table.
I'd recommend the first method. Since it makes data handling pretty easy!
But If you're going to go with any other method! You can make your boolean array background as white/transparent and place on top of a Table Column!
Example:
In the above image, I used a Table Control and an array of Picture ring. But you need to synchronize both your array's scrolling positions! Only then the user shall be able to see the correct status for the row.
It seems like you're trying to imitate a webpage form! If you want to dynamically add controls/indicators to your VI check out VI Scripting! But I'm not sure whether VI Scripting will satisfy your requirement.
There are a couple of other ways to get this behavior. However, the array of clusters is probably the easiest. Two other ways to do it are:
Use the glyph (symbol) functionality of a table or multicolumn listbox
Create a data grid or use the DataGrid QControl.
P.S. You currently cannot programmatically add controls/indicators during run time. So VI Scripting won't help you there.

Excel Conditional Formatting - Multiple Rules/Rows

enter image description hereI am creating a table with a schedule events over the course of a year. There are three repeating events, and I would like to highlight the entire row of each repeating event in a different color. I thought that would be a useful thing to do for planning purposes in any sort of schedule or calendar.
So, for instance:
If Event 1, highlight table row in green
If Event 2, highlight table row in orange
If Event 3, highlight table row in blue
I have successfully created a rule for each of them that highlights the individual cell in the desired color, but it does not highlight the entire row within the table. I have also successfully created a rule that will highlight the entire row of the table for one event.
However, I cannot get multiple rules that highlight entire table rows to work concurrently.
Is Excel 2016 capable of doing this?
Thank you in advance for your help!
Edit: Addition of sample formula and screenshot. Thank you Alan!
Sample formula: =$E101="Event 1"
Yes, it is possible to apply multiple rules in the manner you describe.
You haven't posted samples of the rules, nor a screenshot, so I can't comment on why it isn't working for you.
Inside, here is a mock-up showing you a working row-based multi-layered conditional formatting.
Note that how you are aligning your events is important - if you can have event collisions (i.e. more than one event on the same row), then you will need to decide how to handle the collision (e.g. order of priority or add additional rules for mixed colours).
Update based on added details:
Your schedule with conditional formatting applied:
The rules:
Note: If you apply the rules and they don't immediately show up correctly, check the rules. When I entered these, Excel would corrupt the formula and I had to reenter them.
Also note the $E to lock the formula to the Event column.

How to make rows invisible while printing reports?

I am using an .rldc file to define the layout of the reports from my program. The problem is, it is to be used for incremental printing. That means the paper will be used over and over as newer rows need to be printed. I'm attempting to approach it this way:
List all corresponding data on the report view.
Make the older rows invisible and only show the latest row.
Print.
That way, the last row is already properly placed. The problem is, I don't know how to implement this. Can anyone help me out?
You could create an IIF(condition,true,false) statement in your report definition on the row visibility variable.
The best way i guess is to define in your data source something of a rank column.
example :
select col1,col2,col3,RANK() OVER (ORDER BY col3 DESC) AS 'rank' from table1
Then in your table or matrix, you click on the row or/and column that you want to make the borders and text white based on a expression.
Go to the properties and dropdown on bordercolor
choose expression and type in (based on my example query)
=IIf(rank.value <> max(rank.value),White,Black)
That will not remove the rows only make the borders white ( unvisible)
The same you can do with Font Color property.
I think this is your best shot at this issue.
Other solution I could think of is to just hide unneccesary rows (which also replaces the visible row)
Then to move the table down by using a expression with a formula like nr of rows hidden before the actual row * height of 1 row, only I m not sure if this is applicable without programming an RDL extension..
Good Luck !

Highlight row in report?

I have a SSRS report which displays hundred of rows. I was wondering if there is anyway i can highlight the rows so that i can easily know on which row i am while accessing the report.
Any thoughts?
It cannot be done in SSRS 2005. You cannot make any dynamic actions after report is generated.
According to this thread on how to highlight rows (background) with different color for mouse over property, it seems like this is not a feature that is supported by the software. Which means that you would need to create or find a custom report item to fit your needs.
However, another approach would be to alternate background colors in Reporting Services:
Go to the row Fill Property and choose Expression
Add in something like =IIF(RowNumber(Nothing) Mod 2, "Silver", "White")

Conditional Visibility and Page Breaks with SQL Server 2005 Reporting Services

I know there's a bug with conditional visibility and page breaks with SQL 2005, but I wonder if anyone has come up with a work around.
I have a table that has a conditional visibility expression, and I need a page break at the end of the table.
If I set the PageBreakAtEnd property to true. It is ignored no matter what. Remove the visibility condition and it works.
If I place the table inside a rectangle with the conditional visibility on the table, and the page break on the table. Same result. The page break property is ignored.
If I set the rectangle with the PageBreakAtEnd property and the table with the visibility condition, then I still get a page break even when the table isn't shown.
Any other ideas on what to try? I'm almost at the point where I need a separate report rather than conditional visibility :(
Edit: #Josh: That has the same problems. If the second table has conditional visibility it doesn't work. If it doesn't have the visibility expression, then I get the page break all the time.
#Erick: I really wanted that to be the answer but unfortunately it doesn't work. When the visibility expression evaluates to hidden, there's a big gap where the rectangles would be (which I can live with), and when it evaluates to visible, the page breaks still don't work.
Place two rectangles, one inside the other.
Place your table inside the inner rectangle and set it to always be visible.
Set the inner rectangle's Page Break to Insert After Rectangle.
Set the outer rectangle's visibility to use your conditional expression.
The page break and the conditional visibility are now separated, and the inner rectangle's page break won't be processed if it is not visible, but it will if it is visible.
Edit: When I tried this, it did not appear to work in the Preview tab in Visual Studio, but it did work in the Print Preview and when I exported the report to PDF.
Hi This is Bala samsnai,
Me too came accross the same type of error.
I soveled this with out using Rectangle.
Instead of giving the expression to the complete(whole table)
select the one row in that tabe,give the visibilty expression. like that repeat it for all the rows (like Header, Detailed, Footer) and give the visibilty expression.
By that we can get work both the Visibilty and Pagging both at a time
Bala samsani
Use a rectangle, which has the conditional visibility set, and an empty table inside of that rectangle which has the "insert page break before" setting enabled.
Add a second (empty) table immediately after the first. Page break after that.
I tried Bala Samsnai solution and it works. Will explain more later. Erik B's solution of uisng two rectangles kind of worked when I hit a snag that I cannot embed a table in the Detail row of another table. So that was a bummer.
I followed Bala's solution with my report, which contains only one table and two groups within the table. Instead of adopting and applying an expression to control the Visibility of Groups, I just left that as Visible and applied the Visibility condition expression to each row's Hidden property. Right click on the Row Handle on the far left and you will properties window popup on the right or left (usually as a tab next to Solution explorer). In the Visibility grouping, you will see a property called "Hidden" which will have a default value of FALSE. click on the value and in the dropdown, first option is an expression. Viola and you can setup you condition when the row is hidden. It worked like a charm for me.
Hope this helps others. In my case, I had to not show the details section when some of the values where 0.
I struggled with this problem for quite a few hours until I discovered that the my layout was to wide to fit on print (A4). I had used the extra width for commenting the different field in text boxes with Hidden=false, and as a result twice as many pages as neccessary were generated to display whitespace.
So, you might want to check page width as well.
One thing I noticed is the differences between reports even though I have used the same report as a "template" across different times in SSRS2005. What I mean is, if you open the report you're having problems with in a programmer's editor (say UltraEdit) and look at the RDL file, you may pick up slight variations in page width and height. I noticed this and adjusted the report I was having problems with to the correct width of the paper expected and the report printed perfectly in both PDF and at the printer, and at print preview. Just a thought.