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

yurish

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

Security Advisories

Downloads

Posts posted by yurish

  1. You are getting pdf file, which is displayed in browser like text-plain.

     

    Try my code:

     

    Code:
    JasperDesign jasperDesign = JRXmlLoader.load(jrxmlDir+jrxml);		JasperCompileManager.compileReportToFile(jasperDesign,fileName);
    InputStream fileStream =new DataInputStream(new FileInputStream(fileName)); JasperRunManager.runReportToPdfStream(fileStream, servletOutputStream, map, dataSource);
    fileStream.close();
    servletOutputStream.flush();
    servletOutputStream.close();

     

    fileName is *.jasper file.

  2. I don't know how to reproduce this. Now i set

    Code:
    Thread.sleep(1000) to my code. Everything is fine. Mb some king of bug, cause i'm not using the last version of JasperReports. Now it is fine. 

     

    Conf of our application is:

     

    Java 1.4.2

    Struts Framework 1.1

    Jasperreports 1.2.8

    iReport 1.2.8

    IE6

  3. If you are using jBoss, you can let him take more memory. I had this error several times, when i have too big amount of data. Add in run.bat -Xmx400m this one. You will let jBoss take 400 mB of memory.
  4. I'm generating reports with runReportToPdfStream method. When i'm debugging, everything is ok, but when i'm just executing my code, i can't get my report(The page cannot be displayed). I discovered, that this thing happens, when my report is very small(4 kB ). Any suggestions, what that might be? With large reports everything ok.

     

    Looks like code in streaming is executing before report runs.

     

    Code:
    jasperDesign = JRXmlLoader.load(jrxmlDir+jrxml);
    JasperCompileManager.compileReportToFile(jasperDesign,fileName);
    InputStream fileStream =new DataInputStream(new FileInputStream(fileName));
    JasperRunManager.runReportToPdfStream(fileStream, servletOutputStream, map, dataSource);
    servletOutputStream.flush();
    servletOutputStream.close();
    fileStream.close();
    File file = new File(fileName);
    file.delete();

     

    variable filename is .jasper file.

     

    Help? :blush: :unsure: :unsure:

  5. aegwyn42, i have one question.

     

    My report is taking data from database. Data is like:

     

    Code:
    ID   Name      Surname      Company
    1 Ralph Schumacher BMW
    2 Michael Schumacher Ferrari
    3 Kimi Raikonnen McLaren
    4 Mika Hakkinen Mclaren
    5 Rubens Barrichelo Ferrari

     

     

    I want my report look like table:

     

    Code:
    [code] |Name|Surname|ID|
    |Company|____|_______|__|

     

     

    For example:

     

    Code:
    [code]Ferrari Michael Schumacher 2
    Rubens Barrichelo 5
    Mclaren Kimi Raikonnen 3
    Mika Hakkinen 4
    BMW Ralph Schumacher 1

     

     

    In my previous reports i uzsed crosstab, but i hadn't data from database in cells, i had count variables, where data was generated by report itself. I tried to use crosstab in this report, but i can't place 3 and more columns in my crosstab(don't know why, i'm using 1.2.8 iReport with JasperReports 1.2.8.). I'm searching for another solution to my problem.

     

    I tried to create a group and reference it to company, but i get something like that:

     

    Code:
    [code]Ferrari Michael Schumacher 2
    Mclaren Kimi Raikonnen 3
    BMW Ralph Schumacher 1

     

    My company field value is changing each time.

     

     

    Please, waiting for your help! Don't know how to thank you...

    Post edited by: yurish, at: 2007/09/17 14:45

  6. I'm trying to make a report with a table, but i have no idea, how to make it!

     

    I tried to do it with crosstab, but there are several problems, which i can't solve. I need as measures 3 variables, which are string variables, and 3 static text headlines. When i'm trying to make it, each row starts with a headlines, which are not needed. I want to write headlines only once in a top of a table.

     

    I tried just to place this 3 fields with borders, but i can't make all row automatically resized, everything i gain is every cell resized depending on it's size. If you can tell me, how to, somehow, group them to one group and make so, that each row is resized, depending on the heighest cell.

     

    Please, help me with some ideas, how to make it. I'm trying since last week to make it. :unsure: :unsure: :unsure: :( :( :( :(

  7. I set following jars in my classpath:

    jasperreports-1.2.8-javaflow.jar

    jasperreports-1.2.8.jar

    jasperreports-1.2.8-applet.jar

    poi-2.0-final-10040126.jar(for Excel)

    commons-beanutils-1.5.jar

    commons-collections-2.1.jar

    commons-digester-1.7.jar

    commons-javaflow-20060411.jar

    commons-logging-1.0.2.jar

    itext-1.3.1.jar

    ojdbc14-10.2.0.3.jar(for database)

  8. Is there some kind of table in ireport, but not a crosstab? I need to make a table, where it will be 3 columns. In crosstab i can make only 2 columns. When i add an extra column in crosstab through crosstab properties, ireport place it under my existing column. Don't know why it is so.

     

     

    So, is there any another table(not a crosstab, but also automatically resizable)?

     

    Or, how to add a column into a crosstab, where a new column will be placed near previously placed columns, but not under them?

  9. I made my pdfstream like this:

     

    Code:
    //sufficient code goes here

    ServletOutputStream servletOutputStream = res.getOutputStream();
    //code for jasperReports like initialising jasperPrint...
    JasperExportManager.exportReportToPdfStream(jasperPrint, servletOutputStream);
    servletOutputStream.flush();
    servletOutputStream.close();

    //code ending
  10. Well, you can just add a clear field, like $F{COMMENTS} and send data via your Java app to that field. Something like this one:

     

    Code:
    public Object getFieldValue(JRField field) throws JRException {
    Object value = null;
    String fieldName = field.getName();

    if ("COMMENTS".equals(fieldName)) {
    value = "usertyped text";
    }

     

     

    Something like this. I'm new to JR, so don't know if it's correct. But idea is like i mentioned.

×
×
  • Create New...