I am trying to print 2 images of 2 pages of warranty conditions stored in container fields in 2 records, in the epilog of invoice report. But it never takes the page break I put. I use send method inside fetch with the following code.
It always ends up printing the second page only.
boolean onpagetwo = false;
select first record and if record exists
send it and set variable onpagetwo to true.
select second record.
if record exists and if variable onpagetwo is true,
send new page and then send record
Can someone please tell me what is wrong with this code?
Thanks very much
Use your condition based on warranty conditions as you said then use something like;
if(warrantyCondition == A)
That way if your warranty condition is met you get a new page, the element is sent to a page height like an epiloge (test this as play around with the height i.e. 20000 etc…
Then put your image in a new executable section on the report design and you fire it (element.execute(1)).
But gotoYmm did not work, gave error message. When I tried without it, it printed the image of first page of warranty in execute section as page footer on a new page. This had page headings as well.
Then it printed the image of the second page of warranty in epilog on the next page.
Actually I solved the problem by taking an image of the single warranty page (back of pre-printed invoice) and resizing it using PaintPro and loading it in epilog . This prints the warranty on one page as epilog and also works for printing to PDF file.