7 Replies Latest reply: May 15, 2014 9:58 AM by Mike Urbonas RSS

    Omitting fields containing no data.

    Phil Curtis

      My question is: "Can a report be made which disregards fields containing no data or null data?"

        • Omitting fields containing no data.
          Nick Osdale-Popa

          Once in the table, you can use a filter to eliminate records where a field is empty or null.

          • Omitting fields containing no data.
            Phil Curtis

            Thank you for your answer.  This may help sometime. However, what we require is the elimination of just the empty fields, not the entire empty records.

            • Omitting fields containing no data.
              Phil Curtis

              Let me correct my reply.  We need the elimination of empty fields not the entire record containing empty fields.

              Thank you

              • Omitting fields containing no data.
                Nick Osdale-Popa

                Oh, just double-click on the field/column and select Hidden, or use the Edit Menu and select Hide/Display Fields... option.

                • Omitting fields containing no data.
                  Grant Perkins

                  Hi Phil,

                   

                  I'm inclined to suggest that Nick's suggestion of hiding the column is the solution but wonder about the circumstances that produce the requirement.

                   

                  Am I right to assume that the fields may SOMETIMES have valid entries in the table output but sometimes do not and when you have no valid entries you don't want to show the field? Does this normally apply at the Table or Summary level?

                   

                  If they are always null I assume you would simply delete the field in the model.

                   

                  Nick's suggestion works when you know the field will be (or is) null or empty but your question sort of suggests you want a display option that allows you to hide the column based on its lack of any values, but keep the column if there are some rows with genuine values. Is that correct?

                   

                  Grant

                   

                   

                  Originally posted by Phil Curtis:

                  Let me correct my reply.  We need the elimination of empty fields not the entire record containing empty fields.

                  Thank you /b[/quote]

                  • Omitting fields containing no data.
                    Nick Osdale-Popa

                    Thanks for delving into this deeper, Grant.  Kinda tired today, so I wasn't thinking out what his criteria for hiding the fields would be.

                     

                    Hmmm..in the Object Model there is a  SetFieldVisible() function, but there's no way to create filters, or using a Runtime Parameter passed to a "generic" filter. Then there's the notion of getting a record count after a filter is applied.

                     

                    Here's what I'm getting at:

                     

                    Using a Runtime paramter, set it to each field name and pass it to a filter to check if there's any records. If the record count is 0 (zero), hide that field. Continue until all fields are done.

                     

                    So the type of functions/objects one would need are:

                    Fields object - non-existent

                    FieldCount() - non-existent

                    SetParamater()  - non-existent

                    SetFilter() - exists (aka CurrentFilter)

                    RecordCount() - non-existent

                    SetFieldVisible() - exists

                    • Omitting fields containing no data.
                      Mike Urbonas

                      Originally posted by Phil Curtis:

                      Let me correct my reply.  We need the elimination of empty fields not the entire record containing empty fields.

                      Thank you /b[/quote]Hi Phil.  I can't think offhand of any way to automatically instruct Monarch to hide a field (column) if no data exists anywhere within that field.  If you are exporting Monarch data to Excel, for example, it may be easier to evaluate each field in the Excel table using a VBA macro: if the column (field) has no data aside from the column name, you could instruct the VBA macro to delete that column.

                       

                      Mike