Crystal reports with dataset and more than one datatable

I'm using Crystal reports 13 and I made a report that consists of header and detail, that to load them I use dataset and two datatables. I did a test project in which it worked perfectly but I did not have a session start. The project in which I am working has a login and when I wanted to test the report it gave me an error, which could not be connected to the database, something that did not happen in the test project. This is my code in the test project.

           Reportes.DtsListado dts = new Reportes.DtsListado();

        var dt1 = new Reportes.DtsListado.DtCabeceraDataTable();
        var dt2 = new Reportes.DtsListado.DtDetalleDataTable();

        var row1 = dt1.NewDtCabeceraRow(); = 1;
        row1.nombre = "Bar";

        var row2 = dt2.NewDtDetalleRow();
        row2.idEmpleado = 1;
        row2.Nombre = "Sof";
        row2.idEmpresa = 1;

        row2 = dt2.NewDtDetalleRow();
        row2.idEmpleado = 2;
        row2.Nombre = "Cyn";
        row2.idEmpresa = 1;


The problem is only when there is more than one datatable. With a single datatable it shows the report without problem. I am working on Visual studio 2015.

In the debugger it shows that the data arrives at the report source. error