Jump to content
We've recently updated our Privacy Statement, available here ×

andrewsok

Members
  • Posts

    38
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Posts posted by andrewsok

  1. Caleb,

     

    Look at DefaultParametersForm.jsp page, or ReportTopParametersForm.jsp if you use "top of the page" settings. The page defines how Input Controls render.

    To implement search, you will need to add server logic as well.

  2. I am not sure what kind of help you are looking for... But let's see what options you have:

    1) You leave you views, you create reports in iReport and deploy them in JS
    Pros:
    - the process is straight forward
    Cons:
    - you leave views -> maintenance and possibly inherited mess in queries
    - need to use iReport

    2) You leave views, and create domains on top of them (threat them as tables)
    Pros:
    - all work in JS UI
    - may take advantages of domains (security, business view structure, data strategies, etc.)
    Cons:
    - you leave views -> maintenance and possibly inherited mess in queries

    3) You create domains from scratch, and map all your views to derived table by just copying your view queries there
    Pros:
    - a single maintenance point (domain)
    - a possibility for incremental clean-up (you don't have to do everything at once)
    Cons:
    - some extra work is involved

    4) You create domains from scratch, and create a new structure for your needs based on tables
    Pros:
    - a single maintenance point (domain)
    - you get it all fresh and clean
    Cons:
    - more extra work is involved

    As of best practice, it depends on your priorities.
    The quickest thing would probably be (2).
    The progressive thing with reduced risk would be (3).
    The getting it right (at expense of time and efforts) would be (4).
    And if you are not confortable with domains, (1) is there for you.

    Thanks,
    Andrew S.

  3. The config file applicationContext-semanticLayer.xml declares all functions that DomEL supports.

    There is "if" functions there :

                    <entry key="if">

                        <value>"case when (" + sqlArgs[0] + ") then (" + sqlArgs[1] + ") else (" + sqlArgs[2] + ") end"</value>

                    </entry>

    If you call "if(f1, f2, f3)", f1 would be your condition field (boolean), f2 is the field reference to be used then f1==true, and f3 is the field to be used when f1==false

    Your requirement would look like following :

    you declare SalaryBand field and assign an expression 

    if("Empoyee"."Salary" < 10000, 'Low', if("Empoyee"."Salary" < 40000, 'Medium', 'High')) 

  4. Timestamp with time zone is not a standard JDBC data type, therefore you need to add it in applicationContext-semanticLayer.xml, bean jdbcMetaConfiguration, entry OTHER (where NVARCHAR2 is declared).

    If you have problems finding out the vendor type name, please, paste here the exact table create SQL script which shows all types, and I will try to recreate it and tell you the name.

  5. Here is result on my sample tables:

    SYN_CLOBTABLE
      ID : 3 : NUMBER
      TEXT : 2005 : CLOB
    SYN_MZHOU
      ID : 3 : NUMBER
      COL1 : 1111 : NCHAR
      COL2 : 1111 : NVARCHAR2
      COL3 : 12 : VARCHAR2
      COL4 : 12 : VARCHAR2

    It looks like your result does not show fields. By exception you get, it might be the case where you have some special characters in the field names which are not compatble with JDBC drver. Unfortunatelly, JDBC is the only way JS may get the metainfo from the DB, and if driver does not support something, nothing we can do on JS side...

  6. Actually, the point of exercise was to see fields, not tables. The setIncludeSynonyms(true) affects only fields.

    Example of properly working driver :

    TABLE1
      FIELD1
      FIELD2 
    TABLE2
      FIELD1
      FIELD2   

    Example of problematic driver :

    TABLE1
    TABLE2
     

    In later case fields do not show up.

    When you ran the mini app, did you see fields?

     

  7. I am now sure what your developer skills are, but let me try...

    To separate JS issues from Oracle issues, could you take the attached zip, unpack, comlipe and run the sample app against your oracle with your driver, and see it if shows all synonym tables and fields properly? This way we will make sure JDBC works as it is supposed to.

    The line setIncludeSynonyms(true) is what we call when you set the config option into true.

  8. linvicch
    Wrote:

    my synonyms table works BUT

     NOW my non Synonyms table doesn't work throwing me the error

    At present time tables which doesn't contain any columns are not supported.

    Following empty tables will not be added

     

     

     

    I cannot reproduce this on my 10.2.0.1.0..

    Could you provide as much info as you can, such as

    - DB version

    - JDBC driver version

    - create table and synonym scripts

    - possibly related messages in JS log

  9. linvicch
    Wrote:
     

    By slow in performance, what will that affect?

    Does it affect the performance of future query or only on initial setup?

    This is about getting metadata (table/column names/types) performance.

    It does not affect query execution performance but slows down the how system resonses to user in domain designer where JasperServer has to wait for oracle JDBC driver. For example, user expands table node to see columns, and it may easily take 5 seconds to open it, and all time is spent in the driver method (actually, in DB itself).

  10. Because Oracle decided to not show columns on synonym tables by default (JDBC driver performs very slow on this operation), you have to enable it in the configuration before using:

    applicationContext-semanticLayer.xml:

    ...

    <property name="includeSynonymsForOracle">

    <!-- set 'true' if you use Oracle synonyms in Domains -->

    <value>false</value>

    </property>

     

    Set the property vale to "true" and restart the server.

     

  11. This URL does not present WebServices interface.

    It gets handled by a normal HTTP Servlet (see web.xml).

    The functionality is provided by Mondrian, and it does not support GET method.

    Could you post more details where you get the exception (stack trace, etc.)?

  12. I have changed the type to TIMESTAMP(9). It still works for me.

    One note though.. I see you are using the filter:

    <queryFilterString>DATETIME > '01.03.09'</queryFilterString>

    It should really be like this:

    <queryFilterString>DATETIME > d'2009-03-01'</queryFilterString>

    The format mask you provide in the call as parameter is for returned (and displayed) dates.

    Query filter has to use a domain expression language convention, which is d'yyyy-mm-dd' for date and ts'yyyy-mm-dd hh:mm:ss[.fffffffff]' for date-time.

     

  13. I created two identical tables with two fields each on Oracle:

      ID NUMBER(19) NOT NULL,
      DATETIME DATE NOT NULL

    Then created a domain which these two joined on ID.

    I could not reproduce the problem. I can successfully request the metadata through WS, as well as run domain query against this domain.

    I would like to reproduce the case you have. Please, look at my example, and tell what is different in yours.

    Thanks,

    Andrew S.

  14.  You can use String for visible parameter, and show your available dates from the DB, and then have a second hidden parameter which you use for the report query:

    <parameter name="P_DateString" isForPrompting="true" class="java.lang.String" />

    <parameter name="P_Date" isForPrompting="false" class="java.util.Date">

      <defaultValueExpression><![CDATA[new java.text.SimpleDateFormat("--your--pattern--").parse($P{P_DateString})]]></defaultValueExpression>

    </parameter>

    P_DateString is what InputControl sets up, and P_Date is what you user in your SQL query.
  15. pw1971,

    For the type conversion you may use groovy as well :

    <filterExpression>OwnerID in (groovy('new Integer(authentication.getPrincipal().getTenantId()'))</filterExpression>

    Your tenantId though needs to be a string representation of an integer, i.e. '123' is Ok, 'My123' is not (again, you may use groovy substring(), etc. functions to extract numeric portion of id for the filter).

     

    rmukkamalla,

    1) No, it returns whatever type is, for example groovy('123') will return java.lang.Integer(123)

    2) Attributes are name-value pairs, lets say you have name:MyNumbers and value:10,20,21,11,13, then you do:

    <filterExpression>userId in (groovy('authentication.getPrincipal().getAttributes().find{ it.attrName == "MyNumbers" }.attrValue'))</filterExpression>

     

    Andrew S.

     

  16.  Dynamic values are available in filterExpression since v.3.5 (released recently).

    In 3.5 you can do the following:

     

    Code:



    Post Edited by Andrew Sokolnikov at 04/08/09 22:02



    Post Edited by Andrew Sokolnikov at 04/08/09 22:03
  17.  I am not sure whether you posted a full version of your security file, or just part of it, but it is incorrect from XML and XSD point of view (which very likely is what is causing the error).

    Here is the valid version, please, try it.

    Code:
    <securityDefinition xmlns="http://www.jaspersoft.com/2007/SL/XMLSchema" version="1.0" itemGroupDefaultAccess="granted">  <resourceAccessGrants>    <resourceAccessGrantList id="JoinTree_1_grantList" label="aLabel" resourceId="JoinTree_1">      <resourceAccessGrants>        <resourceAccessGrant id="JoinTree_1_grant">          <principalExpression>authentication.getPrincipal().tenantId != null</principalExpression>          <filterExpression>TableName.OwnerID in (groovy('authentication.principal.tenantId.toUpperCase()'))</filterExpression>        </resourceAccessGrant>      </resourceAccessGrants>    </resourceAccessGrantList>  </resourceAccessGrants></securityDefinition>
×
×
  • Create New...