Bug while using string parameter values in postgresql query

Hi,
I have the following query for the postgresql database:
Code:
<queryString><![CDATA[SELECT
evt_src_mgr_rpt_v."evt_src_mgr_name" AS esm_name,
evt_src_collector_rpt_v."evt_src_collector_name" AS collector_name,
evt_src_grp_rpt_v."evt_src_grp_name" AS grp_name,
evt_src_grp_rpt_v."state_ind" AS state_ind,
evt_src_rpt_v."evt_src_name" AS src_name,
evt_src_rpt_v."date_modified" AS date_modified,
evt_src_rpt_v."date_created" AS date_created,
CASE WHEN $P{mysortfield} = 'evt_src_mgr_name' THEN evt_src_mgr_name
WHEN $P{mysortfield} = 'evt_src_collector_name' THEN evt_src_collector_name
WHEN $P{mysortfield} = 'evt_src_grp_name' THEN evt_src_grp_name
ELSE evt_src_name END as sort
FROM
"evt_src_mgr_rpt_v" evt_src_mgr_rpt_v
LEFT JOIN
"evt_src_collector_rpt_v" evt_src_collector_rpt_v
ON EVT_SRC_MGR_RPT_V."evt_src_mgr_id" = evt_src_collector_rpt_v."evt_src_mgr_id"
LEFT JOIN
"evt_src_grp_rpt_v" evt_src_grp_rpt_v
ON evt_src_collector_rpt_v."evt_src_collector_id" = evt_src_grp_rpt_v."evt_src_collector_id"
LEFT JOIN
"evt_src_rpt_v" evt_src_rpt_v
ON evt_src_grp_rpt_v."evt_src_grp_id" = evt_src_rpt_v."evt_src_grp_id"
LEFT JOIN
"evt_src_offset_rpt_v" evt_src_offset_rpt_v
ON evt_src_rpt_v."evt_src_id" = evt_src_offset_rpt_v."evt_src_id"
WHERE
$P!{mysortfield} LIKE '$P!{searchvalue}' || '%']]></queryString>
That is I try to select only the records where the field which is
selected by user as report parameter ($P{mysortfield}) contains data
starting with the text entered by user as a report parameter
($P{searchvalue}).
When I try to run the report in iReport with active connection to the
database the report is generated as expected.
But when I try to run the report from Sentinel Log Manager I get the
following error: "java.lang.String cannot be cast to
net.sf.jasperreports.engine.JRValueParameter".
After several detailed debug sessions I finally came into a conclusion
that this error is related to the use of parameter values (
$P!{mysortfield} and $P!{searchvalue} ).
I even tried using the following WHERE clause (which emulates the
queries as used in standart reports (especially at VendorProduct related
SQL queries ) with no success:
Code:
WHERE
($P{mysortfield} = 'evt_src_mgr_name' AND evt_src_mgr_name LIKE ($P{searchvalue} || '%')) OR
($P{mysortfield} = 'evt_src_collector_name' AND evt_src_collector_name LIKE ($P{searchvalue} || '%')) OR
($P{mysortfield} = 'evt_src_grp_name' AND evt_src_grp_name LIKE ($P{searchvalue} || '%')) OR
($P{mysortfield} = 'evt_src_name' AND evt_src_name LIKE ($P{searchvalue} || '%'))
Any suggestions?
hkalyoncu
hkalyoncu's Profile: http://forums.novell.com/member.php?userid=63527
View this thread: http://forums.novell.com/showthread.php?t=450687

bweiner12345;2167651 Wrote:
> I'm not 100% sure the $P! (instead of just $P) is needed in that WHERE
> portion of your SQL statement.
>
> What I would suggest doing is building the WHERE portion of your query
> up again step by step. That is, instead of using any parameters in your
> WHERE:
>
> $P!{mysortfield} LIKE '$P!{searchvalue}' || '%'
>
> ... take a step back and literally hard-code some values in there, such
> as:
>
> evt_src_mgr_name LIKE '%' || '%'
>
> ... and run it on your box to make sure it works fine.
>
> If it works fine, start substituting the parameters one by one:
>
> $P{mysortfield} LIKE '%' || '%'
>
> .... test on the box.
>
> $P{mysortfield} LIKE '$P{searchvalue}' || '%'
>
> .... test on the box.
>
> It may be a little tedious, but at least you'll find out where the
> problem is occurring... and may be quicker in the long run.
>
> (Note: In my above example steps I didn't use the ! in with the
> parameters, as I don't think they are needed in the WHERE clause... but
> I could be wrong... and by following the above step-by-step technique
> should answer that for sure.)
Thank you for the suggestions:
While trying to implement your suggestions I realized that there was a
error at the parameter name I used inside the where clause (it should be
$P{searchfield}).
Here are my results:
Code:
vt_src_mgr_name LIKE '%' || '%'
worked as expected.
Code:
$P{searchfield} LIKE '%' || '%'
produced PDF but wrong output.
Code:
$P!{searchfield} LIKE '%' || '%'
resulted with the error "java.lang.String cannot be cast to
net.sf.jasperreports.engine.JRValueParameter" and no PDF.
Then I tried the following where clause which resulted in exactly as
expected PDF:
Code:
WHERE
($P{searchfield} = 'evt_src_mgr_name' AND evt_src_mgr_name LIKE ($P{searchvalue} || '%')) OR
($P{searchfield} = 'evt_src_collector_name' AND evt_src_collector_name LIKE ($P{searchvalue} || '%')) OR
($P{searchfield} = 'evt_src_grp_name' AND evt_src_grp_name LIKE ($P{searchvalue} || '%')) OR
($P{searchfield} = 'evt_src_name' AND evt_src_name LIKE ($P{searchvalue} || '%'))
As a summary:
* The query which works in iRepord do not work in Sentinel Log
Manager.
* I found a workaround for my case.
* I did not checked, but the reports provided in Sentinel RD which use
the same technique for VendorProduct parameter (i.e. the reports with
query string containing
Code:
LIKE ($P{VendorProduct} || '%')
will most probably not work as expected IF Sentinel RD uses the same
code as Sentinel Log Manager.
hkalyoncu
hkalyoncu's Profile: http://forums.novell.com/member.php?userid=63527
View this thread: http://forums.novell.com/showthread.php?t=450687

Similar Messages

  • Read Query String Parameter Value in SSRS

    Hi,
    We have Project Server 2010 and Sharepoint Server 2010 env and using SSRS 2008 R2 for reporting purpose in Native mode.
    Here I am displaying the SSRS Project report in Project Server page using Report Viewer web part like below.
    Here I want to read projuid query string parameter value (Highlighthed above in URL ) in SSRS by using any way, so that I can pass that
    projuid value in my SSRS report parameter to filter and make this report dynamic.
    Right now I have to select the ProjectName (Label) which passes ProjUID
    as value from the Parameter, but I want it should read the projuid
    from URL so that this reports will display the project the data for the opened Project automatically
    Thanks and let me know in case we can achive this using OOTB or some custom functions.

    Hi,
    For the report parameter, you can get the value from database query or some embedded funcitons etc. or even some customerized function.
    You may consider to create your own code for the report to read the projuid from application or URL. The customer code can be used to get the values from the applicaiton or from the url etc. Then report can call the customer code function to get the value.
    refer link
    https://technet.microsoft.com/en-us/library/ms155798(v=SQL.100).aspx
    https://support.microsoft.com/kb/920769?wa=wsignin1.0
    Thanks,

  • RFC FM using string parameter

    Hi all
       An RFC FM can using string parameter? why i using string pass value ,the destination reciev the value is wrong?
    thanks
    BR
    Chris

    Are you using any std func.. just wanted to chek that there is no internal conversion routine....
    Enjoy SAP.
    Pankaj Singh

  • Error in XSLT mapping while using string functions

    Hi All,
    While using tokenize() and substring-before() functions in XSLT mapping,we are getting an error.The error message is Unexpected symbol "" So while using string functions in XSLT mapping do we have to use any header functions.
    Please through light on syntax etc.,of string functions in XSLT.
    Thanx in advance,
    Lokesh Dhulipudi
    Edited by: LOKESH DHULIPUDI on Dec 27, 2007 7:32 AM

    Hi,
    Hope you have gone thru this help:
    http://w3schools.com/xsl/default.asp
    Rgds, Moorthy

  • JRC bug: apostrophe in string parameter passed to Crystal Report with Command datasource to SQL Server

    Post Author: nl11087
    CA Forum: JAVA
    A single quote/apostrophe in string parameter passed to a Crystal Report with Command datasource connecting to a SQL Server database, using sqljdbc driver does not escape the special character correctly. When doing a preview in the Crystal Reports IDE it allows you to escape the input parameter as expected and work correctly, but through the JRC component it fails. For string parameters without special sql server characters I experience no problems at all. When replacing the Command with a direct table there is also no problem.
    Reproduction:
    1. create a database db1, create a table table1 with a String type column col1.
    2. Create new report Report1.rpt, create a connection to above, Add Command using 'SELECT col1, col2, col3 FROM table1 WHERE col1 = '{?Par1}' . Add a parameter field Par1 : String
    3. In your java stand alone application using JRC add the parameter Par1 with a value "Jon Doe's Value" containing a single apostrophe. Export to PDF. (I also tried MSWord and this failed too, similar behavior). Additionally, in another test try to replaceAll("'","''") to escape it, preventing the code to break, but now it does not retrieve the expected row anymore and you end up with an empty report.
    Exception StackTrace:
    com.crystaldecisions.reports.exportinterface.exceptions.ExportException: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
    at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
    at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)
    Caused by: com.crystaldecisions.reports.formatter.formatter.c: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.if(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.l.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.p.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.p.a(Unknown Source)
    at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
    ... 17 more
    Caused by: com.crystaldecisions.reports.dataengine.be: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.nr(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.bn(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.bp(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
    at com.crystaldecisions.reports.dataengine.s.a(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.aa(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
    ... 23 more
    Caused by: com.crystaldecisions.reports.reportdefinition.datainterface.n: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.reportdefinition.datainterface.p.a(Unknown Source)
    ... 35 more
    Caused by: com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.queryengine.driverImpl.o.eC(Unknown Source)
    at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.ea(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.h(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.dV(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ax.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ae.cy(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ae.cz(Unknown Source)
    at com.crystaldecisions.reports.queryengine.b1.bc(Unknown Source)
    ... 36 more
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 's'.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement$StatementExecutionRequest.executeStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(Unknown Source)
    ... 48 more
    - JRCAgent3 detected an exception: An error occured while exporting the report
    at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)

    Post Author: nl11087
    CA Forum: JAVA
    A single quote/apostrophe in string parameter passed to a Crystal Report with Command datasource connecting to a SQL Server database, using sqljdbc driver does not escape the special character correctly. When doing a preview in the Crystal Reports IDE it allows you to escape the input parameter as expected and work correctly, but through the JRC component it fails. For string parameters without special sql server characters I experience no problems at all. When replacing the Command with a direct table there is also no problem.
    Reproduction:
    1. create a database db1, create a table table1 with a String type column col1.
    2. Create new report Report1.rpt, create a connection to above, Add Command using 'SELECT col1, col2, col3 FROM table1 WHERE col1 = '{?Par1}' . Add a parameter field Par1 : String
    3. In your java stand alone application using JRC add the parameter Par1 with a value "Jon Doe's Value" containing a single apostrophe. Export to PDF. (I also tried MSWord and this failed too, similar behavior). Additionally, in another test try to replaceAll("'","''") to escape it, preventing the code to break, but now it does not retrieve the expected row anymore and you end up with an empty report.
    Exception StackTrace:
    com.crystaldecisions.reports.exportinterface.exceptions.ExportException: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
    at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
    at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)
    Caused by: com.crystaldecisions.reports.formatter.formatter.c: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.if(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.l.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.p.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.p.a(Unknown Source)
    at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
    ... 17 more
    Caused by: com.crystaldecisions.reports.dataengine.be: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.nr(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.bn(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.bp(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
    at com.crystaldecisions.reports.dataengine.s.a(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.aa(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
    ... 23 more
    Caused by: com.crystaldecisions.reports.reportdefinition.datainterface.n: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.reportdefinition.datainterface.p.a(Unknown Source)
    ... 35 more
    Caused by: com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.queryengine.driverImpl.o.eC(Unknown Source)
    at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.ea(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.h(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.dV(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ax.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ae.cy(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ae.cz(Unknown Source)
    at com.crystaldecisions.reports.queryengine.b1.bc(Unknown Source)
    ... 36 more
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 's'.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement$StatementExecutionRequest.executeStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(Unknown Source)
    ... 48 more
    - JRCAgent3 detected an exception: An error occured while exporting the report
    at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)

  • Syntax error while using the parameter inside the badi method.

    Hello all ,
    I'm writing a code in the badi implementation . The badi is /SAPSLL/CTRL_MM0C_R3 . this badi contains a metthod API_CONTROL_MODIFY.This badi triggers while using MIGO transaction .
    It is having the following parameter .
    IT_MSEG     Importing     Type     SLLR3_MSEG_T .
    SLLR3_MSEG_T is declared as follows.
    TYPES: sllr3_mkpf_t LIKE mkpf OCCURS 0,
                sllr3_mseg_t LIKE mseg OCCURS 0.
    here i have to get the werks value that is populated into IT_MSEG whie doing MIGO .
    I have declared a local variable and assigned werks value from the IT_MSEG to the local variable as follows
    DATA:l_werks type werks.
    l_werks = IT_MSEG-WERKS.     
    But I'm getting the following error.
    "IT_MSEG" is a table without a header line and therefore has no
    component called "WERKS".
    How should i avoid this error. Please give me sample code on how to avoid this error.
    thanks in advance
    pavan

    Hi,
    Move the row from IT_MSEG into a work area and use it. Declare the workarea of required type.
    DATA:l_werks type werks.
    read table it_mseg into wa_mseg index 1.
    l_werks = wa_MSEG-WERKS.
    Regards
    Vinod

  • How to capture a parameter value in SQL QUERY of scale marker using GO URL

    Hi,
    Can any one please tell me how to capture the parameter value from go url inside Where clause of Scale Marker.
    I am trying to sift the position of scale marker based on SQL Query.
    Thanks-Bhaskar Gouda.
    Edited by: 961171 on Sep 25, 2012 12:33 AM

    Since this is a synchronous interface, where source is a soap(proxy) call and target is JDBC in the first mapping both of them are request scenarios.
    Source Structure:
    RootNode
        Request             1...unbounded
           No_of_Days   1.1 String
    Target Structure:
    RootNode
       Statement
         TableName
             Action mapped to SQL_QUERY
            Access -  SELECT DISTINCT AL.EC_NO,DP.DATE_TO_FORMAL FROM T_APPLICATION_LIST AL,(SELECT DE.EC_NO AS "EC_NO", DE.PACKAGE_NO AS "PACKAGE_NO",PC.DATE_TO_FORMAL AS "DATE_TO_FORMAL" FROM DAICYO_ECNO DE,PACKAGECTL PC WHERE DE.PACKAGE_NO = PC.PACKAGE_NO AND PC.DATE_TO_FORMAL > (TRUNC(SYSDATE) - to_number('$No_Of_DAYS$'))) DP WHERE AL.EC_NO IN  (SELECT EC_NO FROM DAICYO_ECNO WHERE PACKAGE_NO IN (SELECT PACKAGE_NO FROM PACKAGECTL WHERE DATE_TO_FORMAL > (TRUNC(SYSDATE) - to_number('$No_Of_DAYS$')))) AND (AL.FAMILY = ''  or  '' is null and AL.FAMILY is not null ) and DP.EC_NO = AL.EC_NO ORDER BY DATE_TO_FORMAL
         Key
          No_Of_Days   1..1 String
    In Return I am expecting a JDBC response from the Oracle Database as:
    Source Structure:
    RootNode
      STATEMENT_response   1...unbounded
         row                               0...undbounded
           EC_NO                        1..1   String
    Target Structure:
    RootNode
      RESPONSE
        row
         EC_NO                     1..1     String

  • Disable SSRS parameter using another parameter value

    Hello, I'm developing using SQL Server 2008 R2 standard edition & I would like to disable 2 parameters (parRestraint and par RestrantPosition) by using another parameter, "Restraint Filters On Off".
    When the user loads the report up, I want the On Off filter to be defaulted to off, and the former 2 params to be disabled, but the default value to be visible for them, which are NDX tuples.
    parRestraint default value =  [Incident].[Incident Restraint].[All] (from MDX dataset)
    parRestraintPosition default value = [Incident].[Incident Restraint Position].[All] (from MDX dataset)
    ANy advice appreciated !

    An additional pierce of information is that the data for the parameters comes from an Analysis Services cube (Restraint and Restraint Position are attributes of the Incident dimension).
    I would like to be able to set a null value for default values of Restraint and Restraint Position parameters, but SSRS won't allow me to do this.
    My code for Restraint default param value
    =IIF(Parameters!IncidentYN.Value = -1,
    "null","[Incident].[Incident
    Restraint].&[UnAssigned]")
    or
    =IIF(Parameters!IncidentYN.Value = -1,
    null,[Incident].[Incident
    Restraint].&[UnAssigned])
    Both example fail. I think that this could be achieved with a relational database as the data source for the parameters, but need someone to confirm this.
    Thanks everyone.
    Dave

  • Use a parameter value in F4 help / Implement a wildcard F4 help

    Hi,
    I would like to implement a F4 help for a parameter. The user should be able to enter a text to the parameter field hit F4 and get and help screen related to the text he just entered. (pretty much like the F4 help for SE16 or SE83)
    My problem is, that the entered text is not available in the report.
    REPORT SELECTION_SCREEN_F4_DEMO.
    PARAMETERS: filename TYPE localfile LOWER CASE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
      CALL SCREEN 100 STARTING AT 10 5
                      ENDING   AT 50 10.
    MODULE VALUE_LIST OUTPUT.
      SUPPRESS DIALOG.
      LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
      SET PF-STATUS SPACE.
      NEW-PAGE NO-TITLE.
      WRITE: 'Pattern:', filename COLOR COL_HEADING.
    * selection of filenames ...
      CLEAR filename.
    ENDMODULE.
    AT LINE-SELECTION.
      CHECK NOT filename IS INITIAL.
      LEAVE TO SCREEN 0.
    If a value was entered at the selection screen and a break point is set in MODULE VALUE_LIST OUTPUT, value filename is always empty.
    How can the current value of parameter filename be accessed in the program?
    Thanks in advance
    Dominik

    You would have to use a form, with hidden parameters and a method="post". Your Next link could be a submit button, or be a link with an onclick event that submitted the form:
    <c:url var="thisURL" value="homer.jsp"/>
    <form name="iqform" action="<c:out value="${thisURL}"/>">
      <input type="hidden" name="iq" value="<c:out value="${homer.iq}"/>"/>
      <input type="hidden" name="checkAgainst" value="marge simpson"/>
      <input type="submit" value="Next"/>
      <!-- or -->
      <script type="text/javascript">
        function submitIqForm() {
          document.iqform.submit();
      </script>
      <a href="javascript: submitIqForm()">Next</a>
    </form>

  • Dynamically defined GeoRaster theme using WMS parameter values

    Hi everyone,
    In addition to dynamically defining a GeoRaster theme using SQL (which is documented by Oracle), is it possible to somehow access the WMS values of parameters in the WMS query which is accessing the theme? For example, can I grab the BBOX values from the WMS REQUEST and use that in my dynamic SQL statement?
    My goal for doing this is to select the most appropriate pyramid level of the raster imagery given the map scale of the WMS request.
    My other question is when using a GeoRaster theme containing a SQL statement, will the MapViewer WMS engine still automatically select imagery from all and any relevant georaster image that has a portion within the BBOX of the query?
    Cheers,
    MH

    A Georaster object can have pyramid levels, and in MapViewer you can define a pyramid level for a theme. If you define this parameter, then for any zoom level that you render, MapViewer will read the pixels for this pyramid level. Depending on the zoom level, you may be loading unecessary data due to the screen resolution. If you do not define the pyramid level, MapViewer will calculate the actual screen resolution given the query and device windows, and will load the pixels for the pyramid level that is closest to the actual screen resolution, resulting on a better performance.

  • Suspected bug while using whats app

    yesterday, I was downloading a group message sent by one of my group member on whats app,.. out of the 6 messages he sent, 1-4 messages were exactly same what other members in the group received, but the message 5-6 were different compared to the messages received by other group members. In my case, i noticed, instead of actual message sent by my friend,  i received two of the pictures already available in storage of my BB-Z10. these photos were earlier sent by one of my family members on what app and hence were available in the storage of bb-z10. But after this incidence, it appeared as if these photos are also sent by my friend...
    I would like to know... is this a issue with BB-Z10 or the whats app

    Hmmm! When I use the Facebook ap on my iPad the Send button remains in place so long as my keyboard is visible. While im typing my comment the Send button is alwaysvthere. But when I close the keyboard the send button disappears. To me this is a bug. The workaround is to remember to press the Send button before hiding the keyboard. Unfortunately it's not always so easy for this old guy to remember that. ; )

  • Compilation Error while using string (Please help)

    Hi,
    I am using "Sun WorkShop Compiler C++ SPARC Version 5.000". Compiling code which contains a "string variable" throws the following error:
    "/opt/WS5/SC5.0/include/CC/./new", line 32: Error: The prior declaration for ope
    rator new(unsigned) has no exception specification.
    "/opt/WS5/SC5.0/include/CC/./new", line 34: Error: The prior declaration for ope
    rator delete(void*) has no exception specification.
    "/opt/WS5/SC5.0/include/CC/./new", line 36: Error: The prior declaration for ope
    rator new[](unsigned) has no exception specification.
    "/opt/WS5/SC5.0/include/CC/./new", line 38: Error: The prior declaration for ope
    rator delete[](void*) has no exception specification.
    4 Error(s) detected.
    The command used for compilation is :
    /opt/WS5/bin/CC -compat=4 -I/opt/WS5/SC5.0/include/CC -features=%all try.cpp
    Would help if I could get some comments on the above.
    Thanks and Regards,
    M Shetty

    There is a requirement that I use the Workshop 5.0
    compilere with option "-compat=4".
    The program I am trying to compile contains:
    #include <string>
    int main()
    string test = "aaa";
    return 0;
    There is no "string" in "-compat=4". You need to
    do something like this:
    // --- start test.cc ---
    #include <rw/cstring.h>
    int main()
    RWCString test = "aaa";
    return 0;
    // --- end test.cc ---
    CC -compat=4 -library=rwtools7 test.cc

  • Problem while using v$parameter in a package

    Hi.
    I have to get some data from the v$parameter view inside a package but when I compile it, it throws me the error "PL/SQL: ORA-00942: table or view does not exist". However, the schema owner of the pacckage has privileges over that view because when I execute select * from v$parameter outside of the package, I get data without problems.
    I've tried to compile using the names SYS.v$parameter and SYS.v$_parameter, but none of these works.
    Do I need special privileges from sys or something like that? What is the command?
    I also tried this:
    create or replace view oracle_parameter
    as
    select *
    from v$parameter;
    but it showed me the error "Insuficient privileges"
    Thanks.

    The user need to have the privilege explicitly granted not through roles,
    try
    grant select on v_$parameter to user1;also
    create or replace view oracle_parameter
    as
    select *
    from v$parameter;
    but it showed me the error "Insuficient privileges"what's the ORA- error number? Make sure the user has create view privilege as well.
    Edited by: yingkuan on Jan 20, 2009 3:41 PM

  • Uploading reports that use dynamic parameter values

    Post Author: singhal
    CA Forum: Deployment
    Hi,
    I am having difficulty using Crystal Reports Server XI to deploy reports that were made in Crystal Reports XI.
    When I create a report that uses a dynamic parameter listing, I get the follow error when I try to install it onto the server:
    Failed to read data from report file C:\WINDOWS\Temp\myreport.rpt. Reason: Failed to read parameter object
    But if I were to use a static parameter listing, the server will load up the report just fine.  Can you please tell me what I am doing wrong and I need to do to fix the problem.  As many details as possible would be helpful.
    Thanks,
    Back

    Post Author: TAZ
    CA Forum: Deployment
    Does the issue happen with the built in administrator account? I believe this is a permissions issue and the permissions need to be set in business views.
    Regards,
    Tim

  • Using a parameter value as a column name

    Hi,
       I have created an command like this:
    update table1 set [Param.1] = '[Param.2]' where id = [Param.3]
    where:
    Param.1 = COL1
    Param.2 = Hello
    Param.3 = 1 (the primary key I want to change).
    When I run this SQL Action I get the following error message:
    java.sql.SQLException: ORA-01747: invalid user.table.column, table.column, or column specification
       I have double checked the values of my parameters and they are all correct. There is a column named COL1, and its type is varchar2, and there is PK = 1.
       So, my question is: Is it a limitation of xMII (we can not take column names from parameters) or there is a mistake here?
    Thank you in advance,
    Nuno Cunha

    Hi Nuno,
    I see you are trying to perform Dynamic SQL execution in Oracle.
    In order to execute a Dynamic SQL you need to use the following syntax
    EXECUTE IMMEDIATE 'Sql Statement with any runtime params like cloumns, even table names too';
    And I guess you can use an Dynamic Sql only within a PL/SQL block.
    Please refer to the below link for more details
    [Dynamic SQL|http://download.oracle.com/docs/cd/B10500_01/appdev.920/a96590/adg09dyn.htm]
    Hope this helps!!
    Regards,
    Adarsh

Maybe you are looking for