SSRS Chart filter working backwards

  • I'm working in VS2010, where I have two identical bar charts in an SSRS report (one is literally a copy of the other). They show counts of surgical cases by day of week. One chart needs to show only CVOR cases, the other only General cases. "Weekday" is the Category Group for both charts.

    In the first chart (CVOR) I set my Category Group filter to ServiceType = CVOR. In the second (General) I set the same filter to ServiceType = General. When I run the report, the two charts are showing the opposite of what they should; the CVOR chart shows General cases, and vice versa. I added a table to the report so I could view the data coming in, and it's exactly as I expect it. But the Category Group filters are definitely working backwards. I tried removing the filter from one chart and adding ServiceType as another Category Group, and the data displayed under the correct group. So I'm 100% confident of the data coming in, it's just the filters are working backwards.

    If I switch the filters (telling the CVOR chart to show only General cases, etc) the charts both appear correctly. I could certainly leave that in place and everything would be fine, but I'd really like to know why this is happening. Has anyone seen this before?

    Thanks
    Ron

    -----
    a haiku...

    NULL is not zero
    NULL is not an empty string
    NULL is the unknown

  • Are you sure that the filters are coded for = as opposed to <> ?

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • sgmunson - Wednesday, February 13, 2019 12:42 PM

    Are you sure that the filters are coded for = as opposed to <> ?

    Absolutely sure. Here's the weird thing... the next day, the filters started behaving correctly. I changed nothing, I just ran the report and it showed the data according to how the chart filters were set. So I switched them back to their correct selection and carried on.

    However, I then noticed that the "General" chart was only displaying a day's worth of data (Monday, specifically), rather than all five weekdays. Again, these are identical charts (copied/pasted) with the exception of the filter, and the table I added for validation shows data for all five days under General. The CVOR chart was working fine. On a whim, I tried adding a second group (technically a first group, I placed it before the existing day of week group) that groups on type (CVOR vs General, the same field I'm filtering on). With that new group in place, all five days suddenly appeared. I removed the group, only Monday appeared. Put it back, all five days. Craziest thing.

    So I'm shipping it that way. At least it works. But I have to say, having worked with Crystal Reports for 25 years, my recent introduction to SSRS has not blown me away. This thing is awkward, limited, and buggy. Maybe I can find a CR job out there somewhere...

    -----
    a haiku...

    NULL is not zero
    NULL is not an empty string
    NULL is the unknown

  • ronmoses@gmail.com - Wednesday, February 13, 2019 12:52 PM

    sgmunson - Wednesday, February 13, 2019 12:42 PM

    Are you sure that the filters are coded for = as opposed to <> ?

    Absolutely sure. Here's the weird thing... the next day, the filters started behaving correctly. I changed nothing, I just ran the report and it showed the data according to how the chart filters were set. So I switched them back to their correct selection and carried on.

    However, I then noticed that the "General" chart was only displaying a day's worth of data (Monday, specifically), rather than all five weekdays. Again, these are identical charts (copied/pasted) with the exception of the filter, and the table I added for validation shows data for all five days under General. The CVOR chart was working fine. On a whim, I tried adding a second group (technically a first group, I placed it before the existing day of week group) that groups on type (CVOR vs General, the same field I'm filtering on). With that new group in place, all five days suddenly appeared. I removed the group, only Monday appeared. Put it back, all five days. Craziest thing.

    So I'm shipping it that way. At least it works. But I have to say, having worked with Crystal Reports for 25 years, my recent introduction to SSRS has not blown me away. This thing is awkward, limited, and buggy. Maybe I can find a CR job out there somewhere...

    I wouldn't wish that on your worst enemy.   Try changing a data source on a report.   Try using stored procedures.   Then try changing a report to use a new server and different database.   You have to replace every single field on the report that comes from the database.   Total nonsense.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • sgmunson - Wednesday, February 13, 2019 12:57 PM

    I wouldn't wish that on your worst enemy.   Try changing a data source on a report.   Try using stored procedures.   Then try changing a report to use a new server and different database.   You have to replace every single field on the report that comes from the database.   Total nonsense.

    If you mean in Crystal, I do all of those things every day. Changing a data source is CTRL-D-L, and pick the source. Stored procedures work no differently than tables or views in Crystal, with the exception of their parameters. I have never had a problem redirecting the data source on a Crystal report, even pointing a report to a new procedure, and have never had to replace fields after doing so.

    -----
    a haiku...

    NULL is not zero
    NULL is not an empty string
    NULL is the unknown

  • ronmoses@gmail.com - Wednesday, February 13, 2019 1:04 PM

    sgmunson - Wednesday, February 13, 2019 12:57 PM

    I wouldn't wish that on your worst enemy.   Try changing a data source on a report.   Try using stored procedures.   Then try changing a report to use a new server and different database.   You have to replace every single field on the report that comes from the database.   Total nonsense.

    If you mean in Crystal, I do all of those things every day. Changing a data source is CTRL-D-L, and pick the source. Stored procedures work no differently than tables or views in Crystal, with the exception of their parameters. I have never had a problem redirecting the data source on a Crystal report, even pointing a report to a new procedure, and have never had to replace fields after doing so.

    Which version are you using?

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • sgmunson - Wednesday, February 13, 2019 1:05 PM

    Which version are you using?

    Crystal XI.

    -----
    a haiku...

    NULL is not zero
    NULL is not an empty string
    NULL is the unknown

  • XI is probably far improved over version 9.   I've been pulling my hair out messing with it in my current contract.   Pain in the tookus.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • sgmunson - Wednesday, February 13, 2019 1:11 PM

    XI is probably far improved over version 9.   I've been pulling my hair out messing with it in my current contract.   Pain in the tookus.

    It's been quite a while since I used v9, so you may be right about that experience. I can definitely say none of that is a factor in XI.

    There are two things I miss most about Crystal (and I realize we're way off topic now). One is named formulas. Opening a report and seeing a cloud of <Expr> fields gives me a migraine. I realize they can be given a display name in the properties (took me a while to figure that out) but none of my predecessors seem to have known about it, or they didn't care to take the time. The other thing I miss is the ability to make edits in preview mode. It's so much more convenient to make tweaks when you're looking at the actual result, rather than going back to design, making your best guess, inputting the parameters again for the two-dozenth time, and hoping you got it right.

    I'll stop venting now. 🙂

    -----
    a haiku...

    NULL is not zero
    NULL is not an empty string
    NULL is the unknown

  • ronmoses@gmail.com - Wednesday, February 13, 2019 1:21 PM

    sgmunson - Wednesday, February 13, 2019 1:11 PM

    XI is probably far improved over version 9.   I've been pulling my hair out messing with it in my current contract.   Pain in the tookus.

    It's been quite a while since I used v9, so you may be right about that experience. I can definitely say none of that is a factor in XI.

    There are two things I miss most about Crystal (and I realize we're way off topic now). One is named formulas. Opening a report and seeing a cloud of <Expr> fields gives me a migraine. I realize they can be given a display name in the properties (took me a while to figure that out) but none of my predecessors seem to have known about it, or they didn't care to take the time. The other thing I miss is the ability to make edits in preview mode. It's so much more convenient to make tweaks when you're looking at the actual result, rather than going back to design, making your best guess, inputting the parameters again for the two-dozenth time, and hoping you got it right.

    I'll stop venting now. 🙂

    You and I are definitely on the same page.  That editing in Preview mode is wonderful, and saves tons of time, even over SSRS.  However, there are just too many problems with Crystal in terms of both cost and "challenges" that aren't worth the trouble for me to recommend it any more.   Whenever there are formula fields, I just translate those into SQL and include them in the stored procedure so that they are part of the data.  Haven't run into too many that couldn't be translated.  Last time I saw that problem was 20 years ago.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply