Question T1293
Visible to All Users

Generating reports

created 7 years ago

HI,

I have been asked to review your product for a client of mine and I have a few questions (the builder seems great by the way).

If I generate a survey with about 60 questions over 5 pages and store the JSON in a database table, then store the individual user JSON responses (approximately 100 JSON strings per survey) in another database table (with a look up so we know which responses are from which survey), is it possible to render the results broken down by question in tables and as charts/graphs/pie charts.

We would be storing the data in a database as the data is of a financial nature and we wouldn't want to send it to a third party.

Answers approved by surveyjs Support

created 7 years ago

Hello Gordon,
If you are going to use the Survey results in your own database, then I do not see any reason why you can't do it. It is a typical task. We are offering UI, you are making a back-end as you need it based on your needs.

Thank you,
Andrew
SurveyJS Team

    Other Answers

    created 7 years ago

    Hi Andrew, thanks for the prompt response.

    Yes, we will be building our own back end, So I think I would need to iterate through the Survey JSON for each question (and type) then search each User Response JSON string for the answer to said question and then calculate the statistics manually? Or do you have some sort of library that does this already?

      Show previous comments (2)

        Hello Gordon,
        For some reason we have limited the number to 4. It is not hard to make it 5. Do you really need this?

        Thank you,
        Andrew

          Yes, we have a question where the user needs to insert 5 answers and to save screen space we would like to lay them out in a row. Also is it possible to calculate how many visible questions are available and how many have been answered via an expression or something?

            Make it 5. Here is the related commit: https://github.com/surveyjs/surveyjs/commit/16ddee83610022b6cb652e57de9a78861c11b481
            By the way: you may use the Panel. Here is the example: https://surveyjs.io/Examples/Library/?id=condition-enable-kids

            survey.getAllQuestions().length - you will get all questions
            survey.getAllQuestions(true).length - you will get all visible questions
            survey.getQuizQuestions().length - you will get all visible questions that has an input.
            question.isEmpty() returns true if the question is not answered.

            It is hard to suggest something without knowing the scenario.

            PS: Please start a new thread on asking a new question.

            Thank you,
            Andrew
            SurveyJS Team