Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have Convert the RDLC FILE TO JPEG FORMAT AND THE FILE Format is ALSO IN JPEG FORMAT.I can see it in Pc(Windows10 os) . BUT I Send it throw whatsup web the image is not displayed and it shows only file format not image is displayed Full blank. my convertion code is also updated how to solve it and what mistake i did ?

What I have tried:

Dim outputFormat As String = "JPEG" '' TryCast(sender, Button).Text.ToLower()
                Dim renderedBytes As Byte()
                If outputFormat = "JPEG" Then
                    renderedBytes = RV.LocalReport.Render(reportType, "<DeviceInfo><OutputFormat>JPG</OutputFormat></DeviceInfo>")
                Else
                    renderedBytes = RV.LocalReport.Render(reportType, "<DeviceInfo><OutputFormat>PNG</OutputFormat></DeviceInfo>")
                End If

                Using Stream As New FileStream(strfilepath & "\" & "JPG" & "\" & strfilename & ".JPEG", FileMode.Create)
                    Stream.Write(renderedBytes, 0, renderedBytes.Length)
                End Using
Posted
Updated 9-Jun-18 3:58am
Comments
Richard MacCutchan 9-Jun-18 10:47am    
This may be because the writer interprets line end characters and rplaces them with \r\n sequences. Try it with a BinaryWriter.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900