rmconlon Posted November 17, 2005 Posted November 17, 2005 I have a database of various types of media (VHS, CD, DVD, MiniDV etc..) I am creating a script that will print out custom labels based on what type of media is selected. The script is something like: IF AssetType = MiniDV Go to layout MINIDV_Label Enter Preview mode Print Else if AssetType = VHS Go to layout VHS etc... The problem is, when I switch layouts the correct record is showing, but when I enter preview mode, it jumps to the first record in the table. Any ideas on how I can keep the record I am working with the record that prints out??
Raybaudi Posted November 17, 2005 Posted November 17, 2005 Hi I think that it is better to find "AssetType" and print the found set.. Something like this: Enter Find Mode[] Set Field[AssetType;"MiniDV"] Perform Find[] Go to layout MINIDV_Label Enter Preview Mode Print
Ender Posted November 17, 2005 Posted November 17, 2005 (edited) To get the Preview to show the right record, you either have to go to the right page using Go to Record/Request/Page, or first omit all the other records so the found set only contains the one record. The Go to Record/Request/Page thing can be hard to use if the records span a variable number of pages. I use the omit trick, though it requires a little more work if you want to return to the previous found set after the Print/Preview. Here's a method that worked in FM5/6: http://www.fmforums.com/forum/showtopic.php?tid/101576/ The same can be used in FM7, or it can be optimized bit to take advantage of FM7. In FM8, the process can be simplified even further, using the new option in the GTRR step. Edited November 17, 2005 by Guest Changed my mind on that last bit.
Ender Posted November 17, 2005 Posted November 17, 2005 Another method in FM7/8 would use a self-join relationship on the record ID and a Go to Related Records [ Show ] having the GTRR create a new window just for the preview. When the Print/Preview is done, the window closes.
comment Posted November 17, 2005 Posted November 17, 2005 How about "Print current record" in the print dialog?
Ender Posted November 17, 2005 Posted November 17, 2005 How about "Print current record" in the print dialog? That does not change what's shown in Preview Mode. rmconlon, I've added a version 7 demo to my Smart Preview thread. The new version shows both the New Window technique and another technique that works better than my original.
rmconlon Posted November 17, 2005 Author Posted November 17, 2005 Thanks... This method worked great because I can search based on the AssetID. Problem solved!
comment Posted November 17, 2005 Posted November 17, 2005 True, but since there is no pause in the original script, I didn't think it would matter.
Recommended Posts
This topic is 6947 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