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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fomatting Reports with the Expression Builder

Status
Not open for further replies.

Chinyere

Programmer
Mar 9, 2001
79
US
Hello All,

I have a two-part report (printing) question that I think will involve the good ol' Expression Builder.

1 Does anyone know how to format a "check box" control so that empty "unchecked" fields will not show up on the printed report and so that the "checked" fields will will show up as an asterisk?

2 Also how does one change the way the "City" field in a report prints out so that when printed it has a comma (,) after it to separate it from the "State" field in the usual manner?

I would appreciate quick responses, if possible and thank all concerned in advance.

Chinyere :-D
 
Question #1 Yep
Put a TEXT box on your report
Then in its Source put this
IIF([yourfield] = -1 ,"*","") make the font for that text box bigger by several points so the asterisk will show up good.

Question #2
Make a new text box called "CityStZip"
put this in Control source
=Trim([City] & ", " & [State] & " " & [Zip])
If you get an error take out the TRIM and its parenthesis
=[City] & ", " & [State] & " " & [Zip] DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Doug,

Thank you very much for your suggestions and quick response. I have tried both and they worked! However, I am running into a few snags along the way.

[ul][li]For #1-The asterisks do show up where the check box is checked. I now want to move this asterisk so that it lies flush against another field. You see, the asterisks are suppossed to be placed near someone's name. As you are probably aware, the field for names can grow and shrink. I have the asterisks showing up the way that I wanted them to, no problem, I just now need to have them lie flush against the "names" field.[/li]

[li]For #2-This one almost worked :). I first tried the TRIM function as you suggested and received an error message. I therefore removed the TRIM and its parenthesis. After doing so, when I go to view the report, a dialog box pops up and asks for the "State" field's parameter value. Upon escaping out of this dialog box, I am able to view the repot, however, the "State" field is missing. The "City" field comes up nicely with the comma and the "Zip" field appears also but no "State" field.[/li][/ul]

Could you please help me with these issues. I again would really appreciate your assistance.

Chinyere

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top