8 Replies Latest reply on May 16, 2010 3:14 PM by sykot

    Problem with creating a Group Report

    sykot

      Title

      Problem with creating a Group Report

      Post

      Hi guys,,

       

      I create a report but i see on that report both records members who paid and who not. I want that i see only paid members.

       

      How can i make a report with members in the database who have paid who not.


      Regards,
      Serhat

        • 1. Re: Problem with creating a Group Report
          LaRetta_1

          "How can i make a report with members in the database who have paid who not."

           

          I don't understand this sentence.  If you want only members who have paid, perform a find for the paid members at the beginning of your report script. 

           

          If you want your report broken into two parts - those who have paid and those who have not, it would depend upon what determines how they have paid.  If you have a paid field (containing for example "Paid" or empty) then add a leading part to your report based upon that field (and sort your report first by this field).  If you have only a DatePaid field, then you will need a calculation (number) with simple:  not DatePaid.  This will produce 1 if not paid.  Then create leading part by this field. :smileyhappy:

          • 2. Re: Problem with creating a Group Report
            sykot

            Yes i want that only members who have paid shown in my report.


            Can you explain me step by step :)?... How to create the find script in my report ?..

             

            Regards,
            Serhat

             

             

            • 3. Re: Problem with creating a Group Report
              LaRetta_1

              FM Help goes into detail about various types of finds but here is the general process.

               

              Freeze Window

              Go To Layout [ your report layout based upon your members paid table ]

              Enter Find Mode [ uncheck pause ]

              Set Field [ whatever field determines your member has paid ; whatever value determines your member has paid ]

              Set Error Capture [ On ]

              Perform Find [ ]

              If [ Get ( LastError ) ]

              Show Custom Dialog [ OK ; "YIKES!  Nobody has paid." ]

              Go To Layout [ original layout ]

              Halt Script

              End If

              Sort your records how you wish

              Go to preview mode if you wish or print or whatever.  :^)

               

               

               

              • 4. Re: Problem with creating a Group Report
                sykot

                Tried but i think something goes wrong where do i need to put this script in the layoutsetup of the report?...

                Regards,
                Serhat

                • 5. Re: Problem with creating a Group Report
                  LaRetta_1

                  Scripts must be fired by a button or selecting the script in ScriptMaker or by using Script Trigger (if vs. 11) upon layout enter or mode change.   If vs. 11 and script trigger, go to Layouts > Layout Setup and script triggers tab.

                   

                  IF I'm still not understanding what you mean, please explain a bit more about what doesn't work for you. 

                  • 6. Re: Problem with creating a Group Report
                    sykot

                    Hi LaRetta,,

                     

                    Well i made some screenshots for you to have some image about the situation.

                     


                    Regards,

                    Serhat

                    • 7. Re: Problem with creating a Group Report
                      LaRetta_1

                      Hi Serhat,

                       

                      1)  Your Set Field has no search criteria.  You have specified the field you want to search but you have put your search criteria “nee” within the repetition box instead of down in the calculated result box.  You can tell because it looks like this (when viewing the script:

                       

                      Leden Database::Contributebetaaid[“nee”]]    ...   and it should look like this:

                       

                      Leden Database::Contributebetaaid ; “nee”]

                       

                      You should have gotten an error message 400 (find criteria are empty); I'm curious why you didn't. 

                       

                      2)  Your last Go To Layout [] should specify going back to your original layout (when your find doesn’t produce records) instead of going on to layout10 (your report layout). 

                       

                      3)  Then also move your sort below the End If … you want it to sort if records are found.  Since you have it within the If[] evaluation (and after the halt script), it won’t sort anyway. 

                       

                      After these three adjustments, you should be in business!  Let us know how it goes. :smileyhappy:

                      • 8. Re: Problem with creating a Group Report
                        sykot

                        Hi Laretta,

                         

                        I followed your steps and it worked.... Thank you very much for spending your time to help me :)....

                         

                        Regards,
                        Serhat Dalgara