FlexViewer : default to mm

Posted by: info on 5 April 2024, 11:11 pm EST

  • Posted 5 April 2024, 11:11 pm EST - Updated 5 April 2024, 11:16 pm EST

    Hello

    How do I set the default to mm instead of inches?

    Thank you

    *.NET 8

    *C1.WPF.Report.Ja 8.0.20233.688

  • Posted 8 April 2024, 1:09 am EST

    Hi,

    We are very sorry for the delay in response.

    We are investigating your requirement to see if it is possible or not. We will get back to you as soon as possible.

    Best Regards,

    Kartik

  • Posted 9 April 2024, 1:29 am EST

    Hi,

    Apologies for the delay in response.

    We have shared your requirement with the development team to get their views on it. We will let you know the updates as soon as possible.

    Thank you for your patience and understanding.

    [Internal tracking ID: C1XAML-35955]

    Best Regards,

    Kartik

  • Posted 15 April 2024, 3:18 pm EST

    Hi,

    Please find attached a workaround we created for your requirement by handling the FlexViewer.Loaded event and customizing the PageSettingsView Frame.

    Please note that the customized Frame will not be localized automatically to Japanese language. You can edit the strings in our custom code directly. If you still face any issues, please let us know.

    Attachment: ReportPrintDemo.zip

    Best Regards,

    Kartik

  • Posted 16 April 2024, 12:43 am EST - Updated 16 April 2024, 1:32 am EST

    Thank you for the demo.

    There is a issue.

    Twip does not convert to mm accurately.

    For example, in SampleReport.flxr

    I set MarginTop, MargintRight, Margin, MarginBottom.

    <MarginTop>1133.8582677165355</MarginTop>
    <MarginRight>566.92913385826773</MarginRight>
    <Margin>566.92913385826773</Margin>
    <MarginBottom>1417.3228346456697</MarginBottom>

    I expect it to be converted to

    *20mm

    *10mm

    *10mm

    *25.000000000000004mm

    However, in the sample code,

    First, 566.92913385826773Twip is converted to 0.3937inch (text.Text).

    Second, inches are converted to mm.

    Third, 9.999979999999999mm is displayed.

    This is not the expected behavior.

    Could you modify to display mm accurately?

    ReportPrintDemo Mod.zip

  • Posted 16 April 2024, 1:04 pm EST

    About printing in my application.

    • The number of digits is sufficient without a decimal point.

      ex: 10mm

    • Two digits after the decimal point are also allowed.

      ex: 10.12mm

    • 3 digits after the decimal point are not required.

  • Posted 16 April 2024, 4:46 pm EST

    Hi,

    Thank you for sharing all the details. We have updated the custom implementation to directly convert from twips to mm instead of inches to mm. We have also used the Math.Round function to round the values to 2 digits at max.

    Please refer to the updated sample project - ReportPrintDemo_TwipToMM.zip

    Thanks, and Best Regards,

    Kartik

Need extra support?

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

Learn More

Forum Channels