Component One - Report Designer - Fixed position issue

Posted by: shivam.thakur on 12 March 2019, 2:04 am EST

    • Post Options:
    • Link

    Posted 12 March 2019, 2:04 am EST

    I am printing one report two times (like customer copy and office copy). There is dynamic data in my report and i need to tear my printed paper in two half. So i need to fix position for my perforated line so that it get fixed position irrespective to dynamic data. I am using Letter size paper to print this report and perforated line is going up an down according to data (i need to fix this line).

    Is there a way to get height of paper size and divide it by 2 and use -

    perforatedLine.Top = pageSize/2

    If yes than suggest how to get it and how to fix position of this line?

  • Posted 12 March 2019, 10:08 pm EST

    Hi,

    For this, you should access the RenderHeight property that returns the actual height of the section. You may add these values and divide the sum by two.

    Also, you should do this in EndPage event of FlexReport, so you get the correct height.

    Let me know, if you need further assistance.

    Regards,

    Ruchir

  • Posted 25 March 2019, 12:49 am EST

    Thanks for replying. I’ll implement and will let you know.

    Thanks a lot!!

  • Posted 3 July 2019, 4:50 pm EST - Updated 4 October 2022, 12:05 am EST

    Hi,

    Firstly, I am not using flex reports and I used Watermark(Picture of a line) instead of line and it is working fine for me.

    Now, I do not want this watermark on every page of my report. So, I want to hide it on some conditions on some pages. Please help me in knowing how to get this and where (Event- eg. onPrint,onPage,onFormat) to use it in VB Script . It is in Main report properties in Layout section. I can hide it by setting PictureScale property from “Scale” to “Hide” , But i am confused how to get this element and where to use it. I am attaching some screen shots for my report.

  • Posted 4 July 2019, 4:28 am EST

    Hello,

    Taking an instance of making the Watermark visible only in case of even page numbers, the following script can be used under Report.OnPage property:

    If Page Mod 2 =0 Then 
    Report.Layout.PictureScale=2
    Else
    Report.Layout.PictureScale=4
    EndIf
    

    This has been implemented in the attached C1Report, bound to C1NWind.mdb, shipped with ComponentOne Studio.

    Likewise, the condition may vary for different requirements.

    Thanks,

    Esha

    Note: C1Report is now obsolete (https://www.grapecity.com/forums/wpf-edition/c1report-is-now-obsolete-t).

    Watermark.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels