Tuesday, March 27, 2012
embedded code to check parameter
i have 2 parameters, start_date and end_date. is it possible to use
embedded code to prompt a message box if start_date is later than end
date ?
so far from what i've read, embedded code are called using the globally
defined 'Code' member. but in my case where i need to check the
parameters, how do i call the embedded code when user click the View
Report button ?
thanksss...The first thing that came to my mind is this:
1) Are you creating this report to run off a .NET webform? If you are,
you can make the check there and bring up the appropriate UI
2) The store procedure/or database call can also check the dates and
then either rerturn results, or one result saying "Error: Begin date is
after the end date" or if thta happens use default paramteres.
3) Also, you can edit report code to check the dates and either
hide/show (using the visible properties) , and display proper error
handling there.|||thanks Sorcerdon..
1) yes, the reports will run on .net webform. but where do i check?
2) the stored procedure will return a dataset.. so if i were to put a
one-line error message, the columns for table referencing the dataset
will be missing and hence caused an error when i preview report. or
have i done it incorrectly?
3) but the stored procedure will also be run if use the visibility
properties, no?
thanks again|||i manage to get the msg box out but without the caption.. i tried the
following code:
System.Windows.Forms.MessageBox.Show("Date Range From must be earlier
or the same as Date Range To","Error","OK","","")
but i received this error:
Overload resolution failed because no accessible 'Show' can be called
without a narrowing conversion:
i checked in msdn website and don't see what's wrong with my syntax...
anyhow, is there a way not to run the query for dataset since the dates
will not return result.
thanks..|||ops... i have another problem... the messagebox won't show when i view
it after deployment.
Thursday, March 22, 2012
Email Subscription random failure
I installed SP1 onto our development box in hope this would fix an issue with Email subscriptions failing on occasion to send. The problem is that random subscriptions are not firing after the report content is update and notification is not sent to the subscribers.
After installing SP1 on our dev boxes it appears to happen less often but still occasionally loosing one of the 9 email subscriptions i'm sending to myself. When i check the report the content of the snapshot was refreshed but the last run date for the subscription is for the previous day.
Any ideas?Do you see anything in the log files indicating a failure?
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Allan Unterschutz" <AllanUnterschutz@.discussions.microsoft.com> wrote in
message news:3F1EAEF9-4902-4C10-B3A7-370E00E92750@.microsoft.com...
> Hi folks,
> I installed SP1 onto our development box in hope this would fix an issue
with Email subscriptions failing on occasion to send. The problem is that
random subscriptions are not firing after the report content is update and
notification is not sent to the subscribers.
> After installing SP1 on our dev boxes it appears to happen less often but
still occasionally loosing one of the 9 email subscriptions i'm sending to
myself. When i check the report the content of the snapshot was refreshed
but the last run date for the subscription is for the previous day.
> Any ideas?|||Just to make sure, you are not expecting these on History snapshots are you?
Only report execution snapshots will generate the correct event for a
subscription.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Allan Unterschutz" <AllanUnterschutz@.discussions.microsoft.com> wrote in
message news:C7D230A4-D3B0-47C4-922F-86EECC7EF7F2@.microsoft.com...
> I checked all the log files and there are no entries at all for those
items. It seems to be only happening when you setup subscriptions to send
when content is refreshed.
> "Daniel Reib [MSFT]" wrote:
> > Do you see anything in the log files indicating a failure?
> >
> > --
> > -Daniel
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> > "Allan Unterschutz" <AllanUnterschutz@.discussions.microsoft.com> wrote
in
> > message news:3F1EAEF9-4902-4C10-B3A7-370E00E92750@.microsoft.com...
> > > Hi folks,
> > >
> > > I installed SP1 onto our development box in hope this would fix an
issue
> > with Email subscriptions failing on occasion to send. The problem is
that
> > random subscriptions are not firing after the report content is update
and
> > notification is not sent to the subscribers.
> > >
> > > After installing SP1 on our dev boxes it appears to happen less often
but
> > still occasionally loosing one of the 9 email subscriptions i'm sending
to
> > myself. When i check the report the content of the snapshot was
refreshed
> > but the last run date for the subscription is for the previous day.
> > >
> > > Any ideas?
> >
> >
> >|||These email subscriptions are on the report execution snapshots. For now i'm going to be working around the issue and just setting up a seperate schedule for the emailing to (hopefully) occure after all reports are rendered.
"Daniel Reib [MSFT]" wrote:
> Just to make sure, you are not expecting these on History snapshots are you?
> Only report execution snapshots will generate the correct event for a
> subscription.
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Allan Unterschutz" <AllanUnterschutz@.discussions.microsoft.com> wrote in
> message news:C7D230A4-D3B0-47C4-922F-86EECC7EF7F2@.microsoft.com...
> > I checked all the log files and there are no entries at all for those
> items. It seems to be only happening when you setup subscriptions to send
> when content is refreshed.
> >
> > "Daniel Reib [MSFT]" wrote:
> >
> > > Do you see anything in the log files indicating a failure?
> > >
> > > --
> > > -Daniel
> > > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > >
> > >
> > > "Allan Unterschutz" <AllanUnterschutz@.discussions.microsoft.com> wrote
> in
> > > message news:3F1EAEF9-4902-4C10-B3A7-370E00E92750@.microsoft.com...
> > > > Hi folks,
> > > >
> > > > I installed SP1 onto our development box in hope this would fix an
> issue
> > > with Email subscriptions failing on occasion to send. The problem is
> that
> > > random subscriptions are not firing after the report content is update
> and
> > > notification is not sent to the subscribers.
> > > >
> > > > After installing SP1 on our dev boxes it appears to happen less often
> but
> > > still occasionally loosing one of the 9 email subscriptions i'm sending
> to
> > > myself. When i check the report the content of the snapshot was
> refreshed
> > > but the last run date for the subscription is for the previous day.
> > > >
> > > > Any ideas?
> > >
> > >
> > >
>
>
Monday, March 19, 2012
email notifications scheduled jobs
http://www.informit.com/guides/content.asp?g=sqlserver&seqNum=31
E-mail notification issues
I just set up an SMTP email account though the Management Studio à Server à Database Mail.The test email was successfully delivered to my mail box.
Now I’m trying to test the notifications.I created an Operator with my email address, and my test job is set to email the operator when the job completes using the email account above.
However I am not receiving any emails upon the completion of the job.When I go to notification history under the Operator, there is none.
What am I missing?
Thanks a lot for your help!
The answer is simple - reboot SQL Server Agent|||I am connecting remotely to my server. Is there a way to test an email account or do I need to log in locally? I have set up an operator and am able to set a notification on my job, but it doesn't send the email. I'm not able to see the same path you used above. Any ideas?
|||
LoveDanger wrote:
I just set up an SMTP email account though the Management Studio à Server à Database Mail. The test email was successfully delivered to my mail box.
I think I have a similar scenario here (see also SQL Server Agent Mail (SQL Server 2005 Database E-Mail) in this forum).
LoveDanger wrote:
Now I’m trying to test the notifications. I created an Operator with my email address, and my test job is set to email the operator when the job completes using the email account above.
It looks like I forgot to create an operator. What exactly is this and where can I create this? I'm using the german version of SQL Server and can't translate the term operator to a SQL Server related term i know.
Thanx in advance and best regards,
Gerald
|||I have found it now in the German version, defined an operator and now everything is working fine :-)
@.LoveDanger
Try to do the trouble shooting for database mail, i.e. have a look in the associated tables, e.g.
SELECT * FROM msdb.dbo.sysmail_allitems
SELECT * FROM msdb.dbo.sysmail_sentitems
SELECT * FROM msdb.dbo.sysmail_faileditems
SELECT * FROM msdb.dbo.sysmail_event_log
regards,
Gerald
|||
I couldn't find that because I'm connecting to an earlier version of SQL Server with a newer version.
E-mail notification issues
I just set up an SMTP email account though the Management Studio à Server à Database Mail.The test email was successfully delivered to my mail box.
Now I’m trying to test the notifications.I created an Operator with my email address, and my test job is set to email the operator when the job completes using the email account above.
However I am not receiving any emails upon the completion of the job.When I go to notification history under the Operator, there is none.
What am I missing?
Thanks a lot for your help!
The answer is simple - reboot SQL Server AgentFriday, March 9, 2012
E-mail address of one or more recipients is not valid
it. I am able to write a simple VB Script that uses CDO to send a e-mail out
to a certain address (let's say to john@.test.com). When I setup a
subscription using the same e-mail address I get the error "The e-mail
address of one or more recipients is not valid." Does anyone know why - if I
can write a 6 line CDO vbscript shouldn't SMTP be working?I've figured out what my problem is - apparently SQL Server Reporting
Services is not authenticating correctly. I had to change the settings on
the Relay Restictions on the Access tab for the SMTP Server Properties to be
allow relay through the virtual server with "All except the list below"
instead of the default "Only the list below". Seems like it should work with
the default setting since there is no authentication (anonymous access) but
looks like RS doesn't like that.
"John R" wrote:
> We have setup Reporting Services on a Server 2003 box with SMTP intalled on
> it. I am able to write a simple VB Script that uses CDO to send a e-mail out
> to a certain address (let's say to john@.test.com). When I setup a
> subscription using the same e-mail address I get the error "The e-mail
> address of one or more recipients is not valid." Does anyone know why - if I
> can write a 6 line CDO vbscript shouldn't SMTP be working?
Wednesday, February 15, 2012
Editing the Subject textbox on SSRS Email Standard Subscription
Hi
Does anyone know if it is possible to edit the subject text box of a Standard Email Subscription so that it contains report variables other than the default Globals and if so, how?
Basically I want to add a value field from the report I'm emailing into the subject line. I've already discovered that you cannot use the rest of the Global variables in the subject line other than the default @.ReportName and @.ExecutionTime.
The variable I want to add is in the report dataset.
Any help would be greatly appreciated.
Thanks
RW
Sorry, I don't have the link to the site I saw this on, but I did read that @.ReportName and @.ExecutionTime are the only 2 parameters available.