'NullReferenceExceptionIsThrown when I use InitializeComponent(); method in my Devexpress XtraReport constructor

I am using DevExpress XtraReport to pass some data through it and export report's pdf. But whenever i try to create new instance of my report i get nullReferenceException.

Here is the place where I create a new instance of my report:

var report = new ReportReagent(User.ToString(), DateTime.Now, User.Identity.Name.ToString(), parameters);

How my constructor looks:

 public ReportReagent(string partnerName,DateTime currentDate,string userFIO,List<string> parameters)
    {
        InitializeComponent();
        _currentDate = currentDate;
        _partnerName = partnerName;
        _userFIO = userFIO;
        DataSource = parameters;
    }

And designer where i get the exception,I better show it with the screenshot:

Place where i get the exception

I tried googling and other stuff, but still did't manage to find the reason of the problem. If you need some extra information, please tell me.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source