Results 1 to 2 of 2

Thread: VS 2022 - PowerPacks - Printing - Printform & ReportViewer

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2012
    Posts
    245

    VS 2022 - PowerPacks - Printing - Printform & ReportViewer

    Hi,

    I've been asked to review a 6/7 year old VB.net project. Not sure in which version of Visual Studio it was created, but I guess 2013.

    When opening the project in VS 2022, it gives me a series of errors:

    * Some related to the use of PowerPacks.Printing.Printform
    * Some related to use of ReportViewer

    Based on some Google searching, I have the feeling that both components/add-ins/extensions/... are no longer available.

    Does anyone have a suggestion on how to update the old code to make it work in VS 2022?

    Thanks in advance!

    Regards,
    Erwin

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,347

    Re: VS 2022 - PowerPacks - Printing - Printform & ReportViewer

    I don't think that you can get an official download from Microsoft any more but, if you search online, you should be able to find third-party download links. I cannot vouch for any of them though. There is also this NuGet package that may help.

    That said, the PrintForm component in the PowerPacks was always a bit of a hack. You really shouldn't be printing a picture of a form in the vast majority of cases. You should generally use a PrintDocument to print just the data you need. If you really want to same output as the PrintForm component then you can always do as it does internally, i.e. call DrawToBitmap on the form to create the picture and then use DrawImage with a PrintDocument.

    As for the ReportViewer, assuming that it is the standard Microsoft SSRS control, it is still available but you may have trouble getting the version used in that old project, depending on what it is. If you do some searching then you should be able to find a more recent version, which would probably be v15. If I'm not mistaken, you need to install something on your machine first, then add the appropriate NuGet package to your project. Just be aware that there were at least a couple of versions of the NuGet package that had a bug that prevented the control displaying. If they haven't fixed that, you may need to go back two or three versions to get one that works correctly.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width