B
B
becks2016-01-28 10:57:20
Programming
becks, 2016-01-28 10:57:20

What to use to automatically generate complex reports?

The bottom line is that there is some software, the user needs to generate various reports in a human-readable form in it and upload them (the program itself fills in the necessary places in the report).
Now it is done in the form of MS Word templates. With the help of special tags in the template mark the areas where you want to insert data. The template is programmatically opened, parsed, data is inserted (all through OLE), based on the task, and a report is generated.
With the help of special tags, you can insert ordinary values, collections of values ​​(including forming tables), there are calculated functions (which may contain other functions inside), pictures, and so on.
Most of the most popular templates we have created for users ourselves and they work with them. But often a situation arises when the user needs to change the form of the template or even create a new one. And here problems arise, because the task for an unprepared person is quite difficult, and people do not want to read the manual. Plus, large reports are generated extremely long (for example, with the content of large tables), the reason is OLE.
Therefore, the questions are:
1) What format should I choose for template parsing? Something tells me it will be much more convenient and faster to parse text formats (html, xml, json ...). Never worked with latex, maybe it will fit. The format is needed so that the user can, after generating the report, open it, correct it and print it.
2) We need some kind of view for the user to easily generate a template. I pressed the button, a table was created, indicated that we were unloading, for example, contracts into it.
3) Maybe there are some ready-made solutions for generating a report, but I'm not sure that they will suit us. Will explain. For example, found in the template special. tag, I rip it out and send a request to the service, the service returns the result, I paste the result. Those. there is some "proxy" between the parser and the data (it returns the data upon request).
I would be grateful for advice.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Aleksej, 2016-01-28
@Shwed_Berlin

I don't quite understand some of your requirements.
But for reports, and even .Net, SSRS - MS SQL Reporting Services is perfect.
There is a preview, and you can embed it in the program, there is an export to any format - PDF, Word, Excel.
You can use the supplied ReportServer (Web Portal) or make your own web page/program.
It's not clear about the "parsing of templates" - are you talking about data or about the appearance of the report?
Data in SSRS can be taken from any database or substituted programmatically. Appearance is formed in advance.

A
AtomKrieg, 2016-01-28
@AtomKrieg

1) What format to choose for template parsing?
In an enterprise it is worth choosing XML. Html is a format for displaying a document, not its presentation. Json is more suitable for simple needs, it will not suit you, because I will describe in paragraph 3
2) a) convert XML to html or openoffice format (this is a bicycle). Modern docx and xlsx formats are archived xml (take any document, change the extension to zip and look).
b) You can also google "generate reports from XML", "c++ library for reports from xml" or rummage through github.
3) It seems to me that we are talking about XLST transformation here.

D
Dmitry Kovalsky, 2016-01-28
@dmitryKovalskiy

Have you tried SSRS ?

K
Konstantin Nagibovich, 2016-01-28
@nki

I really like how the work with reports in 1C is implemented.

N
Nikolai Turnaviotov, 2016-01-29
@foxmuldercp

I can choose to offer MS Access / Excel in addition to SSRS,
having a connection to the server, the form and queries can be drawn as you like

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question