This is a migrated thread and some comments may be shown as answers.

RenderReport TIFF fails when only one page & TiffCompression = ccitt4

1 Answer 83 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 17 Jan 2014, 05:10 PM

Can someone please tell me what is incorrect with the following code. It only fails when the TIFF is one page.

Public Sub CreateProcessNotesTIFF()
    Dim instanceReportSource As New Telerik.Reporting.InstanceReportSource()
    instanceReportSource.ReportDocument = New ProcessNotes
    instanceReportSource.Parameters.Add(New Telerik.Reporting.Parameter("ProcNo", _procNo))
    instanceReportSource.Parameters.Add(New Telerik.Reporting.Parameter("ApplicantName", _applicantName))
    Dim reportProcessor As New Telerik.Reporting.Processing.ReportProcessor()
    'set any deviceInfo settings if necessary
    Dim deviceInfo As New System.Collections.Hashtable()
    deviceInfo("OutputFormat") = "TIFF"
    deviceInfo("TiffCompression") = "ccitt4"
    deviceInfo("DpiX") = 300
    deviceInfo("DpiY") = 300
    'deviceInfo("DpiX") = 120
    'deviceInfo("DpiY") = 120
    'Dim result As Telerik.Reporting.Processing.RenderingResult = reportProcessor.RenderReport("PDF", instanceReportSource, deviceInfo)
    Dim result As Telerik.Reporting.Processing.RenderingResult = reportProcessor.RenderReport("IMAGE", instanceReportSource, deviceInfo)
    Dim fileName As String = result.DocumentName + "." + result.Extension
    'Dim path As String = System.IO.Path.GetTempPath()
    Dim path As String = System.IO.Directory.GetCurrentDirectory()
    Dim filePath As String = System.IO.Path.Combine(path, fileName)
    Using fs As New System.IO.FileStream(filePath, System.IO.FileMode.Create)
        fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length)
    End Using
End Sub
The following code has TiffCompression commented and both single and multiple page TIFFs are exported

Public Sub CreateProcessNotesTIFF()
    Dim instanceReportSource As New Telerik.Reporting.InstanceReportSource()
    instanceReportSource.ReportDocument = New ProcessNotes
    instanceReportSource.Parameters.Add(New Telerik.Reporting.Parameter("ProcNo", _procNo))
    instanceReportSource.Parameters.Add(New Telerik.Reporting.Parameter("ApplicantName", _applicantName))
    Dim reportProcessor As New Telerik.Reporting.Processing.ReportProcessor()
    'set any deviceInfo settings if necessary
    Dim deviceInfo As New System.Collections.Hashtable()
    deviceInfo("OutputFormat") = "TIFF"
    'deviceInfo("TiffCompression") = "ccitt4"
    deviceInfo("DpiX") = 300
    deviceInfo("DpiY") = 300
    'deviceInfo("DpiX") = 120
    'deviceInfo("DpiY") = 120
    'Dim result As Telerik.Reporting.Processing.RenderingResult = reportProcessor.RenderReport("PDF", instanceReportSource, deviceInfo)
    Dim result As Telerik.Reporting.Processing.RenderingResult = reportProcessor.RenderReport("IMAGE", instanceReportSource, deviceInfo)
    Dim fileName As String = result.DocumentName + "." + result.Extension
    'Dim path As String = System.IO.Path.GetTempPath()
    Dim path As String = System.IO.Directory.GetCurrentDirectory()
    Dim filePath As String = System.IO.Path.Combine(path, fileName)
    Using fs As New System.IO.FileStream(filePath, System.IO.FileMode.Create)
        fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length)
    End Using
End Sub




1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 22 Jan 2014, 04:00 PM
Hello John,

Thank you for the provided feedback.

Your code seems correct and we also managed to reproduce the described issue at our end.
The issue is now logged in our system for improvement and it will be fixed in a subsequent version of Telerik Reporting.

We are sorry for the caused inconvenience.

Your Telerik Points are updated to thank you for pointing this problem to our attention.

Regards,
Nasko
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

Tags
General Discussions
Asked by
John
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or