I need to know, if there is any possible way I can be able to count the number of pages generated/created by a form dynamically for each policy record in extract file input.
For each record in extract file (flat file) based input to DAP, if suppose say 3 different forms are triggered I want to find out the number of pages created by each of these forms in run time and save the result to output file like,
Edited by: user11686052 on Jan 29, 2013 2:14 AM
The DALs - TotalSheets() and TotalPages() can be handy.
Other expensive way is to place a distinctive variable in evey form (use 'copy on overflow' here).
You can extract the value using the builtin DAL function - count()
Thanks for the post!!!
The DAL function Totalpages() and Totalsheet() functions operate only on recipient names as input. I tried it earlier but it returns total page count per recipient.
On the other hand using the count() requires to code a variable in each and every form is something I would take as a contingent approach as it may cause regression in base. Not sure if it will work for this scenario but still I will give it a try and update you.
You are correct that the TotalSheets and pages function are counting what actually prints, which can be different than logical pages - assuming that is what you want.
For what you describe, you might need to use a combination of While loops. The outer loop would use FormName to index through the forms by passing the count as the first parameter. The inner loop would then call the PageImage() function with an index parameter in much the same way and pass the form name from the outer loop. When you get no name back, then you know you have requested an invalid page, so you can know what the count is. With a simple DFD to define you output file, you can then output the name and page count and fall back to the outer loop for the next form.