How to determine the number of lines to print in the body before trigering transfooter/transheader?
Abrou I don’t think there’s a good way to determine how big the body section will be. I know we have tried things such as line counting to allow a maximum number of body lines per page, but its very messy.
Alex, Is it possible to influence the triggering of the transfooter or the transheader? I cannot find any reading materials on that subject. Are there any? Could you also please give me a hint on how to count the max number of lines in the body? Thank you!
quote:
Originally posted by abrou
Alex, Is it possible to influence the triggering of the transfooter or the transheader? I cannot find any reading materials on that subject. Are there any? Could you also please give me a hint on how to count the max number of lines in the body? Thank you!
Transfooters and transheaders are handled by Navision and you can do little to control them. You can set CurrReport.SHOWOUTPUT function, according to your own conditions, but to control that conditions might be quite messy. To count lines in the body you may define an integer variable, say LineCount and a boolean, say PageFull. In the OnPreSection trigger of each body section you may add some code like this: LineCount := LineCount + 1; PageFull := LineCount >= 50; (being 50 the maximun of allowed lines) IF PageFull THEN LineCount := 0;
In the OnPresection trigger of your Transheader and Transfooter sections you may add the code: CurrReport.SHOWOUTPUT := PageFull;
Although, I would rather change them into body sections as well, if I were to use such a trick. Anna