Change Bin during Runtime

dschuchdschuch Dresden,Germany
edited 6:27PM in FastReport 3.0
Hi People,

I want to change the Printer Bin during runtime (in code). But till now i failed. Has anybody a solution for this problem?

Is this problem solved in V4?

Thnx for Help >

Comments

  • edited 6:27PM
    sorry ... habe nur kurz Zeit:

    sollte klappen mit:

    Ausschnitt:
        rep := (Report as TfrxReport);
        try
          for z := 1 to rep.PreviewPages.Count do begin
            rep.PreviewPages.Page[z-1].bin := bin;
            rep.PreviewPages.Page[z-1].BinOtherPages := bin;
          end;
        except
        end;
    

    bins auslesen mit
    Ausschnitt:
    var
        Needed       : Integer;
        ADeviceMode  : THandle;
        ADevice,
        ADriver,
        APort        : array[0..255] of char;
        BinIDArray,
        BinNameArray : PChar;
        BinID        : Word;
        BinName      : array[0..24] of Char;
    
    
           Printer.PrinterIndex := Index1;
           Printer.GetPrinter(ADevice, ADriver, APort, ADeviceMode);
    
           Needed := DeviceCapabilities(ADevice, APort, dc_binnames, nil, nil);
           GetMem(BinNameArray, cchBinName * Needed);
           GetMem(BinIDArray, 2 * Needed);
           FillChar(BinNameArray[0], cchBinName * Needed, 0);
           FillChar(BinIDArray[0], 2 * Needed, 0);
           try
             DeviceCapabilities(ADevice, APort, dc_binnames, BinNameArray, nil);
             DeviceCapabilities(ADevice, APort, dc_bins, BinIDArray, nil);
             for Index2 := 1 to Needed do
              begin
                move(BinNameArray[cchBinName * (Index2 - 1)], BinName[0], cchBinName);
                move(BinIDArray[2 * (Index2 - 1)], BinID, 2);
    
                IncCombo.Items.add(trim(BinName));
                IncCombo.Values.add(inttostr(BinID));
              end;
           finally
             FreeMem(BinIDArray, 2 * Needed);
             FreeMem(BinNameArray, cchBinName * Needed);
           end;
    

    Gruss Stefan

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.