Calculate food company sales for the year
Your code looks good, I have some minor suggestions:

Separate getting the data and outputting it

I would prefer reading something like this:

for product_info in product_informations(productfile):
    # Handle out-put of product_info


To separate concerns more clearly.

Use _ to signify un-used values

for category, brand, sales_lastyear, sales_thisyear in rows:
    categorycounts[category] += int(sales_thisyear)


The values brand and sales_lastyear are not used, so you do not need to give them a name:

for category, _, _, sales_thisyear in rows:
    categorycounts[category] += int(sales_thisyear)


Be explicit with file.write

If you want to write to a file, print will work just fine, but I suggest being the most explicit and using file.write.

This also helps separation of concerns because it forces formatting to be handled separately. (See str.format in the next paragraph)

Do not repeat yourself

    print("Total sales for the company in 2015:", totalsales, file=reportfile)
    print("Total sales for the company in 2015:", totalsales)


Only the output destination changes.

You can either save the message in a variable:

sales_info = "Total sales for the company in 2015:{}".format(totalsales)

reportfile.write(sales_info)
print(sales_info)


Or use a loop:

for destination in (sys.stdout, reportfile):
    print("Total sales for the company in 2015:{}".format(totalsales), file=destination)


.format is also preferred over str + str and print(x, y) for its extensibility and readibility.

Indent in generator expressions

It is weird to see a for at the start of a line as part of a generator comprehension, because it looks like a loop statement, some indenting will clarify that it is part of a generator comprehension:

rows = (line.rstrip().split(',')
            for line in productfile if line.rstrip())