September 28, 200619 yr I have an object I've named RXREQ, it is a grouped object comprised of a pink rectangle, a dozen fields and some text. If I copy it in layout mode, go to browse mode, click into a container field (RxContainer)and hit paste, I get a nice image in my container field. Which is exactly what I want. Well not quite, I just looked, I get an image from Layout Mode - no data, just the image you see in Layout Mode. What I want is the object as seen in Browse mode But try to automate it and I get garbage, and odd garbage at that, text from all over the page. Edited September 28, 200619 yr by Guest
September 28, 200619 yr If you're in layout mode when you copy, it is correct that i would capture field names, rather than content. I would use a product like snag-it (or screen capture and just crop it) and take the image then paste in your container in browse mode. (or more preferable, use insert, picture)
September 29, 200619 yr Author I don't see that working in a script. I can do it but it my users need to push a button and have it happen in a runtime solution.
September 29, 200619 yr .. It's a really odd request to be honest, and the only way i can see it happening is MAYBE through VBScript and some cheap command line graphics software to allow you to crop. What i would do is: Retrieve the location, size and width of the field in question using FM's build in developer functions - Specifically FieldBounds Prepare a vb script on the co-ordinates provided In the VBScript -- Print Screen using inbuilt windows function -- Save the caught image somewhere -- Crop using CMD line graphics editing software based on the co-ords provided (alternatively, work out how to do it manually). -- Save the file somewhere Export and execute the vbscript using FM's native functions -- Insert the saved file into your container To be perfectly honest i think it's more trouble than it's worth but nevertheless, i can't see an easier way of doing it though someone else might.
September 29, 200619 yr Enter Preview Mode Copy [ ] Enter Browse Mode Paste [ yourTable::Containerfield ] Commit Records/Requests Note that this produces a screen-shoot, i.e. limited to screen's resolution.
September 29, 200619 yr Hi Comment. Although the above takes a screen shot (that's actually quite interesting, i had no clue copy when nothing was selected took a screen shot - thanks a million for that ), i believe the OP is after only a certain portion of the screen.
September 29, 200619 yr You could make a layout containing just the desired objects, open a new window, go to the layout, adjust window to fit, copy and close the window...
September 29, 200619 yr Love your ideas! I just still can't manage to think outside the square that much I'll get there eventually though. I can apply this myself to a few things i've been putting off for a while so, cheers again comment!
September 29, 200619 yr ... i believe the OP is after only a certain portion of the screen. Also you can make some object not printable, so only the printable ones will copy and paste into the container with comment's script.
September 29, 200619 yr But that way you will get a large background area included in the picture, effectively reducing the resolution. Two more points to bear in mind are that going into Preview mode lands you on the first record of the found set, and that if the layout is small enough, you might see more than one record on page. Both can be easily solved, but I thought it should be pointed out.
September 29, 200619 yr Hi comment "But that way you will get a large background area included in the picture, effectively reducing the resolution." Yes, but the poster can play with the graphic format of the container, ie: Enlarge ( or better: Crop ), mantain original proportions, alignment: Left/Top
September 30, 200619 yr Author Tried the 'Preview' solution. Aside from the multiple record problem, when pasted into the large-enough-for-the-original-image container, the image was tiny. So I gave up and created a calculation field with the items from the RXREQ image parsed into it. Then I script that into the spot where I need it. Thanks for your ideas.
September 30, 200619 yr One of the gotchas with the Preview copy/paste routine is that you generally want to set the margins to nothing on the page you're copying (or on the receiving/printing page). Because otherwise you get them, essentially 2 margins, one from each.
Create an account or sign in to comment