visual-studio-2010daterdlcpersianpersian-calendar

How to show persian date in rdlc report in Visual Studio 2010?


I have a rdlc report in my application and i want to use a expression for showing Persian date, but the problem is i can not find any expression for it, is there a way to show Persian date in my reports in rdlc file?


Solution

  • In Report menu in rdlc report choose Report Properties, then go to "Code" tab and start writing a custom method for converting Georgian date to persian (Jalali) calendar in VB. (Remember in custom code you can only write codes in VB!) after that add a textbox in your report and write a expression like this: =Code.GetPersianDate(Fields!Date.Value)

    which Date is a column in your dataset and obviously GetPersianDate is the name of the method.

    thanks to http://ilood.com/?i=ObwcXTETQTY=
    it really helped.