Skip 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.

Custom report

Featured Replies

I have a need to make a button for reports. I want to have a screen pop up and ask "Date Range" and show records in that date range. Any advice?

You can either use a custom dialog with 2 input fields or use a popup window. In both cases, you can use global fields to capture the user criteria and then have a script that finds records in that range either using a find script or a GTRR.

  • Author

Yes, that is what I am trying to figure out. If I want to have the custom dialog box show the search criteria be a date range from "Date of Acquisition" and have all records show from that range, how would I accomplish this?

Here's an example. :wink2:

WhiteKnight.zip

I'm not particularly pleased with the script ... it could be functionally sweetened and should be rearranged. That's what happens when I get in a hurry. And I see I switch to table view even with no records found. Without rearranging the whole thing, it can be corrected as the green indicates ...

Perform Find [ ]

If [ not Get ( FoundCount ) ]

Show Custom Dialog ... yada yada

[color:green]Exit Script or [color:green]Halt Script

End If

Actually, I would include this in a loop to allow User to try a different range so I would certainly restructure a bit. But this gets you going on how it works and I feel lazy today. :shocked2:

Edited by Guest

  • Author

You are fantastic! That is what I needed... I can relate, I am beat from working all week myself.

  • 2 weeks later...
  • Newbies

Thank you for your post. It's helping me solve a problem, but I was hoping you could help me understand how to adapt the solutions to my situation.

I have a budget database and I was to create a script that will generate a sub-summary report for a found set determined by conditions set by a user. I have a settings/preference table with global fields for the settings, and I have those fields+values displayed on a layout along with the 'generate report' buttons. What I want to know how to do is to pull the global values into my script as parameters. (I bet this is an embarrassingly easy question to answer.)

Thanks for whatever pointer you can share.

Hi hatchethead, welcome to FM Forums!!

I will assume then that the User is presented with the global fields, fills in what they want, and clicks 'generate report' button. Script attached to that button would look something like this:

# First test to make sure required data is entered and entered correctly

# Only you will know how to adjust these tests to meet your needs but I will give generic examples

# Test ... make sure there are dates in the gStart and gEnd date range globals

If [ not gStart or not gEnd ]

Show Custom Dialog [ OK ; "You did not enter " & Case ( NOT gStart ; "a start" ) & Case ( NOT gStart AND NOT gEnd ; " nor " ) & Case ( NOT gEnd ; "an end" ) & " date." ]

Halt Script

End If

# Test ... make sure there is a gCustomerType entered

If [ IsEmpty ( gCustomerType ]

Show Customo Dialog [ OK ; "You must enter a Customer Type." ]

Halt Script

End If

# Everything is correct in the globals; proceed with report ...

Freeze Window

Go To Layout [ sub-summary report layout based upon Budget ]

Enter Find Mode [ uncheck pause ]

Set Field [ Budget::BudgetDate ; Preferences::gStart & ".." & Preferences::gEnd ]

Set Field [ Budget::CustomerType ; Preferences::gCustomerType ]

Set Error Capture [ On ]

Perform Find [ ]

If [ not Get ( FoundCount ) ]

Show Custom Dialog [ OK ; "No records found."

Go To Layout [ original layout ]

Halt Script

End If

# Records found, sort and go to preview mode

Sort [ without dialog ; by Customer Type ]

Enter Preview Mode [ pause ]

Enter Browse Mode [ ]

Go To Layout [ original layout ]

If you get stuck on adjusting any of this to your specific needs, just ask and we'll help you through it. There are many wonderful people here on FM Forums and we have ALL been in your shoes before. There are no dumb questions except those unasked.

LaRetta

UPDATE: Changed the calc in the Custom Dialog ... poor english (said: nor [color:green]a end date instead of [color:green]an end date. Now corrected. :blush2:

Edited by Guest

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.