cdr-dev Posted May 19, 2005 Posted May 19, 2005 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
Ender Posted May 19, 2005 Posted May 19, 2005 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?
cdr-dev Posted May 19, 2005 Author Posted May 19, 2005 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?
Ender Posted May 19, 2005 Posted May 19, 2005 Try a script like this: Enter Find Mode[] Set Field [ DateField ; Start Date & "..." & End Date ] Perform Find[]
Lee Smith Posted May 19, 2005 Posted May 19, 2005 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
Ender Posted May 19, 2005 Posted May 19, 2005 Yes, FM7 puts the table name in with the source and destination fields for the script steps that refer to fields.
Recommended Posts
This topic is 7463 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 accountSign in
Already have an account? Sign in here.
Sign In Now