-
Dec 2nd, 2016, 04:47 AM
#1
Thread Starter
Frenzied Member
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
-
Dec 2nd, 2016, 04:57 AM
#2
Thread Starter
Frenzied Member
Re: RDLC Report now show all records
EDIT: I mean report NOT show all records (heading)
-
Dec 2nd, 2016, 05:04 AM
#3
Thread Starter
Frenzied Member
Re: RDLC Report now show all records
Also I think problem is with query. When Execute query it not display records with empty fields
-
Dec 2nd, 2016, 08:36 AM
#4
Re: RDLC Report now show all records
Originally Posted by schoemr
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.
-
Dec 2nd, 2016, 11:48 AM
#5
Thread Starter
Frenzied Member
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
-
Dec 2nd, 2016, 12:02 PM
#6
Thread Starter
Frenzied Member
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
-
Dec 2nd, 2016, 04:28 PM
#7
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|