Jump to content

Kannan_S

Members
  • Posts

    28
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Posts posted by Kannan_S

  1. HI All

     

    Is there any way to display the report count in the jasper reports when no jrxml file is used. In the sense we have a java file in which we have a method which would give a design object based upon the fields. Now we need to find the number of records which were retrieved from the database. Should we use the built in variable REPORT_COUNT of the JRVariable interface or the classes JRBaseVariable, JRDesignVariable, JRFillVariable . If we use it how should we use it. Should we use it in an JRDesignExpression .

     

    Please help in this regard...

  2. Hi Jasper Community

    i have a report in which i have sub columns under a column.Please note that i have got an web application and the fields selected are dynamic .so i should design the template dynamically . IS this possible in crosstabs

    If so can some body help me with the code snippets.Is it the right way to put the crosstab in the columnheader section.Please help

  3. thanks for the reply arbitary

    i tried that and ofcourse its working fine. but it really looks awkward when that field size alone gets increased. the other fields of that row remain same.

    i tired even stretch_with_relative_to_tallest_object (i suppose i am right). but its looking bad. particulary in the new page. i came to know that it is an disadvantage of jasper reports. no other way to sort it out?

  4. There is an option to increase or decrease the height of the fields.

    can it be done with the column width.i.e.,

    i have a column name and its data in an aligned manner

    say for example

     

    Name

    --------

    Antony

    Kannan

    John Abraham

    Vijay

    Mark Twain Abraham Vincent

     

    i have got borders for column name in static text and data in fields. Based upon the width of the data the width of the column should either increase or decrease

    and vice versa. if only the mark twain ... name is to be displayed the widht of the field should be similar to the width of the text field. if the data is vijay the width should be automatically reduced .

     

    please help

  5. its great to get the answer from the admin.

    Thanks Teodord.

    i can very well use IS_IGNORE_PAGINATION boolean variable in jrxml,but at the same time i have to show the user only 20 rows.So i have to go for pagination and when exporting to CSV or any other format the field name should not be repeated.i think only any one of the two could be done,both cannot be done simultaneoulsy am i right?

    Post edited by: Kannan_S, at: 2006/10/04 06:35

  6. thanks for the reply lucian.

    but thats not the requirement i was expecting.

     

    the user should see only 20 rows in a view. The user should be presented with page numbers to view the remaining data and at the same time if the user wants to export the data into a csv file,the csv file should not have the headers repeated as each page.

     

    So no other way?

     

    anything as a feature request?

  7. hi watsonx,

    its great to hear that u have shifted to java world

    welcome to java world.

     

    the error compiling the jasperdesign is may be due to the invalid design.

     

    try opening the jrxml or xml file in iReports.

    select view-->dockingpanes-->document structure enable it if it is not.

     

    now u should see a box appearing in the left bottom side of the application.

     

    it will have title,background,pageHeader,pageDetail etc.,

     

    the page detail,pageHeader will have subelements generally

     

    the sub elements are text and field elements.

     

    if u find some elements in red color,then there is an error.

     

    locate that particular element in the design area. It will not show u a blue color.

     

    if it is a text,then it will be red.

    if it is a field, then it will be green.

     

    change the position of the particular element untill its color turn in to blue.

    now try compiling the design.it should work

     

    let me know if there is any problem.

  8. hi all,

    we are into a web reporting project.we make use of jasper reports.its really good to see our reports in jasper reports formats. we have tried to export it into many formats and we have succeeded in doing that.

     

    we are instructed to show only 20 rows per view. we have done that by adjusting the report height.

     

    but we have a problem. The exported file ,say an xls file or a csv file ,they have the headers(field name) repeated ,which we do not require, for every page. Is there any parameter in the JRExporterParameter which will stop or avoid this repitition of field names in every page? Please help

  9. hi all,

    this question was an old question in my mind which arose when i started using ireports some four months back.

     

    The questions are simple.

     

    what are the dimensions used in ireports for designing jasper reports.

     

    the height and width of the reports are in centimeters.

    what is the dimension if we use the scale on the top and left of the design area. what is that dimension?

    is it in inches or centimeters or millimeters.

     

    what is the dimension associated with the height and width of a text or field?(very important)does any body know here...:blink:

  10. i am very sorry to say you all that even after going through the forums i cannot figure out what i have to do for the images to appear in my jsp pages.

     

    the imageExpression has the following code

    Code:

    <imageExpression class="java.lang.String"><![CDATA[$P{BaseDir}+"one.jpg"]]></imageExpression>

     

    the jasper file is successfully created.

     

    the BaseDir parameter is a string which carries the real path say

    c:...webapplicationweb-inf

     

    the following is the code in my jsp

     

     

    Code:
    [code]
    <%
    JasperPrint jasperPrint = (JasperPrint)session.getAttribute(ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE);
    File reportFile = new File(application.getRealPath("/WEB-INF/Image.jasper"«»));

    JasperReport jasperReport = (JasperReport)JRLoader.loadObject(reportFile.getPath());

    Map parameters = new HashMap();
    parameters.put("ReportTitle", "Address Report"«»);
    parameters.put("BaseDir", reportFile.getParentFile().getAbsolutePath()+"\"«»);
    System.out.println("from view"+reportFile.getParentFile().getAbsolutePath()+"\"«»);
    jasperPrint = JasperFillManager.fillReport(jasperReport,parameters);
    session.setAttribute(ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE, jasperPrint);
    JRHtmlExporter exporter = new JRHtmlExporter();

    StringBuffer sbuffer = new StringBuffer();

    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
    exporter.setParameter(JRExporterParameter.OUTPUT_WRITER, out);
    exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI,"../servlets/image?=one"«»);
    exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN,Boolean.TRUE);
    exporter.setParameter(JRHtmlExporterParameter.IS_WHITE_PAGE_BACKGROUND,Boolean.FALSE);
    exporter.setParameter(JRHtmlExporterParameter.HTML_HEADER, ""«»);
    exporter.setParameter(JRHtmlExporterParameter.BETWEEN_PAGES_HTML, ""«»);
    exporter.setParameter(JRHtmlExporterParameter.HTML_FOOTER, ""«»);

    exporter.exportReport();

     

    i do not understand the image concept in a web application.

     

    i will be really happy if i get a proper explanation about the steps to make an image display in an web application. and its really hard for me to understand the given sample web application

  11. Please find that only the field is not getting displayed and other rows are getting displayed when the condition is satisfied.

     

    i need some thing like

     

    select * from csvdatasource where id like '100AD'

     

    so that only the rows in which the field id is like 100AD shall be displayed

     

    now i am getting

     

    100ADxxxx dsfdf
    100ADxxxy sddfd
    -------- dfdfer
    ------- ererer

     

    but i need

    100ADxxxx dsfdf
    100ADxxxy sddfd

     

    only as a seperate report and

     

    null dfdfer
    null ererer
  12. hi friends,

    i have generated a csv file.

    considering this csv file as a datasource i have to generate two reports based on a particular field.

     

    the field name is id. it has only two types of data.

    one is null and the other is 100ADxxxx.

     

    i.e.,

     

    the contents of the csv file is

     

    null,peter
    null,mark
    100AD1234,antony
    100AD3265,george

     

    one report should have

     

    null peter
    null mark

     

    second report should have

     

    100AD1234 antony
    100AD3265 george

     

    i think i should use printWhenExpression in the jrxml file. But i am not clear how to implement that.

    it is an easy task to achieve it in query making use of "like '100AD%'". but i should not do that.

     

    is there any tag like printLikeExpression where by we can find whether the first 5 characters (100ADxxxx)of the data is similar to 100AD so that those data alone can be displayed?

     

    please send me the code or any other good solution.

  13. hi sesha

    thanks for the code.

    i tried your code.

    its clearing the images. but no data is displayed.

    i manually created a file which has

    1,2,3,4,5

    a,b,c,d,e

     

    as data and saved it as a csv file and tried ur code.

     

    but still its not displaying.

     

    can u please help me.

  14. hi alexander,

    thanks for the reply.

    i have checked out all the variables with the JRHtmlExporterParameter and JRHtmlExporter too.

     

    i am sending u the code.if possible can u find where is the problem.

     

    my java code for considering csvdatasource is

     

    Code:

    public class CSVDataSource
    {
    public static JRCsvDataSource getDataSource() throws IOException
    {
    String[] columnNames = new String[]{"VENDOR_NAME","SUB_VENDOR_NAME","REPORT_VERSION","DEA_NUMBER","STATE_LICENSE_NUMBER"};

    JRCsvDataSource ds = new JRCsvDataSource(new File("C:\temp\oc4j_extended\j2ee\home\applications\webapp\webapp\NCPData.csv"«»));
    ds.setRecordDelimiter("rn"«»);
    ds.setUseFirstRowAsHeader(false);
    ds.setColumnNames(columnNames); return ds;

    }
    }

     

    the jsp file is

    Code:
    [code]<%
    String reportFileName = application.getRealPath("/Prescription1.jasper"«»);
    File reportFile = new File(reportFileName);
    if (!reportFile.exists())
    throw new JRRuntimeException("File Prescription1.jasper not found. The report design must be compiled first."«»);
    JasperReport jasperReport = (JasperReport)JRLoader.loadObject(reportFile.getPath());
    Map parameters = new HashMap();
    parameters.put("ReportTitle", "Address Report"«»);
    parameters.put("BaseDir", reportFile.getParentFile());
    CSVDataSource csvData = new CSVDataSource();
    JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,parameters,csvData.getDataSource());
    JRHtmlExporter exporter = new JRHtmlExporter();
    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
    exporter.setParameter(JRExporterParameter.OUTPUT_WRITER,out);
    exporter.exportReport();



    %>

     

    the compilation of the jrxml file is successfull.

    please help me in this regard.

     

    the no.of rows present in the csv file is similar to that of the no of rows of images

    please find the attached file where u can see the web page

    . [file name=Doc1.doc size=90624]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/Doc1.doc[/file]

     

    Post edited by: Kannan_S, at: 2006/09/07 10:40

    Post edited by: Kannan_S, at: 2006/09/07 10:41

  15. hi all

    i am generating a csv file by accessing the data from the database using fileoutputstream and printstream.

     

    i am considering this csv file as csvdatasource.

     

    while trying to generate a report in a web application,i could not view the data in the web page. it is showing images which cannot be opened everywhere for each data.

    Something like the following

     

    x x x x x

    x x x x x

    x x x x x

     

    any hints?

  16. Hi to all,

     

    we are displaying the reports in the browser.the following is the code for displaying the reports.

     

    Code:
    JRHtmlExporter exporter = new JRHtmlExporter();
    session.setAttribute(ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE,jasperPrint);
    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
    exporter.setParameter(JRExporterParameter.OUTPUT_WRITER, out);
    exporter.exportReport();

     

    There is a filtering option used in combo box in a jsp.the user on selecting the values will see the filtered data. the problem is that if the filtered data is very less in number,an closed image is displayed in the page. i think it is having some relation with the height of the report design.

     

    any ways to avoid this image even if the data is less than the given page?

  17. i can help u with

    hsqldb and

    hibernate

     

    the first one is for the sample database,which is not necessary at all

     

    the second one is ,if we are using hibernate for database then that jar is required.

     

    remaining ,i am not aware of

  18. Hi to all.

    my task is to fetch the data from a table and to achieve filtering on two fields.though it cannot be done in jasper viewer,i have used combo box with hard coded values,so that when the user selects a value from the combo box,the value is passed to the filterexpression tag and filtered.

    i have a jsp which gets the value from the user,and passes the value to the filterexpression to generate the filtered data.now the problem is that the data is not displaying when the user views the jsp page for the first time as nothing is passed. i wanna view the whole data first. can u please help it.:(

  19. can any one please explain in detail the syntax of filterExpression,what is what,how the validation is done as soon as a filterExpression tag is encountered?

     

    Is it possible to have more than one filter expression.

    what should i do to have filters on two fields

    Post edited by: Kannan_S, at: 2006/08/28 10:06

  20. hi every body,

     

    i am able to generate a jasper report by using a query.i can view it in jasper viewer. Think of filtering in Microsoft Excel,where we can filter out the data using a combo box(drop down box).Can we implement a similar sort of combo box in the jasper viewer,so that the user can select the required data,and view the report. what should i use to achieve this?

     

    Expecting every one's response at the earliest.

     

    thanks

     

    sorry for double clicking the submit button

    Post edited by: Kannan_S, at: 2006/08/24 14:11

×
×
  • Create New...