Showing posts with label exporting. Show all posts
Showing posts with label exporting. Show all posts

Friday, March 23, 2012

Report Viewer Control - Export to PDF, Works on local IIS computer, but not another.

When exporting a report to a pdf file, I am experiencing what seems to be a "hang up" on the server. The code executes fine from my development machine, but when moved to the server I get this response. I also recieve this message if I click the refresh button. Acrobat could not open 'pdf9c9.tmp' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decode). To create an Adobe PDF document, go to the source application. Then print the document to Adobe PDF.

Here is my code for reference. It works fine on one IIS, but not another. What could I be missing?

Dim warningsAs Microsoft.Reporting.WebForms.Warning() =Nothing

Dim streamidsAsString() =Nothing

Dim mimeTypeAsString =Nothing

Dim encodingAsString =Nothing

Dim extensionAsString =Nothing

Dim deviceInfoAsString

Dim bytesAsByte()

Dim lrAsNew Microsoft.Reporting.WebForms.LocalReport

lr.ReportPath ="Report1.rdlc"

'lr.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("DischargeSummary", ObjectDataSource1()))

deviceInfo ="<DeviceInfo><SimplePageHeaders>True</SimplePageHeaders></DeviceInfo>"

bytes = ReportViewer1.LocalReport.Render("PDF", deviceInfo, mimeType, encoding, extension, streamids, warnings)

Response.ClearContent()

Response.ClearHeaders()

Response.ContentType ="application/pdf"

Response.BinaryWrite(bytes)

Response.Flush()

Response.Close()

Check security permission on the server.

Report Viewer - Export to PDF - Problem in strikethrough font

Hi,

I used a textbox with strikethrough font in my report. In preview, the report has that font and also in Print. But exporting to PDF has no strikethrough font. (Export to excel has this font). Can anybody help to resolve this.

Thanks in advance.

The PDF renderer does not currently support the strikethrough style on fonts.

Donovan

Wednesday, March 21, 2012

Report times out on Export after 90 seconds.

I have a report that is timing out after 90 seconds of run-time - but only
when exporting to an alternate file type (PDF, XLS, etc)- if I use the HTML
Viewer format, the report is displayed properly and only takes a couple of
seconds to run. The error message that I get back says "The operation has
timed-out", and I'll include the stack trace at the end of this message.
My application is calling the ReportingService.Render method using SOAP
Reporting Services Web Service to perform the export to a PDF format. I'm
able to see the same problem when using the Report manager to export the
report to PDF format. This report definition is using a table to display the
query results (no matrices), and is printing in landscape mode. I have RS
Service Pack 2 installed on the server.
The report is running off of a fairly small data set (4000-5000 records),
with a couple of tricky joins, but I can execute the query using SQL Server
Enterprise Manager in about 2 seconds. I have tried setting the data set
'Timeout' value to 3600 (1 hr) and 2147483647 (documentation named maximum
value) in the Report Designer for the .rdl itself (timeout element under
query element in rdl). I've tried setting "Connect Timeout=3600" in the
connection string for my Data Set defined on the Report Server. I have also
set the Report Server to not timeout report execution both in Site Settings
and the individual settings for the submitted report definition. What
timeout am I missing?
If I trim down my data set to under 1000 records, the Render call completes
before the timeout can occur, and I get my PDF. I've spent some time trying
to figure out what's going on, and am at a loss. Here's what I see happening
over time:
0:00 - Submit report - Render() call is made
0:05 - CPU Utilization on server jumps to 100%, I can see report job in
Report Manager
1:30 - I get error message back from Render() call saying "The operation has
timed-out."
2:35 - CPU utilization on server slows back down to normal, job is no longer
visible in Report Manager
Any help or suggestions greatly appreciated!With this same report, trying different export formats - this is what I've
found:
PDF - times out after 90 seconds
XLS - times out after 90 seconds.
TIF - times out after 90 seconds.
CSV - results show up after ~ 10 seconds.
HTML - results show up after ~ 10 seconds.
XML - results show up after ~ 10 seconds.
So it looks like anything that doesn't end up in a plain text export is
timing out on me. And here's that stack trace I promised earlier:
The operation has timed-out.
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest
request) at
System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest
request) at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at UT.RSRef.ReportingService.Render(String
Report, String Format, String HistoryID, String DeviceInfo, ParameterValue[]
Parameters, DataSourceCredentials[] Credentials, String ShowHideToggle,
String& Encoding, String& MimeType, ParameterValue[]& ParametersUsed,
Warning[]& Warnings, String[]& StreamIds) in C:\Documents and Settings\Ben\My
Documents\Visual Studio Projects\REPOUTIL\Web
References\RSRef\Reference.cs:line 653 at UT.repoutil.Page_Load(Object
sender, EventArgs e) in c:\documents and settings\ben\my documents\visual
studio projects\repoutil\repoutil.cs:line 5209|||Ben,
Can you render other reports without timeouts? If they all time out, I
would say its somthing wrong with the export feature...
If its just this one report it might just be taking a long time to render if
the report is large, I believe you can change the timeout values in one of
the rsserver config files to allow you more time to either get your export,
or generate some other type of error that your not seeing now because of the
timeout.
Hope this helps in some way.
"Ben Shaffer" wrote:
> With this same report, trying different export formats - this is what I've
> found:
> PDF - times out after 90 seconds
> XLS - times out after 90 seconds.
> TIF - times out after 90 seconds.
> CSV - results show up after ~ 10 seconds.
> HTML - results show up after ~ 10 seconds.
> XML - results show up after ~ 10 seconds.
> So it looks like anything that doesn't end up in a plain text export is
> timing out on me. And here's that stack trace I promised earlier:
> The operation has timed-out.
> at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest
> request) at
> System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest
> request) at
> System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
> methodName, Object[] parameters) at UT.RSRef.ReportingService.Render(String
> Report, String Format, String HistoryID, String DeviceInfo, ParameterValue[]
> Parameters, DataSourceCredentials[] Credentials, String ShowHideToggle,
> String& Encoding, String& MimeType, ParameterValue[]& ParametersUsed,
> Warning[]& Warnings, String[]& StreamIds) in C:\Documents and Settings\Ben\My
> Documents\Visual Studio Projects\REPOUTIL\Web
> References\RSRef\Reference.cs:line 653 at UT.repoutil.Page_Load(Object
> sender, EventArgs e) in c:\documents and settings\ben\my documents\visual
> studio projects\repoutil\repoutil.cs:line 5209
>|||Thanks Jason,
It's only one report that is giving me this headache. I have dozens more
that export before the timeout.
Can you point me towards any documentation on what the reportserver config
files are and what the settings do? I've found various *.config files in the
report server directories on the server, but haven't seen any keys that jump
out at me as being the right one for the timeout that's giving me grief.
"Jason Brinkley" wrote:
> Ben,
> Can you render other reports without timeouts? If they all time out, I
> would say its somthing wrong with the export feature...
> If its just this one report it might just be taking a long time to render if
> the report is large, I believe you can change the timeout values in one of
> the rsserver config files to allow you more time to either get your export,
> or generate some other type of error that your not seeing now because of the
> timeout.
> Hope this helps in some way.

Friday, March 9, 2012

Report server viewer renders incorrectly but exporting yields correct output!

I have a rather complicated report with lots and lots of textbox and line controls. When I preview the report on the Report Server the layout is all kinds of skewed and all kinds of stuff is out of place. But when I export the report to PDF or TIFF, the output reverts to it's proper form. Why is it doing this? Is there anything that I can do to not make it so ugly when previewing?

Does it seem like there are line feeds where there really shouldn't be? Try changing the width of your report.

|||

The line controls have been an issue for me. In my layout I have a couple of lines that extend past where they would logically go then when I previewed in VS the line would be well short of where I wanted, and then when I exported out to PDF it rendered fine. Now I am loading the reports onto a Report Server and getting an even crazier preview output.