Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm about to set off on a journey to create a new report-generator for our in-house software. Our old generator is made in VB6, remotes Word, and pixelpushes images. And its slower than a sloth on a flypaper.

The language I'm most fluent in is C#, so preferably I'll want to make it in C#. I'm open for other languages though, of which I probably know Javascript the best.

My question really is how I should proceed in setting up my app. The data it's reporting on is survey data. It's separated into questions and questiongroups. Today this goes a bit like this:

  • Create report score for complete report
  • Create report score for each questiongroup
  • Create report score for each question
  • Create report score for each question group

I addition there might be several extra steps to get scores by variable filter and such.

My problem is that I can't really wrap my head around any other way to do it than this "procedural" way. How would you go about in solving this? Any suggestions?

More data:

  • Data is stored in MSSQL
  • The environment is Windows
share|improve this question

closed as too broad by Robert Harvey, gnat, MichaelT, GlenH7, Dan Pichelman Dec 3 '13 at 21:08

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

    
What data volume do you expect? I think the language is less an issue here and more the database technology. I would maybe look into some NOSQL solutions. –  thorsten müller Dec 2 '13 at 12:51
    
The data is in MS SQL, and it's probably going to stay there for a while. I'm only rewriting the report generator right now. –  Christian Wattengård Dec 2 '13 at 12:55
    
Still not very clear what exactly you want to get out of the system and how your data looks. Some kind of ROLAP report builder or SSAS may be worth evaluating. –  thorsten müller Dec 2 '13 at 13:02
    
Yes, I'm sorry. It's kind of difficult to explain in a good way. But no "shelf-solution" is going to work. I guess my question is really how to lay out the architecture of the application. –  Christian Wattengård Dec 2 '13 at 13:18
    
There is nothing wrong with using a procedural style for your code. Once the code is written you can easily identify those parts that should have been objects, and refactor accordingly. If you can't plan the whole design up front, iterate. –  amon Dec 2 '13 at 21:12

1 Answer 1

I've done this before, believe it or not. And I mean specifically - wrote an automated generation tool for reports based off an employee satisfaction survey. Here's what we did: We used Crystal Reports to generate all our output. This provided excel reports, PDF reports, and even basic text reports. Their software library for report generation worked amazingly well, and we integrated via Delphi 8 through their .NET interface.

If you're looking for a free version, Jasper Reports has worked great for me on other projects (I used Java and I'm not sure if it supports other languages).

One big issue that raises its head is always the use of NULL in the database. Did the person answer the question? Did the person answer the question and specify a '0' option? Just be careful to specifically deal with NULL answers when calculating ValidN for calculating percentages. Is it a percentage of the total number of people that answered the survey, or a percentage of total number that answered this, and only this question. Even trickier: is it a percentage of people that answered at least one question on the survey?

We generated the report in two steps: Processed all the results (generated output data which would easily populate a report), and then created the final reports. This means calculating the raw output by grinding over the data in the database, and then creating a new table which represents the data with valid calculations. The second step was to generate the reports. It is a very procedural way to think about it, but you certainly create objects that perform different calculations, configure them on a per project basis, and then represent the reports / report generation as another series of objects. It lends itself well, to an ObjectFactory style design where pieces can be swapped in and out depending on configuration.

Hope this helps.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.