Report reserves space for not-used sections

I’m using Navision Attain 3.10A and I have a problem with designing an invoice report. The customer has many exceptions e.g. there are a lot of remarks to be printed at the end of the report and sometimes they aren’t. When all these parts (total, body) aren’t used (showout=false) navision attain still reserves the space in the report. This results in nearly one empty page at the end of the report. When i remove these optional parts (Total, Body), the free space isn’t printed and the report looks good. I tried many variations but i still got this empty space at the end. has anyone any idea how to fix this?? Thanks in advance. Marc Deitermann

Sorry to inform you, but this has been an irritant for Navision developers since the “dawn of time”. You are not likely to find an acceptable work around for unviewed footer sections. I had one such report that I fought with forever too and never resolved with any satisfaction. The only possible solution I could think of is if the section could be put into an additional dataitem for “Integer” and print your details on a separate page. That way you could put the section outside the regular invoice and not in a footer and the space won’t get reserved. Regards! Kristopher Webb Kelar Corporation, Canada

Another work-around is to build a temporary table of the remarks in text (subsidiary to your primary table) as they are needed, put a single line at the end of the invoice and then loop through the temporary table at the end of the invoice. A variation on this may be required to meet your exact requirements, but the approach may be useful. Not neat, but as Kristopher said, “this [problem] has been an irritant for Navision developers since…”. Dave Studebaker das@libertyforever.com Liberty Grove Software A Navision Services Partner

Have you tried setting the “KeepWithNext” property of each section to “No”. I often find this removes blank space problems, especially on reports with group footers etc. Might not work with space at the end of reports but is worth a go.

quote:


Originally posted by daves: Another work-around is to build a temporary table of the remarks in text (subsidiary to your primary table) as they are needed, put a single line at the end of the invoice and then loop through the temporary table at the end of the invoice. A variation on this may be required to meet your exact requirements, but the approach may be useful. Not neat, but as Kristopher said, “this [problem] has been an irritant for Navision developers since…”.


Ahhh… I’m not sure I like the sounds of this option… sly grin Tables a pretty expensive objects, so I feel very hesitant about creating ANYTHING as a temporary table as an actual object in the database. (I was recently working on our one client, who’s customization had been developed by a COBOL programmer, and there are freakin’ 5 temporary tables in their objects!!! 4 of which I believe I’ve been able to do away with a bit more creative programming, so you can see my issue here…) But, I do believe Dave is on the right track! cheers and applause How about using the OnInitReport trigger to build an array with all the text captions. Then use the Integer record as the new dataitem, and cycle through for the number of lines you need to print, accessing each element of the array each time. This will allow us to do basically the same thing without the need of a dedicated temporary table in the database. Dave’s happy and I’m happy. Are you? grin Regards! Kristopher Webb Kelar Corporation, Canada

Actually Kristopher, we are totally on the same wavelength when it comes to “wasting” tables. Whenever I use a temporary table, I work hard to find a standard table that contains the type of fields that I need and then use that as the Record definition for my temporary table. In this case for example, I might use the Standard Text Table (# 7) as my definition. The only disadvantage I see to the array suggestion is that you must know the maximum number of lines that can be optionally included in order to properly define the array size. If you know that, your solution is slightly cleaner than mine, if not, then mine is slightly better. Those who know me well, including my clients, often describe me as “frugal” (or one of its synonyms). And keep up the good work on tracking down and cleaning up sloppy code. Dave Studebaker das@libertyforever.com Liberty Grove Software A Navision Services Partner

i think David was talking about using a variable of record type with its ‘Temporary’ property ON. I used that many times to help me finish some reports, especially when they do things they aren’t supposed to.

Isaac interprets my intention correctly. Dave Studebaker das@libertyforever.com Liberty Grove Software A Navision Services Partner

Create a new Integer dataitem for each body to show in . MaxIteration 1. If you don’t show this section, Currreport.Break. It’s the best solution to navision don’t reserve space. Totals, transheaders, footers and transfooters are created normaly, but bodies, with Integer. Best regards from BCN

The problem of attain allocating space for unused sections of reports has/will be fixed in 3.60. But how about this in the change log of 3.60 P31) View Menu Item Could Cause Uncontrolled Shutdown of Attain. Paul Baxter