A
A
AlexSer2021-02-01 13:54:45
Yii
AlexSer, 2021-02-01 13:54:45

How to create your own report designer?

Hello!!! There was a question about creating a report designer for statistics.
Every time the organization has new reports, and because of the changes made, I'm tired of rewriting the code.
I came up with the idea of ​​my own constructor, so that users themselves could generate the reports they need, without my participation. Question, has anyone already solved this or is there an example code. Could you share for study.
Preferably an example in Yii2.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lander, 2021-02-01
@AlexSer

95% of reports are a set of groupings and (so to speak) metrics on a data set.
That is, for any set of records, you first need to apply groupings (For example: Grouping by date, by type of counterparty, by price range, etc.) and calculate the metric within each group (For example: average value, amount, etc.). This is the base. Having implemented it, you can already simply write groupings and metrics (it is convenient to separate them into separate entities). You are unlikely to be able to write everything at once, but write new ones upon request and sooner or later they will cover all the requests of your users.

K
Kirill Gorelov, 2021-02-01
@Kirill-Gorelov

I don’t know how useful my experience will be for you, but I’m just now in a similar situation.
Only it is difficult for me to call it a constructor, and the language does not turn, but it is very similar to a constructor.
The bottom line is that I initially create a set of fields I need. I prepare for them the name, sorting, character code, field type.
Then, in the right place, I display this set of fields and, depending on its "TYPE", I display the desired form. Text, list, html editor, etc. and you can add and customize them.
And due to this, a mini designer is obtained.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question