locked
report with filters in dataset error RRS feed

  • Question

  • User-939069355 posted

    I have a report whereby I set 3 filters to the dataset. 

    Filter #1 - =IIf(LCase(Fields!Description.Value).Contains("discontinue"), true, false)
    
    Filter #2 - =IIf(LCase(Fields!Description.Value).Contains("cancelled"), true, false)
    
    Filter #3 - =IIF(Fields!OrderReviewCategoryCode.Value = "Laboratory" OrElse Fields!OrderReviewCategoryCode.Value = "Diagnostic Imaging", true, false)

    Basically I want to only display the data whereby the description column is not "discontinue" or "cancelled" and also with a category code of "laboratory" and "diagnostic imaging". However I realised that when the dataset is empty (means no record found in database) the report will throw an "internal server error". 

    I tested by removing ALL the filters, and the report will display correctly (which is a blank page with no data). Is there anyway I can check in the filter to only run the filter if the dataset has at least 1 record? Or is there anyway I can solve this issue?

    Thanks.

    Friday, April 5, 2013 6:18 AM

Answers

  • User-939069355 posted

    Fixed.

    =IIF(LCase(IIF(IsNothing(Fields!Description.Value), "", Fields!Description.Value)).Contains("discontinue"), true, false)
    
    =IIF(LCase(IIF(IsNothing(Fields!Description.Value), "", Fields!Description.Value)).Contains("cancelled"), true, false)



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 8, 2013 12:08 AM

All replies

  • User-939069355 posted

    bump

    Sunday, April 7, 2013 9:30 AM
  • User-939069355 posted

    Fixed.

    =IIF(LCase(IIF(IsNothing(Fields!Description.Value), "", Fields!Description.Value)).Contains("discontinue"), true, false)
    
    =IIF(LCase(IIF(IsNothing(Fields!Description.Value), "", Fields!Description.Value)).Contains("cancelled"), true, false)



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 8, 2013 12:08 AM
  • User-1280676833 posted

    Congratulations! Im glad to hear that you have solved this issue by yourself. Welcome to post your question on here in the future programming.

    Regards

    Friday, April 26, 2013 1:31 AM