Click here to Skip to main content
15,886,873 members
Home / Discussions / C#
   

C#

 
QuestionCrystal Reports is generating very poor HTML output Pin
PhilMcGahan28-Feb-24 9:49
PhilMcGahan28-Feb-24 9:49 
AnswerRe: Crystal Reports is generating very poor HTML output Pin
jschell28-Feb-24 12:30
jschell28-Feb-24 12:30 
GeneralRe: Crystal Reports is generating very poor HTML output Pin
PhilMcGahan29-Feb-24 2:32
PhilMcGahan29-Feb-24 2:32 
GeneralRe: Crystal Reports is generating very poor HTML output Pin
jschell29-Feb-24 12:21
jschell29-Feb-24 12:21 
AnswerRe: Crystal Reports is generating very poor HTML output Pin
PhilMcGahan1-Mar-24 2:24
PhilMcGahan1-Mar-24 2:24 
GeneralRe: Crystal Reports is generating very poor HTML output Pin
Richard Andrew x641-Mar-24 5:36
professionalRichard Andrew x641-Mar-24 5:36 
RantRe: Crystal Reports is generating very poor HTML output Pin
Richard Deeming3-Mar-24 21:48
mveRichard Deeming3-Mar-24 21:48 
QuestionSave an SSRS Report in html format. Pin
PhilMcGahan28-Feb-24 9:18
PhilMcGahan28-Feb-24 9:18 
The code below will load an rdl report from a datasource and save it as PDF. But only PDF.
If I choose any other format it errors with
System.ArgumentOutOfRangeException
HResult=0x80131502
Message=Specified argument was out of the range of valid values.
Parameter name: format
Source=Microsoft.ReportViewer.WebForms
...
at Microsoft.Reporting.WebForms.Report.Render(String format, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]&

--- I would welcome a suggestion. Code as follows
Private Sub SaveReportAsHtml(rdcFile As String, outputfolderRoot As String)
'rdcFile = = "Report001ByPhil"
'outputfolderRoot = = "C:\temp"
Dim localReport As New LocalReport()
localReport.ReportPath = rdcFile

Dim ds As DataSet = FillADataSetWithSampleData()
Dim reportDataSource As New ReportDataSource("DataSet1", ds.Tables("table1"))
localReport.DataSources.Add(reportDataSource)

Dim mimeType As String
Dim encoding As String
Dim extension As String
Dim streamIds() As String
Dim warnings() As Microsoft.Reporting.WebForms.Warning

Dim outputFormat As String = "MHTML" 'does not work
outputFormat = "HTML3.2" 'does not work
outputFormat = "HTML4.0" 'does not work
outputFormat = "HTMLOWC" 'does not work
outputFormat = "PDF" 'works

Dim bytes As Byte() = localReport.Render(outputFormat, Nothing, mimeType, encoding, extension, streamIds, warnings)

Dim outputPath As String = Path.Combine(outputfolderRoot, "SSRS_output")
outputPath = outputPath + "." + outputFormat
DeleteFile(outputPath)
Using fs As New FileStream(outputPath, FileMode.Create)
fs.Write(bytes, 0, bytes.Length)
End Using
End Sub
AnswerRe: Save an SSRS Report in html format. Pin
jschell28-Feb-24 12:37
jschell28-Feb-24 12:37 
GeneralRe: Save an SSRS Report in html format. Pin
PhilMcGahan29-Feb-24 2:44
PhilMcGahan29-Feb-24 2:44 
AnswerRe: Save an SSRS Report in html format. Pin
Richard Deeming28-Feb-24 21:12
mveRichard Deeming28-Feb-24 21:12 
GeneralRe: Save an SSRS Report in html format. Pin
PhilMcGahan29-Feb-24 2:44
PhilMcGahan29-Feb-24 2:44 
QuestionSecurity Considerations of Markdown in an Blazor WASM Pin
HobbyProggy26-Feb-24 19:41
professionalHobbyProggy26-Feb-24 19:41 
QuestionToggle HDR mode in C#? Pin
MrCrane19-Feb-24 11:53
MrCrane19-Feb-24 11:53 
AnswerRe: Toggle HDR mode in C#? Pin
OriginalGriff19-Feb-24 20:12
mveOriginalGriff19-Feb-24 20:12 
GeneralRe: Toggle HDR mode in C#? Pin
MrCrane22-Feb-24 7:35
MrCrane22-Feb-24 7:35 
AnswerRe: Toggle HDR mode in C#? Pin
Ron Nicholson20-Feb-24 1:33
professionalRon Nicholson20-Feb-24 1:33 
QuestionNuget Dependency Problem (NServiceBus) Pin
jochance14-Feb-24 15:25
jochance14-Feb-24 15:25 
AnswerRe: Nuget Dependency Problem (NServiceBus) Pin
Richard MacCutchan14-Feb-24 21:48
mveRichard MacCutchan14-Feb-24 21:48 
GeneralRe: Nuget Dependency Problem (NServiceBus) Pin
jochance15-Feb-24 2:30
jochance15-Feb-24 2:30 
GeneralRe: Nuget Dependency Problem (NServiceBus) Pin
Richard MacCutchan15-Feb-24 2:33
mveRichard MacCutchan15-Feb-24 2:33 
JokeRe: Nuget Dependency Problem (NServiceBus) Pin
jochance15-Feb-24 2:37
jochance15-Feb-24 2:37 
GeneralRe: Nuget Dependency Problem (NServiceBus) Pin
Richard MacCutchan15-Feb-24 3:01
mveRichard MacCutchan15-Feb-24 3:01 
GeneralRe: Nuget Dependency Problem (NServiceBus) Pin
jochance15-Feb-24 12:32
jochance15-Feb-24 12:32 
GeneralRe: Nuget Dependency Problem (NServiceBus) Pin
Richard MacCutchan15-Feb-24 20:55
mveRichard MacCutchan15-Feb-24 20:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.