Changes between Initial Version and Version 2 of Ticket #12837


Ignore:
Timestamp:
Aug 3, 2016, 12:45:08 PM (8 years ago)
Author:
Jun Omae
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12837 – Description

    initial v2  
    1 I'm attempting to use dynamic variables in one of my reports however when I submit the report the variable is converted into %s
     1I'm attempting to use dynamic variables in one of my reports however when I submit the report the variable is converted into `%s`
    22
    33Here's the SQL query i'm attempting to run on the report:
    4 
     4{{{#!sql
    55Select * from openquery([redacted_server], '
    66
     
    2121FROM [teststand].[dbo].[STEP_RESULT]
    2222WHERE [UUT_RESULT] = $UUT_ID')
    23 
     23}}}
    2424When attempting to run I'm given the following error:
     25{{{
    2526ProgrammingError: ('42000', "[42000] [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Incorrect syntax near '+'. (102) (SQLExecDirectW); [42000] [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Statement(s) could not be prepared. (8180)")
    26 
     27}}}
    2728Which refers to the following:
     29{{{
    2830WHERE [UUT_RESULT] = '+%s+'')
    29 
    30 Even if I make a new report and just put $VALUE, it'll come out as %s regardless of what the URL variables are set to. The default dynamic variable of $USER also gets converted to %s.
     31}}}
     32Even if I make a new report and just put `$VALUE`, it'll come out as `%s` regardless of what the URL variables are set to. The default dynamic variable of `$USER` also gets converted to `%s`.
    3133
    3234I'm not too sure how the internals of MsSqlBackendPlugin works but it looks like it's incorrectly being parsed however any insight as to how I can fix this would be very much appreciated.