There could be a few things that would cause your Dyson to have no suction. I will give you detailed step by step instructions along with pictures on how you can diagnose this.
Possible Problem #1. The first problem is extremely common. In fact, we probably see between 2-3 of these problems every week. It mostly happens after people take the bottom plate off the vacuum in order to clean the roller brush. What happens is when they reinstall the bottom plate, they put it on on incorrectly. It's actually very easy to do. When the bottom plate (soleplate) is installed wrong, there will be a gap between the bottom plate, and the agitator housing, or the purple tray the roller brush sits in. This will cause the soleplate to be a few inches higher off the ground then it should be, preventing the brushes from even hitting the carpet. This makes it seem to the user that vacuum has lost suction power because without the brushes hitting the carpet, the machine will not pick up very well on floors, but when they use the attachment hose there's plenty of suction power.
Here's a picture of the WRONG way to install the bottom plate. Notice the gap in between the two housings:
Here's another picture, that is the RIGHT way to install the soleplate:
I would say probably 6 times out of 10 this is the problem with the customers machine. If you checked the soleplate and it is installed correctly, move on to the second possible problem.
Possible Problem # 2. Turn the vacuum cleaner upside down so the brush roller is facing upwards. I found the easiest way to work on it is to put it on a counter top or work bench. On the left hand side behind the roller brush you should see a flexible transparent hose that goes from the motor to the agitator housing. This hose actually has a lot of strain on it when the vacuum cleaner is in the reclined position. When the first few series of Dyson DC07 models came out, they didn't make this hose long enough, so when the vacuum was in the reclined position, it would put too much stress on the hose, and cause the hose to actually crack, usually right where the end of the hose that goes into the agitator housing. Examine your hose and see if you have any visible cracks in this hose. If you need to you may just remove the entire hose assembly by pulling on it. It will easily come right out of the machine so you can inspect it better. Here's a picture of where the hose usually cracks:
This would also explain why the vacuum works fine when using the attachments, but not on the floors. The attachment hose uses a different suction channel, and when the machine is in the upright position, no suction goes through this hose. If you do find a crack in this hose, the this hose needs to be replaced. Here's a direct link to that hose on our GoVacuum website. Dyson DC-07 & DC-14 Upright Replacement Internal Hose Part # 904219
Possible Problem #3. I would suspect that this may not be the problem, but if neither of the solutions above worked, then try this one. Dyson's in general are prone to clogging. There are a few clog ports throughout the vacuum cleaner that were added there due to Dyson prototypes becoming clogged at these points. Here are pictures of how and where to check for these clogs. Simply remove the suction port covers at both of these locations: