Code Works, Report Doesn't

This is a question for any experienced developers and coders out there. Our system has a custom report. A a part of our upgrade testing, we noticed that some of the numbers didn't make sense. If I run the command code in SSMS as a new query, the numbers are correct...Why would the report in Tessitura give different results than the command code in SSMS? I'm completely stumped.

Parents
  • Joshua,

    This is a bit of a complex question, but let us start with some basic things.  It sounds obvious, but one of the main reasons a database run could produce different results than a database run is if the inputs you think you are giving it do not match up exactly.  You could run a trace to verify that the report parameters are in fact matching those that you are running in the command code in SSMS.  If there are any differences, then start there.

    If there are no differences, the next step is to check if the data is being weirdly manipulated inside of the report output (e.g. in Visual Studio or InfoMaker).

    If you can verify that neither of those two things are happening, that would serve as a good starting point for further investigation.

    John

  • Hi John,

    Thanks for the response. So here's what made me start banging my head against the wall. First, there are no user input criteria. My SSMS code is exactly what the report is running (with the few SQL changes like ">" to ">" etc.). When you run the report in Tessitura, it just runs. Also, it is only the two most recent rows of data that are off. Since most of the data is correct, I don't think it is an issue with the Visual Studio report build.

    I'm trying to figure out if there is something different about the two most recent rows since that is obviously where something is going wrong, but I haven't been able to find anything different yet. That's why I'm covering my bases to see if there might be some known issue that could cause this sort of thing.

    I guess I shall just have to keep digging.

  • Well, good luck of course!

    My next suggestion was going to be a control groups or permissions issue.  If your Tessitura user has anything less than system administrator rights, those things can creep in there where you least expect them.

    Additionally, are you using any dynamic SQL in there?  That is always a place that can be wonky when running the database vs. the application, especially if you are referencing the person running the report in any capacity.  Usergroups do not hold through the dynamic SQL.

    Happy to take a look if you want a second set of eyes.

    John

Reply
  • Well, good luck of course!

    My next suggestion was going to be a control groups or permissions issue.  If your Tessitura user has anything less than system administrator rights, those things can creep in there where you least expect them.

    Additionally, are you using any dynamic SQL in there?  That is always a place that can be wonky when running the database vs. the application, especially if you are referencing the person running the report in any capacity.  Usergroups do not hold through the dynamic SQL.

    Happy to take a look if you want a second set of eyes.

    John

Children