Jump to content
Changes to the Jaspersoft community edition download ×

chetan_33

Members
  • Posts

    32
  • Joined

  • Last visited

chetan_33's Achievements

Contributor

Contributor (5/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. Thanks that worked. But its surprising that $P{} works in where clause or part before order by and so i never looked in such a detail in sample What is the secret behind '!'. Are there any such usage specifics at other places as well I will now go ahead by replacing it with variable defintion which is more manageable So will it also require $V{}?.
  2. Giulio Can this be used to do page breaks by number of records for display on HTML page in a crosstab or any other form(group,subreports,etc)
  3. I am using iReport 1.2.5, jasper set to 1.2.0,SQL Server and have successfully used a parameter as part of the where clause I wanted to conditionally include columns in order by clause (obviously the ones which are selected) but it fails with expressions. So I tried to simply substitute by a parameter with default values provided by iReport but it gives exception as follows java.sql.SQLException:ÂTheÂSELECTÂitemÂidentifiedÂbyÂtheÂORDERÂBYÂnumberÂ5ÂcontainsÂaÂvariableÂasÂpartÂofÂtheÂexpressionÂidentifyingÂaÂcolumnÂposition.ÂVariablesÂareÂonlyÂallowedÂwhenÂorderingÂbyÂanÂexpressionÂreferencingÂaÂcolumnÂname. ÂÂÂÂatÂnet.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365) ÂÂÂÂatÂnet.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781) ÂÂÂÂatÂnet.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224) ÂÂÂÂatÂnet.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628) I have following in my query ....... ORDER BY Name1,VKORG,Name1, PHier2, $P{PARAM_SORT_CLAUSE} ,JAHR, MONAT parameter has value of "PHier3 , MATNR There are 3 more parameter substitutions in whereby clause with which report worked fine till this new parameter is introduced.So cant understand what is 5 in exception. Is there any restriction on parameterising in order by clause and other parts of sql? I am trying to add capability to control sorting on a specific column and the sortorder as assc/desc Appreciate inputs
  4. kjhuebner, lucianc Although I am new to this how about this solution which best fits your need. Y did Lucianc jump to subreport or subdataset? Considering you fetch the data in one go as a array list of array list in a single query with the data in certain columns (like employer, employee) repeating more (Sub reports bring in multiple queries--which affect performance) Then you can use Grouping feature of the Jasper (on employer, employee) and make it display as required I believe the only problem that can occur is if data it contains history for employee task to be displayed as in a crosstab format which can fail. Lucianc can comment more
  5. Sukumesh that Doesn't help completely Check this query of mine http://www.jasperforge.org/index.php?option=com_joomlaboard&func=view&id=626&catid=8#626
  6. Hi All I have other parameters in SELECT part which gets substituted fine so to make rudimentary column sort work I tried with just a simple pre defined string parameter PARAM_SORT_CLAUSE = "PHier3 ASC,MATNR " and query part changed to order by Name1, VKORG, Name1, PHier2,$P{PARAM_SORT_CLAUSE} , JAHR, MONAT It gives me exception as below. Any idea why it is not gettign substituted? Also please answer to above 4 queries since this is not good approach ErrorÂfillingÂprint... java.sql.SQLException:ÂTheÂSELECTÂitemÂidentifiedÂbyÂtheÂORDERÂBYÂnumberÂ5ÂcontainsÂaÂvariableÂasÂpartÂofÂtheÂexpressionÂidentifyingÂaÂcolumnÂposition.ÂVariablesÂareÂonlyÂallowedÂwhenÂorderingÂbyÂanÂexpressionÂreferencingÂaÂcolumnÂname. ÂÂÂÂatÂnet.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365) ÂÂÂÂatÂnet.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781) ÂÂÂÂatÂnet.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224) ÂÂÂÂatÂnet.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628)
  7. Teodord I looked at the sample. UNlike you said -- have isStartNewPage was disabled on the BreakGroup . So how is it starting on new page after 5 records? The group expression will just help it to groups on every 5 records and nothing more. Also you said breaking on group is easy. So does breaking in other forms is complex. My layout is as defined in query at following URL. http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&catid=8&id=311 Although I havent got complete solution to that layout query and just working with the crosstab as in Shipment, I want to know how to do pagination for that or Shipment sample?
  8. I have a report where I want column sorting and so query defined in JRXML with ORDER BY section has a variable whcih acts on input paramters So wanted to know 1>> if this approach is fine or not. 2>> Me workign in iReport but it always moves variable tag after queryTag so is this causing problem for my query. 3>> Is point 2 a bug in iReport? 4>> I was getting "Parameter #8 not set" error if I use the expression of variable below direclty(tried both with and without double quotes) in query. there are only total 5 parameters in query. Can anyone tell me what is going wrong in that case or give me a valid code snippet for that part ################# Order by in Query looks like orderÂby Name1, VKORG, Name1, PHier2,($V{ORDER_QUERY})Â,ÂJAHR,ÂMONAT This variable to return me segment for 2 cols colA and colB basd on inputs as PARAM_SORT_ORDER (user inputs Boolean true or false) and PARAM_SORT_ON (user gives a code like A,B to specify the column header ). So effectively it has to return like colA Asc, colB colA Desc, colB colA , colB Asc colA , colB Desc So for variable ORDER_QUERY its initial expression part is using code like ( "PH3".equals($P{PARAM_SORT_ON}) ) ? ( "PHier3 " + ( (java.lang.Boolean.TRUE==$P{PARAM_SORT_ORDER_ASC}) ? (" ASC,MATNR ") : (" DESC,MATNR ")) ) : ( ("MAT".equals($P{PARAM_SORT_ON}) ) ? ( "MATNR "+ ( (java.lang.Boolean.TRUE==$P{PARAM_SORT_ORDER_ASC}) ? ( " ASC,PHier3" ) : (" DESC,PHier3 " )) ) : ( " PHier3, MATNR ") ) ###################################### But it gives error ]: java.sql.SQLException: Unrecognized SQL escape 'order' at line position 855. at java.lang.Throwable.<init>(Throwable.java) Post edited by: chetan_33, at: 2006/08/04 10:05 Post edited by: chetan_33, at: 2006/08/04 10:13
  9. I will check out the sample you mentioned and post updates. However as a quick update I am interested in breaking every N record on page which can be across groups and not in a specific group as u said. Also I am considering this for crosstab where records span across different row groups How about that?
  10. If anyone knows please reply I need urgent inputs on this I believe this should be possible since jasper is able to give a normal page break based on dimension without cutting the last row!!
  11. I would like to know about any tricks to place Tool Tip on the elements or rows displayed.? Also is there any way by which we can add some metadata to each of the element based upon what type of export format it is .. Like if export is HTML then I would like to add a HTML tags in the textfield and not otherwise?
  12. Hi All, I am eager to know how jasper report fits into a portal environment. I am new to both of this and request all to point to give inputs /any good resource links which explains them. I am not able to understand how following are addressed 1> Hrefs : Typically in a portlet environment the namespace has to be Portlet api is to be used to generate hrefs for managing the namespace in hrefs. So how to prepare the URLS in case of drill down reports where the hrefs are created during fill operation and i think doesnt have access to portal/portlet APIs? 2> Managing personalisation - In portal environment the look and feel is managed through themes and skins. and the report output in HTML should be able to adapt that. I use iReport and from that understand that there are styles that can be defined. But for personalisation to work I guess I need ability to define CSS for elements. So how can it be done... or is there other solution? 3> Are there any other such factors which needs to be taken care of in portal environment for jasper?
  13. Hi All, I working with jasper and ireport 1.2.5 with compatibility set to jasper 1.2.0 and currently working on cross tab report. I see option of Ignore pagination in iReport which when selected gives me all the results without any page breaks. When I disable it there are breaks happening in the report pages as expected. But I would like to know how can i control(in iReport and programmatically as well) the number of Data rows after which the page break can happen. My report is mainly for HTML pages where we normally show pagination like 10/30/50 records per page.In ireport i dont see any such option of defining number of records per page. Also how does it behave when considering data across group, & in crosstabs?
  14. Hi All, I want to implement column sorting in my Jasper report. User should be able to click a column header, and the report sorts on that column I have a query as a datasource and not able to understand how to get sorting implmented. Please provide inputs on this. Also I am having crosstab and sorting is to be done for crosstab. I see a crosstab property "Data is presorted" but how does it help me?
×
×
  • Create New...