Showing posts with label export. Show all posts
Showing posts with label export. 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.

Tuesday, March 20, 2012

Report Specific export formats?

is there a way to show report specific export formats?

A use case scenario is when a report would not make any sense in say CSV, then we do not want that csv to show up in the export options?

Thanks.

Unfortunately you cannot configure per-report export format options.

Wednesday, March 7, 2012

Report Server renders incorrect URL for [Export] button

Good day,
We have a Report Server 2000 on a client site. The server is accessible
via server name (NetBIOS name) from the local LAN, but only via a DNS name
from outer regions of the WAN (these users are on a different but trusted
domain in the bigger forest). The reports render successfully when accessed
via either the NetBIOS or DNS name, but the URL rendered for the â'Exportâ'
functionality always refers to the NetBIOS (server) name. As a result users
on the WAN cannot use the â'Exportâ' functionality since the URL is not found
from that network location (without us adding a local host entry which is
against company policy).
The page source shows a number of variables, including dmRepUrl,
touchSessionUrl, printUrl, renderingUrl, exportUrl and docMapUrl â' these are
all incorrectly mapping to the server name.
I cannot find any matching entry in the Report Server configuration and it
seems as-if this code is output by a compiled assembly on the Report Server.
Are these URLs configurable at all?
Thank you,
James Avenant
GijimaAst ConsultantHi James,
Thank you for your posting!
From your description, my understanding of this issue is: You want to
deploy your report server on a WAN environment. If I misunderstood your
concern, please feel free to let me know.
Based on my experience, you need to specify a fully qualified domain name
instead of the Netbios name in the config file.
The first step is to change the following two registry values under this
key to the appropriate new values:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\80\Reporting
Services\
RSVirtualDir = http://server.company.com/ReportServer (Old Value was
http://server/ReportServer)
WAVirtualDir = http://server.company.com/Reports (Old Value was
http://server/Reports)
The final piece is to make a change in the following to config files on
your reporting server:
C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\RSReportServer.config
C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportManager\RSWebApplication.config
Each file will contain one instance of the server referenced by name
(http://server/ReportServer). Replace it with the fully qualified domain
name, keeping the trailing directory
(http://server.company.com/ReportServer)
Now just restart the service and you should be able to access the reports
inside or out using a fully qualified domain name.
Hope this will be helpful!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.