Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying Box if Boolean = true CR10

Status
Not open for further replies.

djsuperz

IS-IT--Management
Jan 25, 2004
37
US
I have an MS sql server db with the datatypes assigned to bit. I have an invoice form picture in the back ground and i would like, if the value is true, to outline text on the form. How would i do this? thanks
 
You can conditionally apply a border to your text object based on your condition.

Right click on the text object and choose 'Format Text'.

In the format editor window that will pop up, click on the Border Tab and you will find X+2 buttons across from each of the Line Style (Top, Bottom, Left, Right). One at a time, click into each X+2 button which will take you into the Format Formula Editor window where you can put your condition formula. Your condition formula will need to be and If...Then...Else format such as:

If Condition Then LineStyle Else Alternative LineStyle

Where you will insert your Boolean condition above where it says Condition and then choose the line style you wish to use whether or not the condition evaluates to true or not.

You will find a Functions List when you are in the Format Formula Editor window and in that list should be a folder called 'Line Style Constants' or something close to that. You can choose the linestyle, or none as appropriate, by double clicking those into your If...Then...Else statement.

Hope this helps.

MRudolph
 
I want it to outline text on the invoice form i have. The invoice form is a seperate image. How would i do that? If i place the text box over my form it covers the text up. Is there a way to make it transparent? The only thing i want to show up is the outline.
 
Actually it does work. Although my formula recieves an error: The forumla result must be a number.

If {page3.red} = true
Then "Line style = crSingleLine"
Else "Line Style = NoLine"

Any suggestions?
 
Your formula should be:

If {page3.red} = true
Then crSingleLine
Else crNoLine

Your Then and Else statements shouldn't be Boolean expressions themselves.
 
Ok so now everything works fine but whenever i finish adding the formulas for each text box press OK it takes forever to access my database. Is there something i can do to make it faster? The server is on our B network. Is there a way i can put in all the formulas before i access the database? any suggestions?
 
Do all your formulas in design mode instead of display/preview mode. You may also want to combine groups of similarly triggered events into a single formula:

@NeedsAttention

If {page3.red} = true
Then crSingleLine
Else crNoLine

Then place this one formula in the linestyle of each box when that condition will need to trigger. That way the condition isn't reprocessed for every box, is only calculated once when the formula is called --after that each box just compares a local result value.

Scotto the Unwise
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top