Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Juggernaut

Can you name a report within a script?

Featured Replies

Is there a way to name a report within a script?

What I mean is, when you run a script to find a list of salesman and print the list. I need to

What I've done the past is to create a global text field (gReportTitle) and use it as a title block in the report. Have the script set gReportTitle to the appropriate report name. Make sure that you set gReportTitle to " " at the end of the script.

HTH, Mike

  • Author

Hi Mike,

Maybe you can give me a little more information. Where are you when you put the name into the gReportTitle?

And you said " Make sure that you set gReportTitle to " " at the end of the script". I'm not sure I know what that means.

Carl

To put the name into gReportTitle, go to your report layout and make sure you are in Form view, not List view otherwise you will not be able to enter the title into the global field. That is because the field is in the header and in list view you can't enter anything into a field in the header. So you would have something like the following in your report script.

Enter Browse Mode [ ]

Go to Layout[Report]

Print Setup[Restore, No Dialog]

Sort [Restore, No Dialog]

View as [View as Form]

Set Field["gReportTitle", "Report Title"]

Enter Preview Mode[Pause]

Print[No Dialog]

Set Field["gReportTitle", " "]

The last step clears out the value in gReportTitle after printing the report. That way you won't get an erroneous title in the report the next time.

Mike

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.