Thursday, March 29, 2012
Error when trying to save report in pdf
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
Wednesday, March 7, 2012
Error using rs.FireEvent
I am using rs.fireevent () class for firing an event but I a getting an
error
My script code is
Sub Main
Dim rs As New ReportingService()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim subs As Subscription() = rs.ListSubscriptions("/Reports/Report1", Nothing)
try
rs.FireEvent("TimedSubscription", subs(0).SubscriptionID)
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
End Sub
Whenever I run this script using Rs.utility in command prompt Like
"rs -i NewSubscription.rss -s http://mercury/reportserver -e mgmt2000"
I get an error as
"The permissions granted to user 'sb\svaddadi' are insufficient for per
forming this operation."
Even though I have administrator privliges to server I am getting this
error.
Any suggestion will be apprecaible
SonuHi,
Sorry I didn;t see your earlier post and replied that you need to write the
code . Now that you tried writing code in this post. Gr8. Try giving -u and
-p values as well.
Amarnath
"Shrinivas" wrote:
> Hi all ,
> I am using rs.fireevent () class for firing an event but I a getting an
> error
> My script code is
> Sub Main
> Dim rs As New ReportingService()
> rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> Dim subs As Subscription() => rs.ListSubscriptions("/Reports/Report1", Nothing)
> try
> rs.FireEvent("TimedSubscription", subs(0).SubscriptionID)
> Catch ex As Exception
> Console.WriteLine(ex.Message)
> End Try
> End Sub
> Whenever I run this script using Rs.utility in command prompt Like
> "rs -i NewSubscription.rss -s http://mercury/reportserver -e mgmt2000"
> I get an error as
> "The permissions granted to user 'sb\svaddadi' are insufficient for per
> forming this operation."
> Even though I have administrator privliges to server I am getting this
> error.
> Any suggestion will be apprecaible
> Sonu
>
Sunday, February 26, 2012
Error trying to write file
I get an error: Object reference not set to an instance of an object. Line 35
What does the whole exception.tostring say?|||Object reference not set to an instance of an object.
Dim clsWDD As New WebDevDB.WebDevDB
Dim intLeng As Int32
Dim intLock As Int32Dim strAppl As String = "MyApplication"
Dim strData As String = "This is my text data!"Dim strFile As String = "MyFile"
intLock = clsWDD.LockTextFile(strAppl, strFile) 'line 35
intLeng = clsWDD.WriteTextFile(strAppl, strFile, strData, WriteAction.Create)
intLock = clsWDD.UnlockTextFile(intLock)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 33: Dim strFile As String = "MyFile"
Line 34:
Line 35: intLock = clsWDD.LockTextFile(strAppl, strFile)
Line 36: intLeng = clsWDD.WriteTextFile(strAppl, strFile, strData, WriteAction.Create)
Line 37: intLock = clsWDD.UnlockTextFile(intLock)
Source File: C:\Inetpub\wwwroot\TestSolution\WebForm1.aspx.vb Line: 35
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
WebDevDB.WebDevDB.GetConnectionString()
WebDevDB.WebDevDB.LockTextFile(String ApplicationName, String FileName, Byte LockSeconds, Byte LockAttempts)
TestSolution.WebForm1.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\TestSolution\WebForm1.aspx.vb:35
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()