|
| Query with UNION not recognised by Report |
| Iniciado por Meredith GUY, 11,abr. 2020 18:35 - 3 respuestas |
| |
| | | |
|
| |
Miembro registrado 7 mensajes |
|
| Publicado el 11,abril 2020 - 18:35 |
Good day
I am attempting to create an invoice report for a medical practice, and the invoice has several lines - the first shows the consultation carried out by the doctor, the second lines show the treatments given by the doctor, and the third set of lines show the materials used in the treatments. I am relatively new to Windev, and very new to the reporting, and could not work out how to use breaks to print each treatment, together with the materials used, in the correct sequence.
I then wrote a union query, which works fine when run on its own and passing the relevant parameter.
However, when I select that query when trying to create a report, Windev does not show me the fields returned by the query - it seems I simply cannot use such a query in my report. Has anyone experienced this? I can select the query from the dropdown list of the report in the 'describing the report' section, but when closing that section and re-opening it, my selection is lost. Windev reports simply do not seem to allow one to use a view with a union.
If anyone has any suggestions I would be most grateful!
Thanks
Guy |
| |
| |
| | | |
|
| | |
| |
| Publicado el 15,abril 2020 - 14:15 |
AFAIK, -IF- you create your query with the query editor, then it WILL be compatible with the report editor, and EVERYTHING ELSE EVERYWHERE... In that case, windev even translate the query into the compatible SQL language when you change the type of DB used.
However, if you create the query directly in SQL code, you are on your own. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 16,abril 2020 - 00:07 |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 7 mensajes |
|
| Publicado el 16,abril 2020 - 09:11 |
Thank you Argus and Mike for your replies, much appreciated. I must admit I did not even notice that the Union command was available in the query editor - I had simply selected the 'select' button, and started creating my query, and then realised I wished to do a union and could not see how to do from where I was in the query editor! I am a newbie, but it was a silly oversight. I will try and recreate my query using the union from the query editor instead of coding it in SQL myself, and will see whether that query is then usable in the report.
I had tried the nested report at first, Mike, but was struggling. I think I need to look at the various examples available to see how best to achieve this. I then turned to using a Union as I knew I was more familiar with writing SQL than with the nested reports in Windev.
Thanks again to both of you for your assistance!
Regards
Guy |
| |
| |
| | | |
|
| | | | |
| | |
|