Using Collections as Datasets for ReportViewer? good place to get information? RRS feed

  • Question

  • I have several classes that are compiled in Dll's that I then use in Dictionary collections in my app. How would I go about using them to design a report with the Reportviewer. Here is a basic layout of the classes.

    Class A:
      properties 1-10

    Class B:
      instances of Class A 
      Dictionary(of String, Class A)

    Class C:
      Properties 1-2 both Boolean properties

    Class D:
     Properties 1-2 both Boolean Properties

    Class E:
    Properties 1-10

    Class F:
    properties 1-10
    Dictionary(of String(Same Key as Dictionary in Class B), Class C)
    Dictionary(of String(Same key as Dictionary of Class E), Class D)

    In the App I have a Dictionary collection of Class E, that is added at runtime, as well as the Dictionary collection of Class F.

    How do I set it up in datasets that can be used by the report template? I am not sure If I am making myself clear as to what I am trying to accomplish, but if you can at least point me in the right direction. My searching has been coming up empty so, not sure where to look from here.

    I would like to be able to print a report using the Dictionary of Class F, and having it use the correct information from the Class B or Class E based on the Flags in that Collection.

    Hopefully i have not confused anyone to much as to what I am trying to do. Thanks for any help,


    • Moved by Riquel_DongModerator Tuesday, August 19, 2008 7:17 AM the reportviewer control issue (Moved from Visual Basic Language to Visual Studio Report Controls)
    Friday, August 15, 2008 8:14 PM

All replies

  • This walk through on MSDN is a good starting point:
    Wednesday, August 20, 2008 8:43 PM
  • Thanks I will take another look through there and see if it makes any more sense.

    Currently I am taking the Collection and converting each nested collection into a List(of T) and setting that as the DataSource for each Table I have on the report. Doing it this way though I  only can only pass one main collection item at a time. Which is ok at the moment. But would like to be able to print all the collection at one time.

    Let me know if you need any further information on how the classes are set up.

    Tuesday, August 26, 2008 10:00 PM
  •  That is the same questions I asked 3 days ago - "what is the proper syntax for Fields collection when addressing hierarchical datasets in the report". So far no answer. I thought of doing the same thing you do, i.e flattening hierarchies, but the ugliness of it so far stopped me from doing that.

    I wonder if this forum is monitored by Msoft people... Very frustrating...

    Thursday, August 28, 2008 12:29 AM