Thursday, March 29, 2012

Error when trying to save report in pdf

I developed a report using sql server reporting services and the vs.net
designer. Then I wrote another class that downloads the result into
pdf and excel formats. When I run the program, the excel file opens
fine but the pdf says "there was an error opening this document. the
file is damaged and cannot be repaired". I have seen other forums with
the same issue and microsoft is yet to provide an answer to this
problem. Can someone help please? Any suggestions are well appreciated.
Thanks.There are a variety of reasons this could happen. I'd start by first
looking at the Report Server log file and see what exception (if any) occurs
when you render to PDF. Secondly, I'd dump the PDF into notepad and see if
there are any errors embedded at the end of the stream.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
<csuman@.gmail.com> wrote in message
news:1130708307.146769.204230@.g49g2000cwa.googlegroups.com...
>I developed a report using sql server reporting services and the vs.net
> designer. Then I wrote another class that downloads the result into
> pdf and excel formats. When I run the program, the excel file opens
> fine but the pdf says "there was an error opening this document. the
> file is damaged and cannot be repaired". I have seen other forums with
> the same issue and microsoft is yet to provide an answer to this
> problem. Can someone help please? Any suggestions are well appreciated.
> Thanks.
>|||I am having the same problem - just upgraded Adobe Reader to 7.0.5.
Looking at the pdf created in NotePad: Starts with
%PDF-1.3%
1 0 obj [/PDF /Text /ImageB /ImageC /ImageI] . . . has a bunch of stuff . . .
"ends" trailer << /Size 10 /Root 8 0 R/Info 9 0 R >>
startxref
3893
%%EOF
then after the EOF is a full dump of the HTML code:
%%EOF
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title> . . .
I've asked the database manager to look at the reporting services logs but
if this gives anyone a clue to the cause/solution . . .
--
gwf
"Donovan Smith [MSFT]" wrote:
> There are a variety of reasons this could happen. I'd start by first
> looking at the Report Server log file and see what exception (if any) occurs
> when you render to PDF. Secondly, I'd dump the PDF into notepad and see if
> there are any errors embedded at the end of the stream.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> <csuman@.gmail.com> wrote in message
> news:1130708307.146769.204230@.g49g2000cwa.googlegroups.com...
> >I developed a report using sql server reporting services and the vs.net
> > designer. Then I wrote another class that downloads the result into
> > pdf and excel formats. When I run the program, the excel file opens
> > fine but the pdf says "there was an error opening this document. the
> > file is damaged and cannot be repaired". I have seen other forums with
> > the same issue and microsoft is yet to provide an answer to this
> > problem. Can someone help please? Any suggestions are well appreciated.
> >
> > Thanks.
> >
>
>sql

No comments:

Post a Comment