?
Solved

PowerBuilder - About Datawindow Report

Posted on 1999-08-01
5
Medium Priority
?
936 Views
Last Modified: 2008-03-17
Can somebody teach me how to highlight a row automatically without user clicking on it? I am supposed to create a datawindow report of invoices. It's like this, the row where the order quantity is equal or larger than 1000, will be highlighted in red color. Which object do i need to put the script in, and which under which event?

Thanks in advance.

0
Comment
Question by:sherly
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 9

Expert Comment

by:david_levine
ID: 1098936
By highlight a row, do you mean set the text in the row to red? If so, here's the easiest way:

Open the datawindow in the datawindow painter. Double click on each column that you want to change the color to red. Select the Expressions tab in the properties window that opens. In the Color column, enter something like:

if( ord_qty > 999, rgb(255, 0 ,0), rgb(255, 255, 255))

Let me know if that'll work and I'll re-submit as an answer.

David
0
 
LVL 2

Author Comment

by:sherly
ID: 1098937
Thanks for your idea. But what I want to do is HIGHLIGHT the row. It's like the usual user click on that particular row(like select row). The whole row will be higlighted by a blue bar. What I want is don't need a user to click on it but automatically highlight the row will meet the criteria in RED color bar.
0
 
LVL 9

Accepted Solution

by:
david_levine earned 400 total points
ID: 1098938
In the datawindow painter for the datawindow you want to change, right click over the Detail band and select Properties from the popup menu. Click the Expressions tab in the window and specify the expression I listed above as the color property. You might need to check the background colors on each of your fields in the detail band and set their background color to transparent (last "color" in the drop-down list).

David
0
 
LVL 2

Author Comment

by:sherly
ID: 1098939
Thank you very much! May I know is this the only way? Anyway, I am able to solve the problem now, thanks for your help!


0
 
LVL 9

Expert Comment

by:david_levine
ID: 1098940
Is this the only way? Probably not. There are usually a bunch of ways to solve any one problem. For this particular problem I've also seen a solution posted that uses a rectangle (sent to back) where the color of the rectangle is set based on a condition like the one you want. I don't see any advantage to do that and I think the way I described is a "more elegant" solution.

David
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whoever said that “a picture is worth one thousand words” observed a fact that can dramatically affect your marketing success. Most people tend to learn visually, so many publishers commonly acknowledge the effectiveness of visual learning by using…
Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question