Title: GRW Limitation - 2 reports at the same time? Post by: Paul M. on April 24, 2014, 01:07:01 pm Is this now impossible when using the report writer? Code
Everything ends up in FILE2. This is a very simple example. I am currently changing existing ascii reports to use the GRW and in some case I do have reports starting at the same time that I need to send to xml as the reports are in the same for/foreach loop and using the same data but have very different outputs. Do I now have to start rewriting code any time I need more that one report active at the same time? Title: Re: GRW Limitation - 2 reports at the same time? Post by: Alex G. on April 24, 2014, 03:20:55 pm Hi Paul,
>Is this now impossible when using the report writer? It is not possible to have two 4GL reports producing XML at the same time. Perhaps the two reports cannot be combined into one larger report shipping the combined data of both. If that isn't an option then the reports would have to be run in sequence as shown below. Code
>in some case I do have reports starting at the same time that I need to send to xml as the reports are in the same for/foreach loop and using the same data but have very different outputs. For this case you would call fgl_report_createProcessLevelDataFile("FILE1") as you have done in your example and later when the file is complete you can call fgl_report_runReportFromProcessLevelDataFile(handler,"FILE1") any number of times with different outputs (e.g. PDF, SVG, ..) or even different designs. Example: Code
There is also an alternative function "fgl_report_setProcessLevelDataFile(STRING fileName)" which creates the process level data file on the fly in addition to the regular output. This way you can for example have a report produce SVG output with can be viewed while the report is still running (In the previous example we had to wait for the report to complete creating the process level data file before we could view the first page) while producing the data file at the same time. Example: Code
Regards, Alex Title: Re: GRW Limitation - 2 reports at the same time? Post by: Paul M. on April 24, 2014, 03:40:46 pm Alex,
Thanks for your reply. We produce the xml output and then let the user view/print it later at their convenience. I was hoping that there was a simple workaround. If it were only two I would try and combine them but i have a lot more on my convert to-do list, so run in sequence it will have to be. At least I know now. Regards, Paul Murray. Title: Re: GRW Limitation - 2 reports at the same time? Post by: Alex G. on April 24, 2014, 04:19:16 pm Hi Paul,
out of interest: >We produce the xml output and then let the user view/print it later at their convenience. Do you do that for all reports? Isn't latency an issue on larger reports using this approach? Using the "fgl_report_setProcessLevelDataFile(STRING fileName)" function you could allow users to produce the first instance as a latency free document. When the document generation has completed then the process level data file is also ready for use. This file could then be archived for later selection by users as you described so that the overall functionality would be similar. Regards, Alex Title: Re: GRW Limitation - 2 reports at the same time? Post by: Paul M. on April 25, 2014, 02:26:19 pm Alex,
Yes, every report we produce are direct to a file and we have a program to list up a users reports and they can either view,delete or print them. We have being doing it this way for about 20 years and its really never been an issue. Most want to see the final totals or summaries that appear at the end of the reports. Regards, Paul Murray. |