Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7298 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hey,

I have a layout that when in browse mode is displayed as a list of records. I want to create a button on the list that will allow the user to print / preview, the related report. I set it up so there is an icon on the list (meaning that the icon appears repitiously down the screen... not a big deal). But when I write the script to have it go to preview mode and print... it always previews record 1, not the record from which I selected via the icon.

I was trying to modify the script but I didn't see a "select this record" type command...

can anyone help me? or give me a different method of choosing from teh list view to print?

Much Thanks... Vandy

Posted

If each record takes one page when printed, set the current record number to a global before entering Preview Mode, using Get(RecordNumber). Then after you enter Preview Mode, Go to Record/Request/Page [by calculation: your global field].

Posted

Well, I thought about it and tested it out a little and I don't think it will work using globals. My number system consists of a couple of things, a <year code>, form type, <serial number>... but those are reset each year so you could see 2004 Form A 001, 2004 Form A 002... but then 2005 Form A 001...002, etc.

If I use a global it won't reset and I think if you searched it would be confused because if it only looked at the serial, there could be more than one "23".

Any ideas?

Posted

So I was experimenting and this is what I've found. I made another button that doesn't perform a preset script, but rather just "goes to layout X" and "Enters preview mode". When I do th is it works the way I want it to, that is it goes to record 49 (or current record) when I press the button.

But when I write a script to do the same thing, it always goes to #1.

Why?

Posted

Clicking on a button in the record in a list should select that record, then carry out script steps.

Some problems could be:

insure that the button is in fact not extending outside the body area of the list layout.

If you are using portal you will need to go to related record using the same relationship as the portal. If your layout is a list view option layout then all of the found set will be shown in preview starting with record 1.

Rod

Posted

I see.... I was thinking a bit ago that the whole problem seems to be going from a selected record in browse mode (list) to the preview mode. But according to your last post, if you are in browse/list mode, that is essentially a "found set" of all records so it would naturally start at one.

Okay, if that's the case, now I have to figure out a way to make that jump from Browse/list mode to selecting the record to entering in preview mode with the right record showing.

I could always make the user mannually type in a record, but I don't want to do that. Do you think there is a way I could go from browse/list mode, somehow perform a find, then into preview mode?

I just want to make it easy for the user to look at a list of reports based on a serial number system, and hit a button to print that individual record out and it seems harder than MS Access!

Thanks

Posted

The global idea should work. It doesn't care what the serial is since it's based on record number, not record id. And it's not a calculation, but a simple number global. It is set with Get(RecordNumber) via script when a record is selected for previewing/printing. Then, when the layout to be previewed is set to view as form, using Go to Record/Request/Page [by calculation: yourglobal] after Enter Preview Mode will take you to that particular record in the found set, assuming each form only takes one page.

This topic is 7298 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.