Wisej-examples-vb/reportviewer (3.2)

0
0

Hi,

we used the the old 2.5 reportviewer sample in one of our projects. After updating to visual studio 2022 with wisej.NET 3.2 (3.2.7) i’m not able to open 2.5. projects any more – so I tried the reportviewersample again (which claims to be 3.2 but refers to 2.5 packages?) and experienced the same behaviour (on 2 Win10 computers) when trying to open a designer window: “Der Wert darf nicht NULL sein. Parametername: instance “. I found the solution  (install the Wisej-2-VisualStudioDesigner NuGet package) – but this just chrashes visual studio on both of my machines. (open window with progress bar just idles forever). Replacing the wisej 2 nuget packages with wisej 3 enables the designer to open but led to several other errors – and I dont’t think that’s the intended way. So i tried to move the files in a new wisej3 project – an now – finally – the question: The (designer) code of PDFReportViewer says:
Private Sub ProcessRequest(ByVal context As HttpContext) Implements IWisejHandler.ProcessRequest
Dim request = context.Request
Dim response = context.Response
Dim export = request(“export”)

‘ preview
If Equals(export, Nothing) Then
Dim bytes = _report.Render(“pdf”)
Dim filename = Path.GetFileNameWithoutExtension(_report.ReportPath)
response.Expires = -1
response.ContentType = $”application/pdf”
response.AppendHeader(“Access-Control-Allow-Origin”, “*”)
response.AddHeader(“Content-Disposition”, $”inline; filename=””{filename}.pdf”””)
response.AddHeader(“Content-Length”, bytes.Length.ToString())
response.OutputStream.Write(bytes, 0, bytes.Length)

But following the documentation https://docs.wisej.com/api/wisej.core/general/wisej.core.httpresponse misses the methods .Expires and .AddHeader – so what do I not see to get rid of the error messages “no member of …”

Regards

  • You must to post comments
0
0

Hi Frank,

thank you. Worked as you described.  (btw: The updated files are not part of the 3.2 archive zip file)

  • The reporting sample requieres a net4.8 environment and is not compatible with net.core due to system.web, right?
  • It requieres an old version of microsoft.sqlserver.types (12.0.5) – the actual version is not working.

Leads to the question if there is (by chance) a *net.core* report viewer example .. 😉

Regards, Olaf

 

 

  • You must to post comments
0
0

Hi Olaf,

sorry that was my fault.
It’s updated to Wisej.NET 3.2. now in GitHub. Please pull again and you should get the latest version.

Best regards
Frank

  • You must to post comments
0
0

Hello Frank, do I have a general misunderstanding here? The Github 3.2 example of the ReportingViever refers to the 2 library – I thought the characteristic of a 3.x project IS the use of Wisej-3?

Regards, Olaf

  • You must to post comments
0
0

Hi Olaf,

did you check out on GitHub? There should be a version of the ReportViewer sample for 3.2
Just make sure to select the right branch.

https://github.com/iceteagroup/wisej-examples-vb/tree/3.2/ReportViewer

Best regards
Frank

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.