stealth162 Posted January 26, 2005 Posted January 26, 2005 I have a database consisting of many records and layouts. One of my layouts that I use for printing has a subsummary part. Each Record in the database has a number ie; 1m1, 1m3, 2m1, 2m2. When I go to this layout for printing which has the subsummary part it puts a heading over the records in that series. ie; Group 1: followed by records 1m1, 1m2; Group 2: followed by records 2m1,2m2. The group number is derived from the first number of the record. What I'd like to do is add another piece of data to that sub summary. For each group there is a version number that the user manually enters on a different layout. I'd like to have a calc that reads which group number is in the sub summary and then displays the corresponding version next to it. I have made a little headway on my own...I think. I created a new field called "Reel Versions" and put the following calc into it: Case ( Reel = 1 ; Reel 1 Version ; Reel = 2 ; Reel 2 Version ; Reel = 3 ; Reel 3 Version ; Reel = 4 ; Reel 4 Version ; Reel = 5 ; Reel 5 Version ; Reel = 6 ; Reel 6 Version ; Reel = 7 ; Reel 7 Version ; Reel = 8 ; Reel 8 Version ; Reel = 9 ; Reel 9 Version ; Reel = 10 ; Reel 10 Version ; "none" ) The idea is that it reads the number that is already retrieved and displayed in the subsummary part. (ie; Reel Number). So in theory it would read that number and then if it equals a number (1-10) that new field will display the appropriate version in the subsummary part. With the calc as it is I am able to retrieve the version for the first Reel (or group of records) then when it goes on to Reel 2 and 3 etc. it retrieves nothing. Anyone know what I'm missing?
transpower Posted January 26, 2005 Posted January 26, 2005 Put quotes around Reel 2 Version, like "Reel 2 Version".
stealth162 Posted January 26, 2005 Author Posted January 26, 2005 I tried that but what I get in the subsumarry display is the text "Reel 2 Version" not the number from that field.
mr_vodka Posted January 26, 2005 Posted January 26, 2005 The problem that you are having is because there is no relationship between your group and the associated "reel version" that the user will key in on the other layout. To solve this, you can either create another "reel version" table keying on the fieldl group number. Then you calculation field should work when you key on the correct related field.
stealth162 Posted January 26, 2005 Author Posted January 26, 2005 Excuse me if I sound iggnorant but, I have no idea how to do what you are talking about.
mr_vodka Posted January 26, 2005 Posted January 26, 2005 Can you upload a copy of the file so that I can take a quick look at it?
stealth162 Posted January 26, 2005 Author Posted January 26, 2005 The file is attached. If you click under print layouts "Spotting Notes". You will see in the sub summary what I am trying to achieve from the version numbers entered on the main menu layout. The first one works fine but the others do not. 144025-SpTempv7newlayout.1.fp7.zip
-Queue- Posted January 26, 2005 Posted January 26, 2005 Each of the Reel Version fields only has data in the first record. Subsequent records do not use its data for the calculation. They use the values from their own fields, which are empty. You either need to make them globals, so that the same values are available for every record, or just use one global with ten repetitions (I'll call it gRep_Reel Versions) and make Reel Versions a calculation of Case( Reel >= 1 and Reel <= 10; gRep_Reel Versions[Reel]; "none" )
mr_vodka Posted January 26, 2005 Posted January 26, 2005 Sorry Queue. didnt even think of that. :-( A repeating global with a calculation based on the value of reel. Much cleaner.
stealth162 Posted January 26, 2005 Author Posted January 26, 2005 thanks for your help Queue. I'm a liittle confused by what you're trying to say in your post. Can you be more specific as far as the steps I need to take.
mr_vodka Posted January 26, 2005 Posted January 26, 2005 To make it work you only need two fields. One is a global field, Queue named gRep_Reel Versions. The other is your calculation field. this should allow the user to fill in the data on the home page. Case( Reel >=1 and Reel <= 10; GetRepetition(gRep_Reel Versions;Reel); "none" ) Under field format, you can format the global field to show reps 1-10, or have 10 copies of the field on the layout each one showing reps 1-1, 2-2, 3-3, 4-4, etc. This should solve your problem.
stealth162 Posted January 26, 2005 Author Posted January 26, 2005 I followed your instructions yet still cam up with nothing. I think my file is still available in a previous post as an attachment. Is it possible for you to show me?
-Queue- Posted January 26, 2005 Posted January 26, 2005 See attached. Field[rep] is the same as GetRepetition( Field; rep ) in FM 7. I prefer the shorthand version. The field must be a global in order to be accessible to all records. You can't easily use record 1's data for all other records. So you should put this field on a layout that only displays one record and it doesn't matter what that record is, for example, a main menu. SpottingTemplatev7newlayout.1.zip
stealth162 Posted January 26, 2005 Author Posted January 26, 2005 That's exactly it. I'm going to rebuild it myself so that I can understand the process. I think sometimes people make things more complicated than they need to be. Thanks again.
stealth162 Posted January 26, 2005 Author Posted January 26, 2005 One last thing. Seems silly but I want to restrict the type of data the user can put in the fiedl as a number. As of now if you input words instead of a number you get a "0" on the report. How would I either allow the user to enter words or restrict the entry to numbers only.
-Queue- Posted January 26, 2005 Posted January 26, 2005 Make the field text if you want textual results. Otherwise, use a validation of 'Numeric Only'.
Recommended Posts
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