PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Create a report from 2 forms

  1. gediweb
    Member

    I have 2 forms, registration and credit cards. I have a lot of registrations and not so many payments. I ideally would like to have a report in Excel that will give me all users, indicating who paid anw who did not. I have access to db from desktop, but cannot figure out how to make a query. is there a description on how Gravity keeps the data?

    Posted 6 years ago on Thursday July 11, 2013 | Permalink
  2. David Peralty
    Administrator

    Could you export the two forms as two CSV files and then manage/manipulate the data? We don't have a database schema available. The tables that store entry data are the _rg_lead tables. I hope that helps.

    Posted 6 years ago on Thursday July 11, 2013 | Permalink
  3. gediweb
    Member

    David, can you give me the SQL that generates that export, then i can work with that. I need to do the export/comparison couple times a day, so i need to automate it a bit

    Posted 6 years ago on Thursday July 11, 2013 | Permalink
  4. David Peralty
    Administrator

    Here is what we use in export.php -

    $sql = "SELECT d.field_number as field_id, ifnull(l.value, d.value) as value
                        FROM {$wpdb->prefix}rg_lead_detail d
                        LEFT OUTER JOIN {$wpdb->prefix}rg_lead_detail_long l ON d.id = l.lead_detail_id
                        WHERE d.form_id={$form["id"]} AND cast(d.field_number as decimal) IN ({$field_ids})
                        LIMIT {$offset}, {$page_size}";
    Posted 6 years ago on Thursday July 11, 2013 | Permalink
  5. gediweb
    Member

    thanks, will see if this helps...

    Posted 6 years ago on Thursday July 11, 2013 | Permalink
  6. gediweb
    Member

    David,

    Could not make it work :( i am a little dangerous with SQL, but in no way an expert.

    How do i get a list of all the entries for each form?

    Posted 6 years ago on Thursday July 11, 2013 | Permalink
  7. David Peralty
    Administrator

    I'm sorry, but I can't help you create this customization. All of the information you need should be available to you in our Gravity Forms files, and the database tables created. You should be able to get a list of entries from rg_lead_detail.

    Posted 6 years ago on Thursday July 11, 2013 | Permalink

This topic has been resolved and has been closed to new replies.