ReportViewer - ReportParameter - namespace WinForms vs WebForms

I have a web application and a winforms application - both of them display reports through the standard ReportViewer controls for web / winforms. (Using VS2010 / .Net 4.0 battle).

I also have a shared library that returns ReportParameter objects for generated reports. I ran into a small problem with ReportParameter return:

Winforms ReportViewer uses a ReportParameter from the Microsoft.Reporting.WinForms namespace. WebForms ReportViewer uses ReportParameter from the Microsoft.Reporting.WebForms namespace.

Is there a generic ReportParameter class that I can use to share report parameters from web vs winforms? Or is there a built-in utility for easy translation between them?

+3
source share
1 answer

I know that it is old, but today I had the same question, so I decided to give an answer.

I could not find anything specific, so I pulled out the old reflector ... and I decided to use Microsoft.ReportViewer.WebForms because it was referencing the subsmb assmblies referenced by Microsoft.ReportViewer.WinForms.

In particular...

WebForms:

  • Microsoft.ReportViewer.Common
  • mscorlib
  • System
  • System.Configuration (without links to WinForms)
  • System.Data li>
  • System.Drawing
  • System.web
  • System.Web.Services
  • System.xml

Winforms:

  • Microsoft.ReportViewer.Common
  • mscorlib
  • System
  • System.Data li>
  • System.Drawing
  • System.web
  • System.Web.Services
  • System.Windows.Forms( WebForms)
  • System.XML

System.Web , System.Windows.Forms impo.

, ReportParameter , . , - Mapping .

+2

Source: https://habr.com/ru/post/1776741/


All Articles