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

Generating report from dates in 2 fields


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

Recommended Posts

Posted

Hi,

Has any tried to do a report where they have a form the user enters a start date and a end date from two different fields and create a report based upon the range of information? I am having a time trying to figure out the scripting. I know that if you use one field you could enter for example: 5/1/05...5/31/05 and that will give you the range of dates for the month. Now I want to use two different fields (defined as globals of course!) to get the same report where the user just enters the dates and their criteria selection.

Thanks!

Chris

Posted

You could use the two date fields in a range relationship to pull up the records in that range or you can assemble the dates into a string for a find.

Which method are you trying and what kind of trouble are you having?

Posted

What I have is a layout for the user to enter a "Start Date" and a "End Date". Both fields are defined as a global. The user has a field where they can select the "procedure" they wish to report on. Once all the fields are entered, they will click a button that performs this calculation and displays the total number of procedures they have selected.

I would prefer to use a string but how would I define it so that I can pull the values from the two date fields?

Posted

Try a script like this:

Enter Find Mode[]

Set Field [ DateField ; Start Date & "..." & End Date ]

Perform Find[]

Posted

Hi Mike,

Wow. What a change over previous versions.

I like it.

I notice that it inserts the "File" name Set Field, and the Calculation too. It looks like FM creates a Self-Relationship. Or did I do something wrong?

Enter Find Mode[]

Set Field [ DateFinds::Service_Date; DateFinds::g_StartDate & "..." & DateFinds::g_EndDate ]

Perform Find[]

Interesting.

Lee

confused.gif

Posted

Yes, FM7 puts the table name in with the source and destination fields for the script steps that refer to fields.

This topic is 7129 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.