Setting Report.PrintOptions.Printmode in code

edited 5:21PM in FastReport 4.0
Hi

Have searched online for this information but cannot find it.

There are plenty of examples for : Report.PrintOptions.Copies := 2 etc.

But, none for printmode.

For example if I try : frxReport1.PrintOptions.printmode := 2; ( want to set pmJoin)

I get error : Incompatible types : "TfrxPrintmode" and integer.

How can I set this value?

Regards

Ravi K

Comments

  • edited 5:21PM
    TfrxReport(frxReport).Report.PrintOptions.printmode := pmJoin;
  • edited 5:21PM
    pele wrote: »
    TfrxReport(frxReport).Report.PrintOptions.printmode := pmJoin;

    Thanks for the info, but unfortunately it does not work in this case.


    This is the code that works for copies. frxpreport1 is in unit Reportform.

    ReportForm.frxReport1.PrintOptions.Copies := 2;


    Tried both.

    TfrxReport(frxReport).Report.PrintOptions.printmode := pmJoin; // - frxreport error

    TfrxReport(ReportForm.frxReport1).Report.PrintOptions.printmode := pmJoin; // - ReportForm.frxReport1 no error.

    The other issue is pmJoin is not defined.

    Hope you can help.

    Thanks.

    Regards

    Ravi K.




  • edited 5:21PM
    add frxClass to uses
  • gpigpi
    edited 5:21PM
    Modify frxClassRTTI.pas
    AddEnum('TfrxFormatKind', 'fkText, fkNumeric, fkDateTime, fkBoolean');
        AddEnum('TfrxFillType', 'ftBrush, ftGradient, ftGlass');
        AddEnum('TfrxPrintMode', 'pmDefault, pmSplit, pmJoin, pmScale'); //add this line
    

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.