8 Replies Latest reply on Mar 1, 2013 10:32 AM by rolo2009

    Weekly Reports


      Hi.I'm making an Invoice solution.I want to make a weekly report from sunday to saturday.But I dont know if i have to make a calculation field or what.Thanks for you help in advance.

        • 1. Re: Weekly Reports

          Generally speaking (very generally), a weekly report would involve Summary fields.  You would create a layout, possibly with sub-summary parts and a leading or trailing Grand Summary that include the Summary Field(s).  Then you run a find to get the records you want to report on (e.g. time frame), go the layout, sort the records, and view in Preview Mode.


          However, there are a lot of variations and other things to consider.  You should probably go through some of the available training materials/documentation to get started.



          • 2. Re: Weekly Reports

            Hello, rolo2009.


            I'm assuming you want to find all records falling within a range of dates from a given Sunday to a given Saturday, correct?


            If this is the case, you'll need to do a find request in the form "3/3/2013...3/9/2013" in the appropriate date field (substituting the actual dates needed, of course). You can parse out the correct dates in a couple of ways:


            1) You can present the user with a selection of Sundays to choose from, placing the date chosen in a global date field. Your range calculation would then look something like this:


                 GetAsText ( {gDate} ) & "..." & GetAsText ( {gDate} + 6 )


            where "gDate" is the name of your global date field. (You can name it anything you want, of course.)


            2) Another option would be to automatically choose the Sunday you want. This would be the case if you want the system to generate last week's report, for example, without any user input being necessary. In that case, you might do something like this (we'll assume you want last week's report):


                 Let ( [

                 todaysDate = Get ( CurrentDate ) ;

                 lastSunday = todaysDate - DayOfWeek ( todaysDate ) - 6 ] ;

                 dateRange = GetAsText ( lastSunday ) & "..." & GetAsText ( lastSunday + 6 )



            Once you have the range of dates, you would place it into a global text field or a variable and use it in a Find request. This will return all records falling within that date range. Normally, you would do all of this inside of a script, possibly the script you use to generate the report (although you might want to use a separate script that just finds the records, and another that actually produces the report).


            If that's not what you were asking, please clarify. We'll try to help.



            • 3. Re: Weekly Reports

              Hi Mike Mitchell i like the second calculation best.Should i put that calculation in a global field and then put than in the report?I'm very new im Filemaker.Thanks for you help.

              • 4. Re: Weekly Reports

                Thanks for you help LabsRock.

                • 5. Re: Weekly Reports

                  When you're generating your report, you would do something like this:


                  Enter Find Mode [ ]

                  Set Field [ {date field} ; {calculation above} ]

                  Perform Find


                  That will tell FileMaker to go find all the records from the preceding week. You can then proceed with the rest of your report, as described by Craig.



                  • 6. Re: Weekly Reports

                    Sorry Mike i feel lose. should i make a global field,should make another field with the calculation above and they have to do this every week?

                    • 7. Re: Weekly Reports

                      No. You make a script that they run every week that contains these steps.


                      You probably need to go get yourself a copy of the FileMaker Training Series and go through that. It'll get you up to speed on how to do layouts for reporting, basic scripting, Find request, and the lot. There's really too much information to cover in a forum post.



                      • 8. Re: Weekly Reports