On my development machine where I have Visual Studio 2005 loaded, I have an
app that uses the Report control. I can view data in report format with the
Report control -- the data renders OK in the Report control. My problem is
in rendering the report from the rdlc file for printing to a line printer.
Following the example from MSDN Help at
I can print the rdlc report file to the line printer from my development
machine. But I deployed the same app app to a User's machine (using Click
once), and the print job failed at
report.Render(" Image", deviceInfo, CreateStream, out warnings);
Does anyone have any idea what file/reference/library I need to include in
the deploy without having to load VS2005 on the user machine? Note: I am
already including the refence to Microsoft.Repor tViewer.Common and
Microsoft.Repor tViewer.Winform s, and I already copy the entire content of the
Report rdlc file
Here is the area where the print job is failing (--the entire code for the
print routine is at
http://msdn2.microsoft.com/en-us/lib...(VS.80).aspx--)
private Stream CreateStream(st ring name, string fileNameExtensi on,
Encoding encoding, string mimeType, bool willSeek)
{
Stream stream = new FileStream(name + "." + fileNameExtensi on,
FileMode.Create );
m_streams.Add(s tream);
return stream;
}
private void Export(LocalRep ort report)
{
string deviceInfo =
"<DeviceInf o>" +
" <OutputFormat>E MF</OutputFormat>" +
" <PageWidth>8.5i n</PageWidth>" +
" <PageHeight>11i n</PageHeight>" +
" <MarginTop>0.25 in</MarginTop>" +
" <MarginLeft>0.2 5in</MarginLeft>" +
" <MarginRight>0. 25in</MarginRight>" +
" <MarginBottom>0 .25in</MarginBottom>" +
"</DeviceInfo>";
Warning[] warnings;
m_streams = new List<Stream>();
report.Render(" Image", deviceInfo, CreateStream, out warnings); <<<---fails
here
foreach (Stream stream in m_streams)
stream.Position = 0;
}
app that uses the Report control. I can view data in report format with the
Report control -- the data renders OK in the Report control. My problem is
in rendering the report from the rdlc file for printing to a line printer.
Following the example from MSDN Help at
I can print the rdlc report file to the line printer from my development
machine. But I deployed the same app app to a User's machine (using Click
once), and the print job failed at
report.Render(" Image", deviceInfo, CreateStream, out warnings);
Does anyone have any idea what file/reference/library I need to include in
the deploy without having to load VS2005 on the user machine? Note: I am
already including the refence to Microsoft.Repor tViewer.Common and
Microsoft.Repor tViewer.Winform s, and I already copy the entire content of the
Report rdlc file
Here is the area where the print job is failing (--the entire code for the
print routine is at
http://msdn2.microsoft.com/en-us/lib...(VS.80).aspx--)
private Stream CreateStream(st ring name, string fileNameExtensi on,
Encoding encoding, string mimeType, bool willSeek)
{
Stream stream = new FileStream(name + "." + fileNameExtensi on,
FileMode.Create );
m_streams.Add(s tream);
return stream;
}
private void Export(LocalRep ort report)
{
string deviceInfo =
"<DeviceInf o>" +
" <OutputFormat>E MF</OutputFormat>" +
" <PageWidth>8.5i n</PageWidth>" +
" <PageHeight>11i n</PageHeight>" +
" <MarginTop>0.25 in</MarginTop>" +
" <MarginLeft>0.2 5in</MarginLeft>" +
" <MarginRight>0. 25in</MarginRight>" +
" <MarginBottom>0 .25in</MarginBottom>" +
"</DeviceInfo>";
Warning[] warnings;
m_streams = new List<Stream>();
report.Render(" Image", deviceInfo, CreateStream, out warnings); <<<---fails
here
foreach (Stream stream in m_streams)
stream.Position = 0;
}
Comment