Report with dataset doesn´t print nothing with two tables

Stimulsoft Reports.NET discussion
Post Reply
sdelgado
Posts: 2
Joined: Sat Sep 06, 2014 6:14 pm

Report with dataset doesn´t print nothing with two tables

Post 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()
Last edited by sdelgado on Tue Sep 09, 2014 2:55 pm, edited 1 time in total.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

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

Post 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.
Attachments
TableNaming.png
TableNaming.png (18.14 KiB) Viewed 1423 times
sdelgado
Posts: 2
Joined: Sat Sep 06, 2014 6:14 pm

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

Post by sdelgado »

Thank you Jan, that solved my problem.
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

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

Post by Andrew »

Hello,

That's great!

Thank you for letting us know about this.
Post Reply