Showing posts with label email. Show all posts
Showing posts with label email. Show all posts

Tuesday, March 20, 2012

An unexpected error occurred in Report Processing

Hi,

I am having MSRS 2000 Reports which is using subscription feature to email PDF format reports to user . I am able to get all the reports e-mailed as expected only this report is giving an errror in the status as "Failure sending mail: An unexpected error occurred in Report Processing". I can pull this report properly and also export it in PDF manually. The Report is a 15 page Report with few images. If I try to email only the link of the Report it works fine. Was wondering if anybody would have a clue about the same .

The Log files read as

Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
An unexpected error occurred in Report Processing. > System.IO.DirectoryNotFoundException:
Could not find a part of the path "F:\".

I dont know why it is going in F drive and failing.

cheers,

siaj

The more detailed log is :

ReportingServicesService!processing!1790!04/25/2006-14:15:10:: e ERROR:
Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
An unexpected error occurred in Report Processing., ;
Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
An unexpected error occurred in Report Processing. > System.IO.DirectoryNotFoundException:
Could not find a part of the path "F:\".
at System.IO.__Error.WinIOError(Int32 errorCode, String str)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path)
at System.IO.Directory.CreateDirectory(String path)
at Microsoft.ReportingServices.Library.PartitionManager.CreateFile(String folder, String filename)
at Microsoft.ReportingServices.Library.FileChunkWriteStream.OpenFileStream()
at Microsoft.ReportingServices.Library.FileChunkWriteStream..ctor(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, String mimeType, ChunkFlags flags)
at Microsoft.ReportingServices.Library.SnapshotChunkStreamFactory.CreateWriteStream(Guid snapshotDataID, Boolean isPermanentSnapshot, String chunkName, Int32 chunkType, String mimeType, Int32 bufferSize)
at Microsoft.ReportingServices.Library.ReportSnapshot.CreateReportChunk(String name, ReportChunkTypes type, String mimeType)
at Microsoft.ReportingServices.ReportProcessing.a.a()
at Microsoft.ReportingServices.ReportProcessing.a.c()
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.a(Report A_0, ProcessingContext A_1, Boolean A_2, GetReportChunk A_3, az A_4, DateTime A_5, CreateReportChunk A_6, ab& A_7)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.a(DateTime A_0, GetReportChunk A_1, ProcessingContext A_2, RenderingContext A_3, CreateReportChunk A_4, Boolean& A_5)

It sounds like you have the feature enabled where we store temporary snapshots in the filesystem. Check this article:

http://msdn2.microsoft.com/en-us/library/ms157439(SQL.90).aspx

Make sure that the FileShareStorageLocation element is set to a path which actually exists. My guess is that it is not.

Monday, March 19, 2012

An Insert Trigger with CDOSYS generated email

Hello,
I've got an insert trigger defined on a table.
Everything seems to work perfectly excpet the body section of my e-mail
message is delivered empty.
Here the relavent code segment...
Begin
DECLARE @.CaseCounter varchar(50)
If (SELECT Count(*) FROM inserted WHERE PI_ID = '0000') >0
SELECT @.CaseCounter = RTRIM(CAST(IDENT_CURRENT('inserted') AS varchar(50))
)
SELECT @.body = 'The Case Number is: ' + @.CaseCounter
Set @.vet_email = 'valid@.to.email.address'
exec dbo.sp_send_cdosysmail 'valid@.from.email.address, @.vet_email, 'An
Unlisted PI was submitted with this case', @.body
End
As you can tell from the my trigger code I'm trying to concatenate the
inserted Identity value onto a Character string. As I stated above, the
e-mail arrive fine but the Body section is blank. In case you're wondering,
the @.vet_mail variable is DECLARED earlier in the trigger.
I previously had all variables DECLARE at the top of the code but I still
got the same results.
All suggestions are welcomed!
Thanks
Application Engineer / DBA
UCLA SOM(a) please, please, please... do NOT send e-mail from a trigger!
(b) why don't you look at the base table instead of inserted. inserted is a
virtual table and I think you will find that IDENT_CURRENT() will return
NULL (which, when concatenated to your @.body value, makes the whole
parameter NULL). To prove it, try:
SET @.body = 'The Case Number is: ' + COALESCE(@.CaseCounter, 'NULL');
"Marcial" <no_spam@.antispammer.com> wrote in message
news:1B796F05-D8E3-4F0A-AA9F-A1859F94FE58@.microsoft.com...
> Hello,
> I've got an insert trigger defined on a table.
> Everything seems to work perfectly excpet the body section of my e-mail
> message is delivered empty.
> Here the relavent code segment...
> Begin
> DECLARE @.CaseCounter varchar(50)
> If (SELECT Count(*) FROM inserted WHERE PI_ID = '0000') >0
> SELECT @.CaseCounter = RTRIM(CAST(IDENT_CURRENT('inserted') AS
> varchar(50)))
> SELECT @.body = 'The Case Number is: ' + @.CaseCounter
> Set @.vet_email = 'valid@.to.email.address'
> exec dbo.sp_send_cdosysmail 'valid@.from.email.address, @.vet_email, 'An
> Unlisted PI was submitted with this case', @.body
> End
>
> As you can tell from the my trigger code I'm trying to concatenate the
> inserted Identity value onto a Character string. As I stated above, the
> e-mail arrive fine but the Body section is blank. In case you're
> wondering,
> the @.vet_mail variable is DECLARED earlier in the trigger.
> I previously had all variables DECLARE at the top of the code but I still
> got the same results.
> All suggestions are welcomed!
> Thanks
> --
> Application Engineer / DBA
> UCLA SOM|||Hi Marcial,
just to add to Aarons post:
Its REALLY=B2 NOT=B3 recommended to send Emails in a trigger...
WHY
=3D=3D=3D=3D
1=2E Triggers behave synchronously, that means the trigger will block the
current transaction till the whole code in it was executed. So in any
cases that your mail server is unreachable, taking long for
communcation etc. the transaction will be blocked the data / pages /
tables (depending on your locking level) will be blocked and your
application or frontend or whatever another transaction wants to
manipulate the data will be on hold.
2=2ETriggers can cause the transcation to rollback due to a non-business
error. Although when the data and the transaction which is executed is
valid and should be commited to the database, if the sending EMail
procedure will bring back an error and you don=B4t handle it, or it is
of a certain severity which causes the transaction to rollback, your
whole BUSINESS is on hold, only because of sending an email !!!
You don=B4t want that, erh ?
I would suggest (as this is not time critical) to write the data in a
table which is regulary checked for content to be sent.
HTH, Jens Suessmeyer
http://www.sqlserver2005.de
--|||Thanks Very Much Jens for the expanded explanation. And thanks to Aarron fo
r
the initial Alert anbd Reply.
...You may consider me anevangelized user who has been convinced to find
another way beside triggers to send e-mail. Toward that end might anyone
have an example of Stored Proc code that searches a table and sends e-mail
accordingly.
Cheers~
--
Application Engineer / DBA
UCLA SOM
"Jens" wrote:

> Hi Marcial,
> just to add to Aarons post:
> Its REALLY2 NOT3 recommended to send Emails in a trigger...
> WHY
> ====
> 1. Triggers behave synchronously, that means the trigger will block the
> current transaction till the whole code in it was executed. So in any
> cases that your mail server is unreachable, taking long for
> communcation etc. the transaction will be blocked the data / pages /
> tables (depending on your locking level) will be blocked and your
> application or frontend or whatever another transaction wants to
> manipulate the data will be on hold.
> 2.Triggers can cause the transcation to rollback due to a non-business
> error. Although when the data and the transaction which is executed is
> valid and should be commited to the database, if the sending EMail
> procedure will bring back an error and you don′t handle it, or it is
> of a certain severity which causes the transaction to rollback, your
> whole BUSINESS is on hold, only because of sending an email !!!
> You don′t want that, erh ?
> I would suggest (as this is not time critical) to write the data in a
> table which is regulary checked for content to be sent.
>
> HTH, Jens Suessmeyer
> --
> http://www.sqlserver2005.de
> --
>|||Hi Marcial,
I thinkk I will write one for you that take as a template. If I don=B4t
come back to the thread please send me a reminder that I will keep
track of that.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--

Thursday, March 8, 2012

an email is sent when the database is updated..any help?

in the database, there is some information about the applicant: his name, his email, his status (accepted or rejected)...etc.

the page that is shown to the administrator displays the applicant name and his status, when he changes any of the applicants status, an email is sent to that applicant.

is there any way to do that?

thanks in advance

Hi,

Well you can do this like when the administrator changes the status you send the email right after changing the status. For Example:

private void UpdateApplicantStatus ()
{
//Code to update the applicant status
if (StatusUpdation == true)
{
this.EmailApplicant();
}

}

private void EmailApplicant()
{
//Code to send email to the applicant
}

Hope it will help you out,

Thanks and best regards,

|||

thanks but still didn't get it :( how can the email being sent to the adresses that are stored in the DB?

|||

Hi,

Are you able to update the the status of the user in the database. If so then I am sure you update the status according to some UserID.

If you can get the userid of the user then you can get its email address by providing the user id. In the code which I have written above you only need to add one additional thing is to write a method somthing like this

private string GetUserEmail (string UserID)
{
//Your code to get the email address from the database
return emailAddress;
}

I hope now you can have an idea of how to do this.

Thanks and best regards,

|||

If you still have some doubts then write paste your code here which you are using to update the status of the user.

Thanks and best regards,

Saturday, February 25, 2012

Ampersand in email subscription report parameter

Hello everyone,

I'm trying to set up e-mail delivery report subscriptions. When I enter report parameters, it accepts the standard MDX syntax (ex. [Time].[All Times].[2006]), but when I try to access a member by it's key:

[Time].&[2006]

It raises the following error:

Default value or value provided for the report parameter 'pTime' is not a valid value. (rsInvalidReportParameter)

They seem to have the same problem here (see last paragraphs of the article):

http://www.microsoft.com/technet/prodtechnol/sql/2005/smartreports.mspx

Any idea would be very welcome. Thanks!

TGA

I have the same problem, I've tried replacing the ampersand with &amp; and %26 but the parameter is still not excepted.

Ampersand in email subscription report parameter

Hello everyone,

I'm trying to set up e-mail delivery report subscriptions. When I enter report parameters, it accepts the standard MDX syntax (ex. [Time].[All Times].[2006]), but when I try to access a member by it's key:

[Time].&[2006]

It raises the following error:

Default value or value provided for the report parameter 'pTime' is not a valid value. (rsInvalidReportParameter)

They seem to have the same problem here (see last paragraphs of the article):

http://www.microsoft.com/technet/prodtechnol/sql/2005/smartreports.mspx

Any idea would be very welcome. Thanks!

TGA

I have the same problem, I've tried replacing the ampersand with &amp; and %26 but the parameter is still not excepted.

Sunday, February 12, 2012

Alternatives to Outlook for SQLMail?

I didnt' have good success with
sp_send_cdosysmail. It would send a normal
email but it would choke on an sms email address
like '2125551212@.tomomail.net' or
[2125551212@.tomomail.net] it just throws an error code.
I wound up going with Outlook.
Bryan[vbcol=seagreen]
>--Original Message--
>Hello
>You could also use sp_send_cdosysmail from the KB312839
>http://support.microsoft.com/default.aspx?scid=kb;en-
>us;312839&sd=tech
>Carlos Souza
>http://carlos.geekbunker.org
feature.
>.
>
You can bypass SQL Mail and Outlook and use SMTP instead.
You can download a free extended stored procedure that does
this from:
http://www.sqldev.net/xp/xpsmtp.htm
-Sue
On Sat, 31 Jul 2004 23:19:26 -0700, "bmurtha"
<anonymous@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>I didnt' have good success with
>sp_send_cdosysmail. It would send a normal
>email but it would choke on an sms email address
>like '2125551212@.tomomail.net' or
>[2125551212@.tomomail.net] it just throws an error code.
>I wound up going with Outlook.
>Bryan
>feature.