You will probably want to first generate a report using the data that you also display in the gridview. If you use Crystal Reports to generate the report, there is an option to export the report as a PDF. I suggest you start by researching that. (there are other report generators you could look at too).
There are many articles on Code Project that can help you.
Here[
^] is a link to the article search for "Crystal Reports".
Here[
^] is one article I found that discusses how to export a Crystal Report to a PDF without using a Report Viewer.
Hope this helps.