dbTalk Databases Forums  

report

comp.databases.filemaker comp.databases.filemaker


Discuss report in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jay
 
Posts: n/a

Default report - 07-14-2004 , 10:21 PM






Designing a report to pull off all transactions during a given month
(current month). I have a field that is the creation date and I want to
find all the records that match...

any help would be appreciated.

jay



Reply With Quote
  #2  
Old   
Helpful Harry
 
Posts: n/a

Default Re: report - 07-14-2004 , 11:38 PM






In article <HJqdneTXGP8EZWjdRVn-ig (AT) look (DOT) ca>, "Jay"
<azuraboom (AT) hotmail (DOT) com> wrote:

Quote:
Designing a report to pull off all transactions during a given month
(current month). I have a field that is the creation date and I want to
find all the records that match...

any help would be appreciated.

jay
Since the "current month" obviously changes you'll need to perform the
Find within the script rather than storing it.

It's fairly easy to use the appropriate commands in the same way you
manually perform a Find ... an exception is that Date fields are a bit
buggy, so you can't use the Set Field command. Instead you have to use
Insert Calculated Result command and "play" with the the format by
using the DateToText function.

You'll also need some error checking in there to see if any records
were actually found. This means your script becomes something like:

Enter Find Mode []

Insert Calculated Result [CreationDateField,
DateToText(
Date(
Month(Status(CurrentDate)),
1,
Year(Status(CurrentDate))))
& "..." &
DateToText(
Date(Month(Status(CurrentDate)) + 1,
0,
Year(Status(CurrentDate))))]

Set Error Capture [On]

Perform Find []

If [Status(CurrentFoundCount) = 0]

Show Message ["No records found"]

else

{print report}

End If



The first Date function works out the start of the current month,
ie. current month / 1 / current year

The second Date function works out the end of the current month. By
adding one to the current month and using the day "0", FileMaker
realises you really want the last day of the previous month.
ie. next month / 0 / current year
is the same as current month / last day / current year
that way you don't have to work out how many days are actually in the
current month.



Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #3  
Old   
Chris Brown
 
Posts: n/a

Default Re: report - 07-15-2004 , 06:46 PM



Jay wrote:
Quote:
Designing a report to pull off all transactions during a given month
(current month). I have a field that is the creation date and I want to
find all the records that match...

any help would be appreciated.

jay



as always, alternative to find (in FM7 syntax);
create a calc field that extracts the month from your data record ,
Month(your date field) and index it
create a second Month calc that extracts the month from current date
Month( Get ( CurrentDate ))
create a rel between the two, button go related/show only related
Simple and fast

as a variation you could make the current date calc, a global popup, (1,
2....12) to select a month to retrieve



Chris Brown
Neurosurgery
University of Adelaide



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.