Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Sep 2010
    Location
    New Jersey
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am new to Visual Studio and got the warning "object reference not set to an instance of an object" when I try to run a report that has a subreport. Anyone have any idea which direction I should go to solve this problem.
    Thanks
    CKnoll

  2. #2
    New Lounger
    Join Date
    Dec 2009
    Location
    Manchester, UK
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you may need to set the login info for the sub-report tables

    Each sub-report must have the server/DB security set in the same way as for the main report

    Scan each main report section for a sub-report object then set the options against that
    Chris

  3. #3
    New Lounger
    Join Date
    Sep 2010
    Location
    New Jersey
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Chris
    I am very new to Visual Studio, how do I do this?

  4. #4
    New Lounger
    Join Date
    Dec 2009
    Location
    Manchester, UK
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There's a good example at http://snippets.dzone.com/posts/show/4029

    In essence what is needed is that you have to tell the report where the data is and the security required to get at it.
    Unfortunately, this doesn't automatically cascade down to any embedded sub-reports, so you have to find them and apply the same parameters.
    That is, you iterate through the sections in the main report and hunt for sub-report objects then treat them as per the main report and apply the data & security.

    The reason for all this is so that the report is then genuinely portable - otherwise what you find is that the report is locked to the data location and security of the development machine & your end-users can't run it.
    Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •