Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 2 Jahren, 10 Monaten
Letzter Beitrag:
vor 2 Jahren, 10 Monaten
Beteiligte Autoren:
DerekM, Fabrice Harari, Allard, Al

[WD19] Advice sought re End User report "templates"

Startbeitrag von DerekM am 03.08.2015 00:24

I have a requirement to provide the end-user with the ability to format a report layout (i.e. to move / position fields for pre-printed stationery and/or various pdf background images.)

The report is driven by an HFSQL query. The end-user needs to create a template by moving fields and labels to suit specific requirements.

Is this easily achieved using "Reports & Queries" (I have never used this yet) - or is there a simpler approach with WinDev that I have overlooked.

Any advice greatly appreciated :)


Hi Derek

from what I understand, report and query will be a huge overkill, and way to complex for the task at hand...

I would advise that you create a "design view" of your report in a window, and let the user move the 'fields' there via drag and drop. That will allow you to control everything as needed, and make the UI very simple for the user

Best regards

von Fabrice Harari - am 03.08.2015 12:13
Hi Fabrice

Thanks. You are describing, more or less, what I need, and I have no desire to needlessly introduce complexity.

But, I don't quite 'get' how to achieve this. How do you position / drag and drop fields on a window?

An embedded report editor would be nice .. but .. basically, I don't have a clue where to begin. Are there any examples that could be used as a basis?


von DerekM - am 03.08.2015 13:45
Hi Derek,

I think that there are examples of an image fields where the user can move "icons" with the mouse...

If the icons are in your case rectangles with the name/content of the fields in it, then you just need to position them initially, and control save their position in a parameter file...

When doing your report, you just have t move the fields accordingly

Best regards

von Fabrice Harari - am 03.08.2015 14:25
Hi Fabrice

Again, thanks for your time and advice.

I have looked a little further, and my opinion is that although it could be done this way, perhaps it shouldn't be done this way. Likely it would encounter many limitations regardless of the effort.

Also, I'm not sure if other development environments (e.g. Delphi?) provide some sort of built-in end-user report layout facility, but with some brief googling, it doesn't appear that much improvement has been made in this area in the last 10-15 years. A few promising "end-user" reporting links that I followed (WinForms - XtraReports etc.) - ended showing something not dissimilar to WinDev Reports & Queries.

For now, I will provide Reports & Queries. I just have to go through a very large project, un-checking 'Reports & Queries' to limit end-user access. I am hopeful that this will meet the requirements.

Also, if kept under control, Reports & Queries could be very useful. Pity about the soft-porn images and WinDev icons :(

von DerekM - am 04.08.2015 00:47
Hello Derek,

I had a go at the R&Q a few years ago and then stopped as it was too hard to maintain with a large number of clients.
However the main issue I had at the time was that it exposed all the code and comments in the project init - stuff that I do NOT want the client to see.

Also it increases the patch size to a minimum of 4mb


von Al - am 04.08.2015 02:10
Hi Al

Thanks for the heads-up there. I (briefly) checked and can't yet see where the project code is exposed. Maybe (hopefully) - it has ben improved.

It's not ideal, and even "power users" don't really want to create their own reports, but if I lock out everything except for a few "forms" reports, I am hopeful that it will work without too much drama. Even if the end-user asks us to create the template, it is easier to justify addition charges for that service if the application actually allows DIY.

I have a situation where there are (potentially) 50-100 variations of the "same" pre-printed form. Not having to worry about font size and precise positioning will (might) enable me to have a life.


von DerekM - am 04.08.2015 04:25
Hi Derek,

I use reports and queries so customers van make their own invoice templates, etc
This works great and it is not very difficult for the customer to work with. It works for me but I have found some odd things that I have to fix sometime.

If you want to reduce the complexity for the customar. Then you need to think outbout how they can add stuff to the report. Making a report based on a query is handy. Customers then can select one of the fields from the query and add it to a report.
It is my opinion that you should minimize programming in a report. For that will confuse a customer. Better create a separate file witch holds all the fields and values you need. ( if values come from many files and a query would be to complex )Fill that file before you run the report.
Hope this info helps


von Allard - am 04.08.2015 09:26
Hi Derek,

please be advised that Al is correct and that all the SOURCE CODE of the project init becomes visible when using report and query. You just need an hex editor on the exe to read all of it... It seems that the external report and query tool needs it to initialize everything the same way your exe does, and that pscoft couldn't be bother in enccrypting it.

There is of course an easy workaround: create a global proc and move all your project init code in it. Hte visible part will therefore be only the call to the procedure.

Best regards

von Fabrice Harari - am 04.08.2015 10:11
Hi Allard

Thanks for the feedback.

Yes, absolutely - all reports are based on query views. In fact, I use 'query' for most CRUD operations - table -> query(view) -> procedure.

I'll post some 'results' when I gain experience with R&Q, as it does not appear to be extensively utilized (at least in the Anglophone world).


von DerekM - am 04.08.2015 10:22
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.