BobWeaver Posted April 3, 2001 Posted April 3, 2001 Make a calculated field as follows: reportField = if(isEmpty(HeightField),"","Height: " & HeightField & " ") & if(isEmpty(WidthField),"","Width: " & WidthField)
B. Keith Posted April 3, 2001 Posted April 3, 2001 Looks good... can I apply formatiing within the calculated field? i.e. <bold 8 pt times> Height: <italic 12 pt Times> height field I need to reatin a sense of heirarchy in the design if I can... (this is replacing existing, hand-typed signs, Thanks Bruce
B. Keith Posted April 4, 2001 Posted April 4, 2001 I've mastered (sort of) teh art of displaying my data on a webs site. I use 'if' statements to display data if the field is populated and to leave a blank if it is not. Now I want to do the same thing on a report and I can't figure out how to attach a script to text on a page... is this possible? I have made a plant database with name height width etc. for tracking our inventory. I made a sign (8.5 x 11") with the name at the top (big bold font), a picture and Height and Width at the bottom. Push print and out comes the signage. What I want to do though is have Height: <height field> Width: <width field> when both have data in them but only Height: <height field> when Width is empty. How do I do this on a report?
BobWeaver Posted April 5, 2001 Author Posted April 5, 2001 No, you can't format individual parts of a calculation field. Use a text merge field (see filemaker manual) and format the text as: <<cHeight>><<cWidth>> where: cHeight=if(isEmpty(HeightField),"","Height: " & HeightField) and cWidth=if(isEmpty(WidthField),"","Width: " & WidthField) [ April 05, 2001: Message edited by: BobWeaver ]
B. Keith Posted April 5, 2001 Posted April 5, 2001 duh... You know, I really don't like the learning from the manuals/learning tools with software these days... It was so much easier when you started with the first version and grew along witht he various versions of the program! >No, you can't format individual parts of a calculation field. Nope, but you can format individual parts of a text merge field... So, if I add another calculated field Height=If(IsEmpty(Heightfield),"","Height") and merge <<Height>> <<Heightfield>> then I can format the two fields differently on the layout and voila! Thanks for the kick int he right direction... Bruce
Recommended Posts
This topic is 8624 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now