Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7639097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:19:56+00:00 2026-05-31T08:19:56+00:00

If I had a class defined with this attributes public class GestionesDataSet { public

  • 0

If I had a class defined with this attributes

public class GestionesDataSet
{
    public DateTime GestionInicio { get; set; }
    public DateTime GestionFin { get; set; }
    public Nullable<DateTime> LlamadaInicio { get; set; }
    public Nullable<DateTime> LlamadaFin { get; set; }
    public string Login { get; set; }
    public string Tipificacion { get; set; }
    public List<CamposGestion> campoValor { get; set; } 
}   

And the class called CamposGestion is defined like this

public class CamposGestion
{
    public string Nombre { get; set; }
    public string Valor { get; set; }
}

How can I Defined a report where I can use the field that refers to the list of the other elements?

I tried to used one dataset where I can set this linq as object data source

     var gestiones = (from G in db.Gestion
                         where
                         G.IDTipificacion == idTipificacion
                         && (from T in db.Tipificacion where T.IdTipificacion == G.IDTipificacion select T.Servicio.IDServicio).AsEnumerable().Contains(idServicio)
                         select G).AsEnumerable().Select(xx => new GestionesDataSet()
                         {
                             GestionInicio = xx.HoraInicio,
                             GestionFin = xx.HoraFin,
                             @Tipificacion = ((from T in db.Tipificacion select T).Where(x => x.IdTipificacion == xx.IDTipificacion).Count() > 0 ?
                                              (from T in db.Tipificacion where T.IdTipificacion == xx.IDTipificacion select T.Nombre).FirstOrDefault() : ""),
                             LlamadaInicio = xx.Llamada.HoraInicio,
                             LlamadaFin = xx.Llamada.HoraFin,
                             Login = xx.Llamada.Sesion.Usuario.Nombre,
                             campoValor = xx.CampoValor.Select(aux  => new CamposGestion() { 
                                                Nombre = aux.ConfiguracionCampo.Campo.Nombre,
                                                Valor = aux.Valor
                                        }).ToList()
                         }).ToList();

But what I want to see the report the field that contains the List show’s an error like this

enter image description here

Any help would be appreciate.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T08:19:57+00:00Added an answer on May 31, 2026 at 8:19 am

    I would rewrite the query like this:

    var gestiones = 
        from xx in db.Gestion
        where
        xx.IDTipificacion == idTipificacion
        && (from T in db.Tipificacion 
            where T.IdTipificacion == xx.IDTipificacion select T.Servicio.IDServicio).AsEnumerable().Contains(idServicio)
        select new GestionesDataSet()
        {
            GestionInicio = xx.HoraInicio,
            GestionFin = xx.HoraFin,
            @Tipificacion = (from T in db.Tipificacion where T.IdTipificacion == xx.IDTipificacion select T.Nombre).FirstOrDefault() ?? "",
            LlamadaInicio = xx.Llamada.HoraInicio,
            LlamadaFin = xx.Llamada.HoraFin,
            Login = xx.Llamada.Sesion.Usuario.Nombre,
            campoValor = xx.CampoValor.Select(aux => new CamposGestion()
            {
                Nombre = aux.ConfiguracionCampo.Campo.Nombre,
                Valor = aux.Valor
            }).ToList()
        }).ToList();
    

    When you call a projection (Select) after the AsEnumerable was called, LINQ will try to get the navigation objects first from the already loaded ones. If no object is loaded, then will execute a select SQL command for each navigation property used in the projection. If the [DeferredLoadingEnabled][1] property is set to false it won’t execute any query and if no object is loaded already (they can be loaded “apriori” with [LoadWith][2]) it will give a NullReferenceException. So, in some situations, calling AsEnumerable might hurt performance. All these things are not valid when AsEnumerable is used in the where parts.

    For giving a default value, when no Tipificacion doesn’t exist, it can be used the null-coalescing operator, from C#, instead of using the Count method, which creates an extra lookup on the the table.

    Now.. to your problem.

    SSRS doesn’t support binding to a list of items. The column campoValor tries to bind to a list of objects, which is not allowed. So either you create a subreport (there is a section which describes this) or you flatten your data (having the all the properties on one single object) and then use the HideDuplicates property

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had View strongly type of my class Usario Defined like this public partial
Had a headace trying to get this to work, im trying to set up
If I had generic class: public class GenericTest<T> : IGenericTest {...} and I had
In my application, I had a servlet which was defined like this in the
ImproperlyConfigured: Middleware module report does not define a ReportMiddleware class But I had defined
The story: I had class User and class Organization: User. I did not use
I had a class with some common error handling code, and I wanted to
Previously, I had a class that wrapped an internal System.Collections.Generic.List<Item> (where Item is a
I have an application that uses CoreData. I previously had a class named Marker
I've messed with Access a little bit in the past, had one class on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.