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

dprogrammer

Members
  • Posts

    171
  • 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

Everything posted by dprogrammer

  1. Dear Folks, I know iReport 3.1.1 does not have this popup anymore which is very disappointing as it was a very handy way of setting propoerties of fields etc very quickly. However, I am also not able to find properties like 'Same Height', 'Same Width', 'Same Size', 'Align Bottom', Align Top'. Anyone has any ideas please? Thanks in advance
  2. Hi, If it's possible for you, you can do that in query. If yes, I can post some sample code. Regards,
  3. You can try filtering it in your query's WHERE clause. Something like Select .... Where TOTAL_SALESMeasure<>0
  4. How are you linking the sub-report with the main report? Or you can try: -Create a parameter in sub-report, say $P{subResule} -Right click sub-report from the main report, go to tab 'Subreport'. Where you will see a button to add a parameter link. There you can link sub-report parameter to main report's field that contains 'Resule' value. Hope this helps.
  5. Easiest way would be to place three texts with three colors (black, orange, and red) on top of each other. Then write a suppression expression (in Print when expression box) for each something like following: $F{PCT} is 0 to 50 Boolean.TRUE (Black) $F{PCT} 51 to 75 Boolean.TRUE (Orange) $F{PCT} >76 Boolean.TRUE (Red)
  6. Hi, Can someone share how are parameters passed from sub-report to master report? I have a variable in sub-report REPORT_COUNT. I want to pass it to main report and use it in an expression. Currently I am doing this but its not working. Subreport properties --> Suberport (other) tab--> Subreport return values tab, and linked the REPORT_COUNT variable of subreport with a new declared variable of master report (Destination variable)but the value is coming up blank in master report. Thanks in advance.
  7. I did that. I changed Default Expression language to Groovy. I stil don't see the whole total correctly. It appears as null. If I have to apply casting again even after use of Groovy then what is the advantage of using it?
  8. I don't know why Java is so hard when it comes to type casting. I have few numeric fields of type BigDecimal. When I try to add them together and if one of them is null, the whole total also shows as null. So. I try to evaluate each field before addition like this: $F{QTY1}.equals(null)?0:$F{QTY1} The error I get is: Incompatible conditional operand types int and BigDecimal I even tried using: $F{QTY1}.intValue().equals(null)?0:$F{QTY1} but got error: Cannot invoke equals(null) on the primitive type int Any ideas to save my frustration? Post Edited by dreporter at 09/02/2009 15:52
  9. Where can I find the "page break element"? I am using iReport version 1.2.8. Thanks,
  10. Hi everyone, I have a main report and a sub-report with a Xtab. I have placed the sub-report in a group header1 section of my main report and I have increased the height of the group header1 section to allow the whole sub-report to print on first page. I have another Group header2 section (second group) on main report. I have enabled 'Start on new page' option on it to force a page break after sub-report. Desired: I want the first page to show only sub-report, if sub-report is empty ,I should see a blank first page. The details section should always print on next page. The problem: Currently when sub-report has data, then everything is fine and all things print in their correct sections. But when sub-report is empty, the details from next page print on first page, which I don't want. The page break doesn't seem to be working. Question: Is there a way to force a page break after the end of sub-report? OR Is there a way to keep the height of the section which contains sub-report a constant? Kind of it never shrinks? Forgot to mention the version of iReport is 1.2. Thanks. Post Edited by dreporter at 09/01/2009 15:01
  11. Hi Sedef, If you want to make your report cells to be smaller, just shrink the field widths and also move the vertical lines. Another option would be to write your query as a pivot query. Search for key word 'pivot query' and you should find many examples. Once query is designed you can just drop the fields on the report, without creating and formating cross tabs, and you should achieve your format.
  12. Hi, Ihave a date parameter of format 'yyyy-mm-dd', I would like to subtract month from it. For example: If Date = '2009-08-01', then I would like to pass it as '2009-06-01'. I don't see any function in iRepor 1.2, any ideas please?
  13. Hi, Does anyone know if iReport 3.1 is backward compatible with v1.2.x? I have several reports in older version that I want to convert to v3.1. Thanks
  14. Hi, can you provide some more information? Do you want to repeat same subreport 25 times? What section and will the data of sub report change or its static?
  15. Hi, I have a string parameter that will pass a datetime string value as follows. I need to create a dynamic WHERE clause and format that datetime string value and conver it to date. 2009-01-01"t"13:00:00 -given value in the parameter say $P{DTvalue} My dynamic Where clause parameter that I am adding after my Select statement: //Select * From TableQ $P{DynamicDTValue} " Where Start_Date=to_date(" +$P{DTValue}+", 'yyyy-mm-dd"t"hh24:mi:ss')" The problem I am having is the double qutoes surrounding t are causing error: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: 1. Syntax error on token "t", * expected value = (java.lang.String)(" Where Start_Date=to_date(" +((java.lang.String)parameter_DTValue.getValue())+", 'yyyy-mm-dd"t"hh24:mi:ss')"); I must need the double quotes to work it correctly. Any ideas how can I pass the string with double quotes to t ?
  16. Hi, I have a cross tab report with following elements: Two row groups, vs. Code, Name One column group, vs. Period One details, vs. Price I have a group on Code in my report also and xtab is in the group footer of Code and resets at each Code. When I run the report for one Code, it runs fine and shows expected results, but when I run it for multiple codes, it shows multiple instances for same Code, as if its ignoring grouping. For exp: If I run it for Code 1001 and 1002, I see each Code repeating multiple times and so is the xtab. I know i have not provided enough information as its very hard to write all details here, but if you can guess what issue I am having and you are able to suggest something, I will really appreciate it. thanks in advance.
  17. Hi, try to test with different font types. like Arial or Arial Unicode MS.
  18. Thanks Vishal. But I dont' think we can write a loop expression in iReport? Can we? There must be an easier way to split the string. This is very common feature in almost all programming languages and reporting tools.
  19. I am using split function as follows. It only works if the number of elements in a string is equal to [ ] index. But if I increase the index to [4] but keep the string same ,it throws an error "java.lang.ArrayIndexOutOfBoundsException: 4 ". Below is just a sample string and in actuality a field will be replaced with the string "abc...". Since the field may contain from 1 to several elements, I am not sure how to dynamically use split function there. Thanks in advance for your valuable input. ("abc;def;ghi;jkl").split(";")[0] +"\n\r"+("abc;def;ghi;jkl").split(";")[1] +"\n\r"+("abc;def;ghi;jkl").split(";")[2] +"\n\r"+("abc;def;ghi;jkl").split(";")[3] -- untill here works fine with the given string +"\n\r"+("abc;def;ghi;jkl").split(";")[4] -- with addition of 4 (5th line) in index it throws error
  20. I have a xtab that if I place in a group footer or summary sections, works fine, but throws above error if i place it in a group header. Any ideas how can I make it to work for a group header? I am using 1.2.x version of iReport. Thanks in advance.
  21. I have a prameter that will have values like (1234,1235,1236) passed from users. I need to add single quotes to it and then pass it to my query. The single quotes should make it like : ('1234','1235','1236'). How can I do this? For now I am asking end users to enter single quotes to each values but I find it a limitation and need to find a better solution for it. Any ideas please? I am using v1.2.xx. Thanks,
  22. You can create a parameter and use it in Order by clause of your query to sort on it . The parameter doesn't need to accept input, you can hard code field name etc that you want to sort with.
  23. nevermind, I found function IsEmpty() which works fine in my case. Thanks
  24. I have a parameter1 that may be blank in some cases. So I have another parameter2 which wants to check if the parameter1 is blank, then it will say 'All' else parameter1. I have tried following but its not evaluating correctly. $P{parameter1}.equals("")? 'ALL':$P{parameter1} $P{parameter1}==""? 'ALL':$P{parameter1} $P{parameter1}==null? 'ALL':$P{parameter1} Any ideas please?
×
×
  • Create New...