Jump to content
Changes to the Jaspersoft community edition download ×

kkriplani

Members
  • Posts

    240
  • Joined

  • Last visited

Community Answers

  1. kkriplani's post in Default checking of all checkboxes for a Multi-Select Query Input Control was marked as the answer   
    Hi,
    Okay i seemed to have found a solution, give it a try.
    All you have to do is as follows;
    1) keep the default expression of the parameter fetching value from multi-select Input control as blank, i.e, insert no values.
    2) And keep the multi-select input control as non-mandatory.

    The behaviour of multi-select that I observed was, non of the boxes will be checked but the query would pass the value as :
    "where 0=0"
    That means, all the selections are considered. 

    Regards,
    KKriplani
  2. kkriplani's post in Can Jasper do this? was marked as the answer   
    Hi,
    JasperServer has a functionality of retirieving the logged in username.
    Just create a parameter as $P{LoggedInUsername} . This parameter retrieves the logged in username used and you can create a conditional parameter using this value.

    Read this link to know more about Conditional Parameters.

    Hope this helps,
    KKriplani
  3. kkriplani's post in Rus Language in Jasper Server was marked as the answer   
    Hi,
    When you login, under the login credentials selection, there is an option of "show locale & timezone".
    There isnt russian in that section so this is going to be tough as even if you create a new locale as russian (which for your information is done at  applicationContext-security.xml within <tomcat>/jasperserver-pro/WEB-INF), you will have to define various config files at <tomcat>/jasperserver-pro/WEB-INF/bundles. Even if you dont create new files, the en_US locale files will be picked by default.
    So its of no use if you dont have the right files deployed for the the new locale created.

    Read page 152 from this guide shared here >> http://community-static.jaspersoft.com/sites/default/files/docs/jasperreports-server-admin-guide.pdf?_ga=1.213488466.777635134.1461570079

    To sum up, you would need to deploy the lanuage specific file in <tomcat>/jasperserver-pro/WEB-INF/bundles , with the below format; 
    <file-name>_<locale>.properties|
    and then call the same locale with applicationContext-security.xml (around line 146) within <tomcat>/jasperserver-pro/WEB-INF

    Regards,
    KKriplani
  4. kkriplani's post in Axis label showing full upon mouse hover was marked as the answer   
    Alright.
    Follow these steps;
    1) Stop tomcat.
    2) At the path; <tomcat-directory>webappsjasperserver-proWEB-INFclasses
       add the property anywhere in the file, jasperreports.properties as stated below;
                   com.jaspersoft.jasperreports.highcharts.function.properties.allowed=true
    3) Delete work and temp folder from the tomcat-directory and restart tomcat.
    4) Now using ireport designer / jaspersoft studio, set the advanced property for the chart as;
                  
                                  xAxis.labels.formatter    (Use an expression)
                                "function(){return this.value.toString().substring(0, 5);}"

     
    Here, I am displaying just the first 5 letters of the X Axis label, you can modify as per your choice.

    Regards,
    KKriplani
     
     
  5. kkriplani's post in BigDecimal Currency Money Charts Ireport was marked as the answer   
    Hi,
    This is a long shot but have you tried;
    "R$ " + $F{soma}
    As for the pattern of Soma, you can click on the field and give it a pattern in the property.
    Regards,
    KKriplani
  6. kkriplani's post in Change the Number format as per the parameter pass in jasper report was marked as the answer   
    Hi,
    For any report, there is a parameter named $P{REPORT_LOCALE}
    Your can use this parameter to define the format of the number. The use of a third parameter, lets call it $P{Number_format} , you can define this format as per the locale.

    Hope this helps,
    KKriplani
  7. kkriplani's post in Passing parameter to subreport chart dataset was marked as the answer   
    Hi,
    Passing main report parameters to subreport: left click on subreport and in the properties tab you will find a property named "Parameters". That is where you link the parameters. A better explaination is given here.
    However can you give a better explaination of the second question? What I understand is that you have 5 queries but you are rerunning a few queries for the chart elsewhere in a subreport. Am I right?

    Regards,
    KKriplani 
  8. kkriplani's post in Input Parameters Window was marked as the answer   
    Hi,
    I assume you are trying to see the input parameters when you open a report?

    If so, right click on the report folder, click on properties and then click on other and you will see "controls Layout". Select the desired layout and check the box 'Always Promt" if required.

    Hope this helps,
    KKriplani
  9. kkriplani's post in Colour of Column Header was marked as the answer   
    Hi,
    Left click on the header box, select the background color (property name is "Backcolor") and make sure you have checked the box that says "Opaque". This would set the selected color as the background.

    Regards,
    KKriplani
  10. kkriplani's post in What values do I have to put in XY-line chart? was marked as the answer   
    Hi,
    You would probably need a line chart where you could have the month on X axis, value on the Y axis and different lines showing the value of coffee or chocolate, etc for the respective months.
    Hope this helps,
    KKriplani.
     
  11. kkriplani's post in Evaluation of Expression Error in If-Condition was marked as the answer   
    Try the following format;

    (condition) ? true : false 

    Hope this helps,
    KKriplani
  12. kkriplani's post in add parametrs in dropdown was marked as the answer   
    Hi,

    Within ireports, right click on input controls and create a new input controls. Enter the id and name and click next. Then click on Input Control Details, select the type of input control that you are looking for, example; "Single select query" or "multi select query", depending upon your requirement. Select Mandatory, Read Only or Visible as per your choice.
    Click on Edit Local Resource, enter the id, query and resource.
    Once done, click on save and return on the page and click on Value and Visible Columns and enter what the names of the fields from the query that you want to display in the input control.

    There you go, save and run :)

    Hope this helps,
    KKriplani

    EDIT
    Have you deployed the report on jasperserver?
     
  13. kkriplani's post in Easy way to substitute IN with NOTIN in $X{.....} was marked as the answer   
    IN and NOTIN Clauses
    JasperReports provides a special syntax to use with a where condition: the clause IN and NOTIN.
    The clause is used to check whether a particular value is present in a discrete set of values. Here is an example:
    SELECT * FROM ORDERS WHERE SHIPCOUNTRY IS IN ('USA','Italy','Germany')
    The set here is defined by the countries USA, Italy and Germany. Assuming we are passing the set of countries in a list (or better a java.util.Collection) or in an array, the syntax to make the previous query dynamic in reference to the set of countries is:
    SELECT * FROM ORDERS WHERE $X{IN, SHIPCOUNTRY, myCountries}
    where myCountries is the name of the parameter that contains the set of country names. The $X{} clause recognizes three parameters:
     •Type of function to apply (IN or NOTIN) •Field name to be evaluated •Parameter nameJasperReports handles special characters in each value. If the parameter is null or contains an empty list, meaning no value has been set for the parameter, the entire $X{} clause is evaluated as the always true statement “0 = 0”.
     
    Source: http://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v60/using-parameters-queries
    Using this, you can place the whole condition within a conditional parameter like;
    $P{XYZ} ==1 ? $X{IN, ... , ....} : $X{NOTIN, ... , ...} ;
    Hope this helps,
    KKriplani
  14. kkriplani's post in How to show two subreports in two pages? was marked as the answer   
    Yes it is possible.
    Place the first subreport on top and after the first subreport drag a "page break" and place the second subreport below the page break

    This should surely help,
    regards
    KKriplani
  15. kkriplani's post in Hide a report in Dashboard was marked as the answer   
    I thing there is a way to obtain this requirement through PrintWhen Condition.
     
    For example, I have two Sub-reports within a report, I need to display Sub-report A for superuser and Sub-report B for jasperadmin. I would follow the following steps;
    1) Create a main report with the two subreports superimposed over one another(So either one is displayed at a time).
    2) Give Sub-report A, PrintWhen condition as "$P{LoggedInUsername} == 'superuser' ".
    3) Give Sub-report B, PrintWhen condition as "$P{LoggedInUsername} == 'jasperadmin'".
    4) Drag this main report onto a dashboard.
    $P{LoggedInUsername}  : This parameter would catch the logged in username and has to be created in the report with the type string.

    Hope this help,
    KKriplani
×
×
  • Create New...