Suppose you are tallying information from source records by looping through them, and placing the tallies into arrays. Depending on the field values in the record or in linked records, you might place the tally into different array “containers”.
What is the best way to print the summary information? Do you create temporary records in a “temp” table, and place the array contents into those?
Thanks,
Don
Hi Don,
I guess it depends on the use-case and what you want/need to use.
For reporting in general you have a few options. Use a Servoy form, use JasperReports or use VelocityReports.
So for example you can display it all in a HTML_AREA using HTML produced by code and print that via a Servoy form. Or use VelocityReport and pass the array to the XHTML template. Velocity can handle those native objects.
About storing arrays in a (temp) table.
There are SQL backends with array datatypes (like for example Progress and PostgreSQL) but using those is not really practical with Servoy since Servoy doesn’t support those special datatypes. You could use them but it would require custom SQL and processing of the result data.
Same goes for storing the array’s as XML or JSON values in a table. Both require some extra code to process the values.
What are you trying to do exactly ?
Hi Robert,
For each student within a batch of records, I loop through to determine whether an allowed number of days was exceeded, by stepping through the calendar (on each student) between two milestones, not counting designated holidays longer than 5 days. If the allowance is exceeded, I create a dataset row for the student, placing an “X” in the column representing the reason for not meeting the deadline (it’s actually not my design - it’s a compliance form).
After completing the evaluation, if there are eligible student records, I print the form by creating temporary records from the dataset. I print (see attached), then delete the temporary records.
Is this the approach you would use?
I’m also having some trouble getting things to look nice. Arial Narrow is illegible, so I’m using Tahoma. On the screen, vertical lines don’t exactly meet up between rows. There seems to be no difference between 0.5 and 1.0-point lines, and the 2-point lines are quite ugly. I also need to create a bunch of dummy records to print blank rows to the bottom of the page…or do I?
Since I have so many forms to re-create, I’m hoping to find the fastest way to get good results.
Thanks for your reply,
Don