Export WPF datagrid to PDF-file












-1















I'm writing an program in WPF that puts data from an mySQL-database into an datagrid.



The data that comes out of the database, is saved in an list of objects.
This list is the datasource for the datagrid.



Now i want to save this content to a PDF-file.



What's the best solution to do this?










share|improve this question



























    -1















    I'm writing an program in WPF that puts data from an mySQL-database into an datagrid.



    The data that comes out of the database, is saved in an list of objects.
    This list is the datasource for the datagrid.



    Now i want to save this content to a PDF-file.



    What's the best solution to do this?










    share|improve this question

























      -1












      -1








      -1








      I'm writing an program in WPF that puts data from an mySQL-database into an datagrid.



      The data that comes out of the database, is saved in an list of objects.
      This list is the datasource for the datagrid.



      Now i want to save this content to a PDF-file.



      What's the best solution to do this?










      share|improve this question














      I'm writing an program in WPF that puts data from an mySQL-database into an datagrid.



      The data that comes out of the database, is saved in an list of objects.
      This list is the datasource for the datagrid.



      Now i want to save this content to a PDF-file.



      What's the best solution to do this?







      c# wpf pdf datagrid save






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 21 '18 at 19:33









      DaveDave

      247




      247
























          1 Answer
          1






          active

          oldest

          votes


















          0














          The best solution depends heavily on your specific requirements. A few of the things you should think about when considering a solution are:




          1. How important is performance? If this is a server side task (probably not based on your info above) then you would really care about high performance to minimize load on your server.

          2. How much customization of the reports do you need?

          3. Do you need the report engine to format the data beyond what comes back from MySQL or the container object being used to transport the data? For example, currency, percentages, etc ...

          4. What is your budget? Do you have room for a paid solution?


          In general, there are a lot of solutions out there. Some of them will even take a standard DataTable or DataSet and generate the report from that. Typically though, with a solution like this you lose some level of customization over the report in exchange for the ease of implementation.



          I personally have used iTextSharp in the past. It is really easy to generate a table based on your tabular data and you maintain absolute control over the PDF document being generated. Unfortunately, iTextSharp appears to have moved more into the private sphere and isn't really practical for most uses due to their ridiculous pricing and requirements on the Community Edition.






          share|improve this answer
























          • Hi Shawn, thanks for the answer. This needs to work at the clientside. The only customization that's needed, is formatting as currency and adding a logo (picture). It may cost something.

            – Dave
            Nov 22 '18 at 12:00











          • If that’s the case I would go with something line IronPDF and generate your report using HTML. Pretty cheap one-time license fee and generating an HTML table for your data will be a piece of cake.

            – Shawn Lehner
            Nov 22 '18 at 16:05











          • Hi Shawn, thanks for the quick answers. This resolved my problem :)

            – Dave
            Nov 27 '18 at 13:02











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53419336%2fexport-wpf-datagrid-to-pdf-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          The best solution depends heavily on your specific requirements. A few of the things you should think about when considering a solution are:




          1. How important is performance? If this is a server side task (probably not based on your info above) then you would really care about high performance to minimize load on your server.

          2. How much customization of the reports do you need?

          3. Do you need the report engine to format the data beyond what comes back from MySQL or the container object being used to transport the data? For example, currency, percentages, etc ...

          4. What is your budget? Do you have room for a paid solution?


          In general, there are a lot of solutions out there. Some of them will even take a standard DataTable or DataSet and generate the report from that. Typically though, with a solution like this you lose some level of customization over the report in exchange for the ease of implementation.



          I personally have used iTextSharp in the past. It is really easy to generate a table based on your tabular data and you maintain absolute control over the PDF document being generated. Unfortunately, iTextSharp appears to have moved more into the private sphere and isn't really practical for most uses due to their ridiculous pricing and requirements on the Community Edition.






          share|improve this answer
























          • Hi Shawn, thanks for the answer. This needs to work at the clientside. The only customization that's needed, is formatting as currency and adding a logo (picture). It may cost something.

            – Dave
            Nov 22 '18 at 12:00











          • If that’s the case I would go with something line IronPDF and generate your report using HTML. Pretty cheap one-time license fee and generating an HTML table for your data will be a piece of cake.

            – Shawn Lehner
            Nov 22 '18 at 16:05











          • Hi Shawn, thanks for the quick answers. This resolved my problem :)

            – Dave
            Nov 27 '18 at 13:02
















          0














          The best solution depends heavily on your specific requirements. A few of the things you should think about when considering a solution are:




          1. How important is performance? If this is a server side task (probably not based on your info above) then you would really care about high performance to minimize load on your server.

          2. How much customization of the reports do you need?

          3. Do you need the report engine to format the data beyond what comes back from MySQL or the container object being used to transport the data? For example, currency, percentages, etc ...

          4. What is your budget? Do you have room for a paid solution?


          In general, there are a lot of solutions out there. Some of them will even take a standard DataTable or DataSet and generate the report from that. Typically though, with a solution like this you lose some level of customization over the report in exchange for the ease of implementation.



          I personally have used iTextSharp in the past. It is really easy to generate a table based on your tabular data and you maintain absolute control over the PDF document being generated. Unfortunately, iTextSharp appears to have moved more into the private sphere and isn't really practical for most uses due to their ridiculous pricing and requirements on the Community Edition.






          share|improve this answer
























          • Hi Shawn, thanks for the answer. This needs to work at the clientside. The only customization that's needed, is formatting as currency and adding a logo (picture). It may cost something.

            – Dave
            Nov 22 '18 at 12:00











          • If that’s the case I would go with something line IronPDF and generate your report using HTML. Pretty cheap one-time license fee and generating an HTML table for your data will be a piece of cake.

            – Shawn Lehner
            Nov 22 '18 at 16:05











          • Hi Shawn, thanks for the quick answers. This resolved my problem :)

            – Dave
            Nov 27 '18 at 13:02














          0












          0








          0







          The best solution depends heavily on your specific requirements. A few of the things you should think about when considering a solution are:




          1. How important is performance? If this is a server side task (probably not based on your info above) then you would really care about high performance to minimize load on your server.

          2. How much customization of the reports do you need?

          3. Do you need the report engine to format the data beyond what comes back from MySQL or the container object being used to transport the data? For example, currency, percentages, etc ...

          4. What is your budget? Do you have room for a paid solution?


          In general, there are a lot of solutions out there. Some of them will even take a standard DataTable or DataSet and generate the report from that. Typically though, with a solution like this you lose some level of customization over the report in exchange for the ease of implementation.



          I personally have used iTextSharp in the past. It is really easy to generate a table based on your tabular data and you maintain absolute control over the PDF document being generated. Unfortunately, iTextSharp appears to have moved more into the private sphere and isn't really practical for most uses due to their ridiculous pricing and requirements on the Community Edition.






          share|improve this answer













          The best solution depends heavily on your specific requirements. A few of the things you should think about when considering a solution are:




          1. How important is performance? If this is a server side task (probably not based on your info above) then you would really care about high performance to minimize load on your server.

          2. How much customization of the reports do you need?

          3. Do you need the report engine to format the data beyond what comes back from MySQL or the container object being used to transport the data? For example, currency, percentages, etc ...

          4. What is your budget? Do you have room for a paid solution?


          In general, there are a lot of solutions out there. Some of them will even take a standard DataTable or DataSet and generate the report from that. Typically though, with a solution like this you lose some level of customization over the report in exchange for the ease of implementation.



          I personally have used iTextSharp in the past. It is really easy to generate a table based on your tabular data and you maintain absolute control over the PDF document being generated. Unfortunately, iTextSharp appears to have moved more into the private sphere and isn't really practical for most uses due to their ridiculous pricing and requirements on the Community Edition.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 21 '18 at 19:42









          Shawn LehnerShawn Lehner

          1,260712




          1,260712













          • Hi Shawn, thanks for the answer. This needs to work at the clientside. The only customization that's needed, is formatting as currency and adding a logo (picture). It may cost something.

            – Dave
            Nov 22 '18 at 12:00











          • If that’s the case I would go with something line IronPDF and generate your report using HTML. Pretty cheap one-time license fee and generating an HTML table for your data will be a piece of cake.

            – Shawn Lehner
            Nov 22 '18 at 16:05











          • Hi Shawn, thanks for the quick answers. This resolved my problem :)

            – Dave
            Nov 27 '18 at 13:02



















          • Hi Shawn, thanks for the answer. This needs to work at the clientside. The only customization that's needed, is formatting as currency and adding a logo (picture). It may cost something.

            – Dave
            Nov 22 '18 at 12:00











          • If that’s the case I would go with something line IronPDF and generate your report using HTML. Pretty cheap one-time license fee and generating an HTML table for your data will be a piece of cake.

            – Shawn Lehner
            Nov 22 '18 at 16:05











          • Hi Shawn, thanks for the quick answers. This resolved my problem :)

            – Dave
            Nov 27 '18 at 13:02

















          Hi Shawn, thanks for the answer. This needs to work at the clientside. The only customization that's needed, is formatting as currency and adding a logo (picture). It may cost something.

          – Dave
          Nov 22 '18 at 12:00





          Hi Shawn, thanks for the answer. This needs to work at the clientside. The only customization that's needed, is formatting as currency and adding a logo (picture). It may cost something.

          – Dave
          Nov 22 '18 at 12:00













          If that’s the case I would go with something line IronPDF and generate your report using HTML. Pretty cheap one-time license fee and generating an HTML table for your data will be a piece of cake.

          – Shawn Lehner
          Nov 22 '18 at 16:05





          If that’s the case I would go with something line IronPDF and generate your report using HTML. Pretty cheap one-time license fee and generating an HTML table for your data will be a piece of cake.

          – Shawn Lehner
          Nov 22 '18 at 16:05













          Hi Shawn, thanks for the quick answers. This resolved my problem :)

          – Dave
          Nov 27 '18 at 13:02





          Hi Shawn, thanks for the quick answers. This resolved my problem :)

          – Dave
          Nov 27 '18 at 13:02




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53419336%2fexport-wpf-datagrid-to-pdf-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

          Alcedinidae

          RAC Tourist Trophy