locked
Mask Phone ReportViewer RRS feed

  • Question

  • User-1501966095 posted

    Use VS2010, aspnet4, C# ReportViewer

    Table SQLServer store the phone 1112345678
    In reportviewer want to display with mask (11) 1234-6789
    how do I make

    I did so:

    =Format(Int(Fields!Phone.Value), "(00)0000-0000")

    if Phone <> null   Ok !

    if Phone = null  #erro

    how to solve?

    Wednesday, March 13, 2013 1:11 PM

Answers

  • User-1501966095 posted

    resolved:

    =IIF(IsNothing(Fields!Telefone.Value),"nulo" , Format(cdec(Fields!Telefone.Value),"(##) ####-####" ))
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 14, 2013 7:10 AM

All replies

  • User-1501966095 posted

    resolved:

    =IIF(IsNothing(Fields!Telefone.Value),"nulo" , Format(cdec(Fields!Telefone.Value),"(##) ####-####" ))
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 14, 2013 7:10 AM
  • User-1280676833 posted

    Congratulations! Im glad to hear that you have solved this issue by yourself. Welcome to post your question on here in the future programming.

    Regards

    Monday, March 25, 2013 4:29 AM