Showing posts with label operator. Show all posts
Showing posts with label operator. Show all posts

Tuesday, March 27, 2012

Failed to notify 'Operator' via email

32-bit SQL 2005 sp2 jobs recieve this error when trying to send an email to an Operator. Database Mail is setup and is working for all SSIS jobs where the email is sent through code or Send email task but simply trying to notify on job completion will not work even though the Agent is running & configured to use Database Mail profile with proper permissions.

Make sure sql agent configured properly and restart sql agent after mail configuration and test the mail from agent..

Make sure operator email is correct...and check if there are any other errors in mail log.

|||Enable DatabaseMail on the SQL Server Agent -> properties -> Alert System (check the checkbox), and then restart SQL Server Agent.

Friday, March 9, 2012

fail to change the value of parameter with operator 'range'

Hi all,

I have couple of paramters with operator 'range(inclusive)' in my report(Agains datacube), and I always get failure when I choose value with them. here's a example( 3 such parameters on my report).

...

From date To Date

...

From age To Age

...

From Salary To Salary

@.salary is the last one.

when i choose a value for 'From Salary' or 'To Salary' from the dropdown list, it runs correctly. But if I choose value for 'from age' or 'To age' or 'From Date' or 'To Date', it fails due to

  • An error has occurred during report processing. (rsProcessingAborted)

  • Query execution failed for data set 'DimTimesheetTimesheetNumber'. (rsErrorExecutingCommand)

  • Range operator ( : ) operands have different levels; they must be the same.

    BTW, all the default values for these parameters are 'all', since it allows only 'all' to select when I set up the parameters, and I tried to change the default value, but it caused errors about the parameter dependency.

    Any idea and suggestion will be appreciated!

    Jone

    Anybody has any idea?

    Thanks,

  • Sunday, February 26, 2012

    F I L T E R HELP!!! PLEASE!!!! THIS CAN'T BE THAT HARD

    In SSRS 2005, how can I add this check (what do I have to put in the Expression, operator, and value in filters tab of table properties) to my table filter to ensure only customers that match one of the ORs are viewed in my report?

    HERE IS A PRINT SCREEN OF THE FILTER TAB WHERE i WANT THIS ALL TO HAPPEN...PROPERTIES OF MY TABLE:
    http://www.photopizzaz.biz/filtertab_ssrs2005table.jpg

    essentially I want this check to filter records on my table...match to this criteria from my dataset:

    (Fields!Branch.Value = '00002' and
    Fields!CustomerNumber.Value = '0000002' or
    Fields!CustomerNumber.Value = '0000003' or
    Fields!CustomerNumber.Value = '0000004' or
    Fields!CustomerNumber.Value = '0000155' or
    Fields!CustomerNumber.Value = '0000156' or
    Fields!CustomerNumber.Value = '0000159' or
    Fields!CustomerNumber.Value = '0000160' or
    Fields!CustomerNumber.Value = '0000161' or
    Fields!CustomerNumber.Value = '0000118' or
    Fields!CustomerNumber.Value = '0000153' or
    Fields!CustomerNumber.Value = '0000152' or
    Fields!CustomerNumber.Value = '0000108' or
    Fields!CustomerNumber.Value = '0000158' or
    Fields!CustomerNumber.Value = '0000133')

    OR

    (Fields!Branch.Value <> '00002' and
    Fields!CustomerNumber.Value = '0000053' or
    Fields!CustomerNumber.Value = '0000058' or
    Fields!CustomerNumber.Value = '0000072' or
    Fields!CustomerNumber.Value = '0000073' or
    Fields!CustomerNumber.Value = '0000079' or
    Fields!CustomerNumber.Value = '0000080' or
    Fields!CustomerNumber.Value = '0000143' or
    Fields!CustomerNumber.Value = '0000146' or
    Fields!CustomerNumber.Value = '0000157' or
    Fields!CustomerNumber.Value = '0000135')

    Fav, Why don't you put these values into a SQL DB table and add it as an additional dataset for your report. Then, just reference the new column/table in the Expression definition.

    Just a thought .....

    |||

    because while that would work, it's more overhead. I want to be able to use the reporting interface, that's what it's for. I'm not one to like to code all this crap in the backend for a report as complicated as the one I have. I'd like to be able to use the tool, SSRS which is what it's for and manage the filters, at least some of the major ones through the UI..I don't like managing everything in my stored procs and tables...that is way too much work...and that's why a reporting interface along with .NET and VB can help manage. I already have around 7 stored procs and 5 tables for this report...I don't need any more overhead....I don't want reporting to be 100% of my life at work...easier to maintain this with SSRS reporting filters. The problem is, SSRS 2005 is too new and nobody seems to know how to tell me how to form expressions in table filters at this point it looks like.

    Why use reporting services if you can't harness filters like I want? think of it the reverse. If I did all this in SQL, first it would take me a year, second, then I would have no need for a UI...well, I don't have time to code everything in SQL, that's what UI is there to help with. I come from Crystal...if I had to code all that in SQL, adios to all my other projects. The stored procs behind my 5 datasets in this report have enough code in it....it's a nightmare.

    |||

    u can try this one

    (Fields!Branch.Value = '00002' and
    Fields!CustomerNumber.Value in ( '0000002' ,'0000003' , '0000004', '0000155' , '0000133') )

    something like this, u can put all these constant values in expression after selecting IN operator

    |||

    thanks, so just so I have this right....in the filter screen, I'd put something like:

    Expression Operator Value

    Fields!CustomerNumber IN (Fields!Branch.Value = '00002' and
    Fields!CustomerNumber.Value in ( '0000002' ,'0000003' , '0000004', '0000155' , '0000133') )

    I need to be sure I'm putting your expression in the right place and that my operator is correct. So would you expression go on the expression side or Value when you look at my URL above?

    |||

    So, I tried this, but it doesn't like the syntax and how I set it up in this whole tab. Am I not doing this right?

    http://www.photopizzaz.biz/filtertab_ssrs2005table2.jpg

    |||

    i think u have to use like this

    Expression Operator Value

    Fields!Branch.Value = '00002'

    Fields!CustomerNumber.Value IN ( '0000002' ,'0000003' , '0000004', '0000155' , '0000133') )

    use double quotes instead of single quotes if this does not work

    OR else u can try this

    Expression Operator Value

    Fields!CustomerNumber.Value IN ( iif(Fields!Branch.Value = '00002' ,('0000002' ,'0000003' , '0000004', '0000155' , '0000133'), ('0000001'))

    use iif function check this out in MSDN and try out

    |||thanks, but what about the other OR piece?|||

    i think u should use IIF for this - so for that OR piece u have to include all the ids where i have included ('000001')

    that is, if use IIF function it needs three parameters, first parameter will be an expression, in ur case to check branch value is '000002',

    second parameter will if the expression is true, include all the ids when branch value is '000002'

    third parameter will be if the expression is false,include all the ids when branch value is not equal to '000002'