Page 1 of 1

Report with dataset doesn´t print nothing with two tables

Posted: Mon Sep 08, 2014 3:58 pm
by sdelgado
Hi, I have a problem. I´m sending a dataset with two tables to my report, but when my report is print show a empty report, and when I send my dataset whith just one table my databands are printed whith the data of my dataset with just one table.

This is my code

Code: Select all

Dim reporte As New StiReport
        reporte.Load(archivo)
        reporte.Compile()

        reporte("urlImagenNave") = Tools.Controles.ObtenerLogoNave(cmbNave.SelectedValue)
        reporte("nombreNave") = cmbNave.Text
        reporte("NombreReporte") = "SAY: RESUMEN_UBICACION_ICI.mrt"
        reporte("Usuario") = Entidades.SesionUsuario.UsuarioSesion.PUserUsername.ToString
        reporte("Operador") = NombreOperador
        reporte("Fecha de Ejecucion") = Fecha
        reporte("InventarioCiclicoNombre") = Desccripcion
        reporte("IdInventario") = IdInventario.ToString
        reporte("TotalPares") = TotalPares
        reporte("inv_n") = "*" + IdInventario.ToString + "*"
        reporte("Inventario_n") = "no. " + IdInventario.ToString
        reporte.Dictionary.Clear()
        reporte.RegData(dsInventario.DataSetName, dsInventario)
        reporte.Dictionary.Synchronize()

        reporte.Show()

Re: Report with dataset doesn´t print nothig with two tables

Posted: Mon Sep 08, 2014 4:34 pm
by Jan
Hello,

You code looks good. I think problem in table naming in report. Usually if you bind to your report only one table report engine skip many table naming rules. But if you bind more then one table report engine use more complex rules. Please check NameInSource property of the data sources in report designer. They should be in following format:

Code: Select all

NameOfDataSet.NameOfTableInDataSet
Please check attached image.

Thank you.

Re: Report with dataset doesn´t print nothig with two tables

Posted: Tue Sep 09, 2014 2:53 pm
by sdelgado
Thank you Jan, that solved my problem.

Re: Report with dataset doesn´t print nothing with two table

Posted: Tue Sep 09, 2014 5:32 pm
by Andrew
Hello,

That's great!

Thank you for letting us know about this.