Custom page size + Autogrow page height?

I have a problem in printing my bill, which uses Custom page size setting(Page.ChangePaper( ASize, AWidth, AHeight, ABin, AOrientation)
with ASize as 256 in Fr2.5. But the problem is that i do not know the height of the page, before printing the page beacuse the number of items(rows) in the bill can be different based on the number of items entered by the user.
So what should i do to set the Height of the paper, dynamically .
My ultimate aim is to stop printing the bill, after all the rows are printed(without scrolling the whole page futher).

Currently i had given a page height as 500(as fixed), but if the number of items in the bill is large, then
many items will not be printed after this height, while prining.

Please give a solution to resolve this problem.

Thanks in advance

Comments

  • edited 12:09PM
    Page Options -> Paper -> Check "Unlimited height"

    Peter
    Technisoft
  • edited 12:09PM
    technisoft wrote:
    Page Options -> Paper -> Check "Unlimited height"

    Peter
    Technisoft
    Hi Peter,
    I have tried this earlier but it is not the real solution beacuse, by setting this option the whole page will scroll futher, after printing all the rows. But i need to stop the printing just after finish the printing of all the rows beacuse we are using a little bit expensive paper to print the bills. It would be nice if i get a solution to set the height of the paper based on the top position of last object placed in the report(the top postion will automatcilly changes while filling all other rows, on preparing the report). In runtime I am unable to find out the current postion of the last object placed in a prepared report. If i get this postion then, i can create the report once more with this value as height of the paper.

    Regards,
    Sat
  • edited 12:09PM
    Hi Sat,

    I am not clear on a number of aspects. Is the paper on a roll? If it is in the usual "forms format" then how will the stopping of printing save any paper?
    Does the printing end with the rows? No totals, delivery instructions, etc?

    I also suspect that the (only) solution may lie in programming the printers form length, as after a report is finished the printer probably gets a Formfeed command to eject the page.
  • edited 12:09PM
    technisoft wrote:
    Hi Sat,

    I am not clear on a number of aspects. Is the paper on a roll? If it is in the usual "forms format" then how will the stopping of printing save any paper?
    Does the printing end with the rows? No totals, delivery instructions, etc?

    I also suspect that the (only) solution may lie in programming the printers form length, as after a report is finished the printer probably gets a Formfeed command to eject the page.
    Hi Peter,
    We are using paper on a roll with a width of 10cm, which can be used in any dot matrix printer.
             TEST COMP                     1 / 1
             TEST ADDRESS                                    9
             TEST ADDRESS1
             PHONE :                                  5.06.2006
     
             Bill for Cust-Nr:                              5000
             Name
             Street
             Post
             ------------------------------------------------
              ARTICLE1
                1,00  1 1          10.000,0       10.000,00  (section 1)
              Discount %                  0          1.000,00-
             ------------------------------------------------
             Invoice amount           EUR        9.000,00       
             Cash                                      10.000,00-  (section 2)
    
             Balance :                EUR            1.000,00
             ------------------------------------------------
             Net amount ( 16.00 % )              8620,70  (section 3)
             Incl. VAT ( 16.00 % )
             This is Cash Bill Footer 1
             This is Cash Bill Footer 2    	(section 4)
             
             
             Amount received : .........................
    
    
    Sorry, the bill format is a little bit disturbed.

    Here Section1 contains the list of articles, which user has buy. All the 4 section will grow based on the number of entries, which user made. Section 4 is the memo field, here also user can input any data, which he wants given as message to the customer.

    Earlier I had created the report for printing the customer labels, which also uses a special paper with width 240mm and height 70mm, as endless roll. In this the height of the label is fixed, so I can set the height of the page, before preparing the report, through code. Which is working fine.
    But in the case of cash bill, I cannot set the page height like this, because the data is varying from bill to bill. As I am not setting the height externally it takes the design time size (now A4) and eject the up to the height of A4 size, even though there is above shown rows in the bill. But if I give a height of 500 pixels, through program, it will print only the data which is up to this 500 pix and the rest will not be printed.(In this case the paper will not eject). So if I know the current position of the ???Amount received: ??¦??¦??? memo, after preparing the report, then I can set the paper height as the AmountReceivedMemo.Top+ AmountReceivedMemo.Height and rebuild the report again with this height. As if now there is no other option I hope.

    Does there is any other option for this type of printing in FR3?.
  • edited 12:09PM
    Hi Sat,

    I always found FR2.5x erratic when handling dot-matrix printers. Sometimes reports change for no apparent reason, at other times it is impossible to reposition an existing field, it jumps 2 lines instead of one. The only way to get it right is to delete the field and recreate it. If one wants to use a pitch other than the printers default pitch then only the relatively recent EPSON printer drivers seem to cope with it, the other drivers print in graphics mode.
    All in all a very unsatisfactory situation. It was the reason I switched over to FR3 for dot-matrix reports, something I consider to have been one of my better decisions. I still use 2.5x for most other reports.

    In all cases one would need to calculate the required length before printing begins and then program the printer accordinly, but with FR3 this can now be done in lines rather than pixels.

    In general I have always steered clear as much as possible from using FR scripts and OnBeforePrint, our end-user are incapable of modifying a report which does more than just select a variable and maybe apply an equality test. Exceptions are summing up, maybe a simple highlight.
    All other calculations are done in the program before printing, and if used in the report it is passed as a variable.
    In that way I also know that in 6 months time I will still be able to understand what happens in the report.

    I suggest that you try the FR3 trial. It can co-exist with the FR2.5x installation. Unfortunately the dot-matrix documentation is non-existent, so you will have to grapple with the components.

    Peter
    Technisoft

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.