Results 1 to 7 of 7

Thread: RDLC Report now show all records

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2016
    Posts
    1,415

    RDLC Report now show all records

    Hi,

    I not even know how to ask.. Ill try.. I have rdlc report getting data from dataset with one-to-many parent and child records.

    e.g. CarManufacturer---->CarMake----->Model

    Now if I draw report it currently shows only records where ALL THREE items is present. But say in one of the records a 'model' is null then the whole record is not show in report.. This not what I want... I want to see if there empty fields too...

    - Carmanufacturer will always have data
    - Carmake can sometimes be null
    - Model can sometimes be null

    Can someone please help me?

    Thanks,
    M

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2016
    Posts
    1,415

    Re: RDLC Report now show all records

    EDIT: I mean report NOT show all records (heading)

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2016
    Posts
    1,415

    Re: RDLC Report now show all records

    Also I think problem is with query. When Execute query it not display records with empty fields

  4. #4
    Frenzied Member
    Join Date
    Dec 2014
    Location
    VB6 dinosaur land
    Posts
    1,191

    Re: RDLC Report now show all records

    Quote Originally Posted by schoemr View Post
    Also I think problem is with query. When Execute query it not display records with empty fields
    Well, you would be correct, but the query must be in invisible text because I can't see it anywhere and suspect others can't either.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2016
    Posts
    1,415

    Re: RDLC Report now show all records

    Hi topshot

    Ok please see here:

    This is tables:

    Attachment 142969

    This is code:

    Code:
    SELECT        Manufacturer.ManufacturerID, Manufacturer.Manufacturer, CarMake.CarMakeID, CarMake.[Car Make], Model.CarModelID, Model.[Car Model]
    FROM            Manufacturer INNER JOIN
                             CarMake ON Manufacturer.ManufacturerID = CarMake.ManufacturerID INNER JOIN
                             Model ON CarMake.CarMakeID = Model.CarMakeID
    WHERE        (Manufacturer.ManufacturerID = @ManufacturerID)
    See I type ManufacturerID manually in query... (I want)

    And this is result.

    Attachment 142971

    But now I add a carmake but NO model:

    Attachment 142973

    Still same result because I not enter a model too...

    Only when add model too i see result. (below) This not what i want. I want all records for manufacturer even if model is empty..

    Attachment 142975

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2016
    Posts
    1,415

    Re: RDLC Report now show all records

    I think solution is join must change to LEFT OUTER JOIN. Then all record is show


    [CODE]
    Code:
    SELECTManufacturer.ManufacturerID, Manufacturer.Manufacturer, CarMake.CarMakeID, CarMake.[Car Make], Model.CarModelID, Model.[Car Model]
    
    FROM            Manufacturer LEFT OUTER JOIN CarMake ON Manufacturer.ManufacturerID = CarMake.ManufacturerID LEFT OUTER JOIN Model ON CarMake.CarMakeID = Model.CarMakeID
    WHERE        (Manufacturer.ManufacturerID = @ManufacturerID)


    Attachment 142977

  7. #7
    Frenzied Member
    Join Date
    Dec 2014
    Location
    VB6 dinosaur land
    Posts
    1,191

    Re: RDLC Report now show all records

    So you resolved it? I know there should have been at least one outer join so I would think you did. Time to go so I didn't study your tables and query.

Posting Permissions

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



Click Here to Expand Forum to Full Width