6 Replies Latest reply on May 23, 2012 6:36 AM by Sorbsbuster

    Generating a report from multiple fields

    SCoelho

      Title

      Generating a report from multiple fields

      Post

       I need to preform a find using a date range. The date range then needs to check other fields and validate if there is data in those fields to gen a report... I am a novice so I am lost any help would be wonderful

        • 1. Re: Generating a report from multiple fields
          Sorbsbuster

          Why not include those fields in the original search?  If you are trying to find records that match a date range in a date field, and must have data in 3 other fields as well, then define your search as:

          Request 1: Date Field = StartDate...EndDate
          Request 2: OMIT Data Field1 [= sign in that field]
          Request 3: OMIT Data Field2 [= sign in that field]
          Request 4: OMIT Data Field3 [= sign in that field]

          That will only return records that are in the date range AND have data in all 3 fields.

          • 2. Re: Generating a report from multiple fields
            philmodjunk

            Or use a single request and enter an * in each field that must not be blank. Wink

            • 3. Re: Generating a report from multiple fields
              Sorbsbuster

              You sent me an email to explain further.  I have included it here so that you can have the help of all of the forum users.

              -----------------

              So I am creating a calculation or a script? this is a informal blue print on what I am having trouble with.
              
              Find: Date Range.
              
              11 individual date fields the find needs to search.
              
              than multiple fields need to populate only if they have data in them in the report.
              
              Date:   Service:       Make:       Description:
              ----------------

              It will be a script, but you could/should do it manually first.

              Searching the 11 date fields is easy - it is just more of the same thing, eg:

              Enter Find Mode.
              -Request 1:
              Date Field1 = StartDate...EndDate
              Date Field2 = StartDate...EndDate
              Date Field3 = StartDate...EndDate...etc

              ...will find all records that match the criterion in EVERY date field

              or

              -Request 1: Date Field1 = StartDate...EndDate
              -Request 2: Date Field2 = StartDate...EndDate
              -Request 3: Date Field3 = StartDate...EndDate...etc

              ...will find all records that match the criterion in ANY date field

              After that I am unclear about what you want to do with the other data fields.  If they are empty, do you want to remove them from the found set for the report?

              Or if they are empty, do you want to populate them with some data?


              • 4. Re: Generating a report from multiple fields
                philmodjunk

                11 different date fields in one record suggests that your database table may benefit from restructuring your data so that you have a set of related records with these dates instead of 11 date fields in one record.

                • 5. Re: Generating a report from multiple fields
                  SCoelho

                  Yes, if the fields are emtpty I need them to be removed from the found set...

                  • 6. Re: Generating a report from multiple fields
                    Sorbsbuster

                    Then add to your list of Find Requests the 'Omit' requests, or enter an * in each field that must not be blank, as Phil suggested, and they will be omitted from the found set.