I need to use Forena Reports on my D7 site which requires a SQL statement to first extract the data for the reports.

My data is input by the user with a series of EntityForms. I know what data I want to display in the reports, but writing the SQL statement so that it pulls together the data I want for a specific form for a specific user is proving very difficult. I'm having difficulties figuring out all the relationships between tables and fields that simply represent the results of a single form, mainly because the form elements are pieced together from many many tables, one for each field.

Is there a simple way to see how a single form result is formed from the database data? BTW, I tried using Views to generate the SQL statement for me, but that doesn't work, even after I sanitize it to remove the Drupal "{}" parentheses.

Any suggestions/cheat sheets/resources/guidelines I could use to make sense of the data structure and ?

Thanks in advance.

Comments

John_B’s picture

I have not done this but since no one else has commented I will try. Presumably you have already read the Forena documentation, including the HowTos page. My thought is that your use case involves building a Forena report on a Views view, rather than writing your own query, as described in the Forena issue queue.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors