Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 5 Jahren, 2 Monaten
Letzter Beitrag:
vor 5 Jahren, 2 Monaten
Beteiligte Autoren:
David Egan, Al, DW, Arie, Piet van Zanten

Reports & Queries

Startbeitrag von David Egan am 14.05.2013 01:18

After much deliberation I finally decided to use Reports & Queries for end users, but I can't get the thing to work correctly.

I have created a report using a query (pulling data from 2 files). The report is flagged as being fully modifiable & works fine when I run it in dev mode. I have added to my menu RunReportsandQueries(reportname) so that users can change it. I then compile and run the program and the report still works perfectly.

I then try to edit the report. It loads up OK but gives me an error for each control on the report "control references an element not found in the project, report or the analysis". Each element is directly linked to the query, In my dev environment I've even tried making the report directly from the query, and even an embedded query but whatever I do, I get the same issue. Trying to add an item to the report shows the query but no fields attached to it. The query is included in the library, in desperation I've even copied the file into the EXE directory but that hasn't worked either.

I've wasted over a week on this now, desperate for any ideas.




Re: Reports & Queries

Hello David

When you are editing the report and getting errors, are you editing it still in the dev system or are you in the production environment ?

We have not have any issues like that, but we don't use queries as a source for our reports, they are invariably a purpose built set of data in a table or temp file. We have used the report generator in V14 and V16 in this manner.

I suppose a last resort workaround might be to pass the query data into a memory table and base the report on the table.


von Al - am 14.05.2013 12:04

Re: Reports & Queries

Did you also mark the query as useable in R&Q?
When editing the report, did you open the corresponding project (which is done automatically when starting the report-editor from within your software)

I'm using user reports in all my projects without any problems.

Normally you can start your built-in reports (i.e. customers.rpt) with iPrintReport(customers.rpt)
You can also create new reports, give them a name say davids_report.rpt
And run this one with iPrintReport("davids_reports.rpt")

von Arie - am 14.05.2013 19:25

Re: Reports & Queries

Hi Guys
@Al: The problem only occurs in the production environment. I've used R&Q in v14 with no problems, but like you it was all file based rather than query based.

@Arie: The query is not flagged as editable in R&Q as I don't want them making any changes to that. I have just tried changing that temporarily though but still get the same result.

What I have now done, which is certainly anything but 10 times quicker but does work, is run the query & dump it into a file specifically created for the document type. The file can be seen within R&Q so users can modify the layout that way.


von David Egan - am 14.05.2013 22:49

Re: Reports & Queries

Hello David

So the conclusion is that query based reports cannot be used in the client side R&Q process, which seems quite odd, but handy to know.

@ Forum members - Has anyone managed to get a query based report to work using the client side R&Q ?


von Al - am 15.05.2013 00:38

Re: Reports & Queries


Yes I did, (in WD16) you just need to flag the report visible in R&Q.
Query editor, Advanced, Reports and Queries tab.


von Piet van Zanten - am 15.05.2013 06:02

Re: Reports & Queries

Hay David,

WD16 have 75% of my reporst are based on quiers and I do have a end user that changes them with no problems.


von DW - am 15.05.2013 09:36

Re: Reports & Queries

Maybe this is a WD17 "feature"!

I've done a few more tests in a dummy project where it has worked OK. There are only 2 real differences in the setup of the 2 projects; the dummy one has a single configuration & uses data files in the default folder whereas the real one has 2 configurations (although I have done all my testing for this in the same configuration) & uses HChangeDir(Filegroup,dir) to access different files when actually running the report.

I can't see why/how either of these differences should cause R&Q not to work. The fact that it has no problem working directly with the files suggests everything is fine, but I think there is some sort of pathing problem with queries for R&Q in design mode in my live project.

For now I've wasted more than enough time on this so I'll live with my workaround & worry about it later.


von David Egan - am 15.05.2013 23:21
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.