Change Bin on runtime

edited 2:23PM in FastReport 3.0
...nobody can help me ;) ??? I try again!!! ....

In FR 2.45 I changed the bins with:
Prn.SetPrinterInfo(....)

In FR 3.08 it seems to be something like:
frxPrinters.printer.SetPrintParams(...)

But in the SetPrintParams-function it checks a FBin-Variable if it's -1 - if not then sets FBin and not the given ABin...
 if FBin <> -1 then
    ABin := FBin;
  FMode.dmDefaultSource := ABin;
why and how to set it right? ... To check, I made the Bin-Property writeable ;) and set it to -1 to be able to use SetPrintParams... I worked almost... It sets the bin in the dialog as a preset, but not if I print direct!

Is it necessery to set it for every page... I found a writable bin-property there?

Thanks for suggestions

Comments

  • edited 2:23PM
    Wy didn't you set the Page.Bin and Page.BinOtherPages instead?
    with TfrxReportPage(frxReport.Pages[0]) do
    begin
    Bin := DMBIN_AUTO;
    BinOtherPages := DMBIN_AUTO;
    end;
  • edited 2:23PM
    Thanks for your answer! ;)

    The new bin settings on the designpages are fine... but

    My users are used to set First,Last,AllOther-Bins for the Prepared Report... and because I also use "PrintToPreviousPages" I can never be sure before preparing where the page is...

    I would like to have the control over that on the prepared Page. (Like in FR2)

    So I tried to set the Preview Bin Property like
         with Report1 do begin
            for z := 1 to PreviewPages.Count do begin
              if z = 1 then begin
                if bin_first <> 0 then begin
                  PreviewPages.Page[z-1].bin := bin_first;
                  PreviewPages.Page[z-1].BinOtherPages := bin_first;
                  ...
                  ... 
                  ...
    

    It don't works ?!? ;)

    Any other suggestions...

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.