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

Teodor Danciu

Members
  • Posts

    5,346
  • Joined

  • Last visited

  • Days Won

    1

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Posts posted by Teodor Danciu

  1. Hi,

     

    From what you are saying I understand you are producing a data set that has the 3 records multiplied by 3, so you end up with a data set that has 9 records in it.

    That is good.

     

    The question is: how do you produce this dataset. Do you have an SQL query? If so, why don't you add a new column to your SQL query in which you specify the group number. You can exploit the extra column in the report by using it as a report field in the expression of a report group.

     

    Having a group break every time that column changes its value allows you to put the CopyN and the SL No fields in the group header section.

     

    I hope this helps.

    Teodor

     

  2. Hi,

     

    You can see how custom query executers can be registered with JR by checking the JR Ultimate Guide at: http://jasperreports.sourceforge.net/JasperReports-Ultimate-Guide-3.pdf

    Also, JR comes with many built-in query executer implementations and you can follow them as examples to make your own. But again, you just need to make one that extends the one we already have in JR and register it, to take control of your reports.

     

    I hope this helps.

    Teodor

  3. Hi,

    We plan to support such a feature in a future release. But first, let ma ask you what is the export format you are targetting with your reports?

    Are you interested mainly in HTML output? What about PDF?

    Are your tabs just a way to assemble together two or more reports that have different content? Or is it a way to split a report into section, like having a separate tab for each data group, something more like an index for navigating faster in the long document?

     

    Thank you,

    Teodor

     

  4. Hi,

    I'd say you could use a custom made SQL query executer that performs a callback and gives you the ResultSet object once it has obtained it. Such a custom query executer could be a subclass of our own JRJdbcQueryExecuter in which you overide the createDatasource() method to put the JRResultSetDataSource instance into the report parameters map for retrieval.

    You need a custom query executer because scriptlets would not help in this case. By the time the first scriptlet event is called, the report would have already consumed the first record in your result set.

    If once you have obtained the result set, you don't want the report to continue, you could have the query executer return an emtpy data source and the report would have nothing to iterate on and thus stop.

    I see that we don't have a getResultSet() method in our JRResultSetDataSource, but we could add it if you log a RFE on trackers. In the meatime, you could add it yourself to get on with your coding.

    I hope this helps.
    Teodor

  5. Hi,

    As daily user of JasperReports Server myself, I was confronted with this problem too. I think the JRS team has worked on this recently as now that I'm using the latest build from JRS SVN trunk, I don't see this problem anymore.

    So I think this is now solved for the upcoming release, later this month. I'm not sure if there is something easy to do for solving this in older releases.

    It's probably not a trivial thing since it took a while to solve it.

     

    Thank you,

    Teodor

     

  6. Hi,

     

    Are you sure using isStretchWithOverflow="true" is not a good solution for you? In most cases, when texts are dynamic and you don't know how long they are, text field height should be let loose using this attribute. You can also group elements in frames or make use of their positionType attribute to manage the transformation of layout due to text becoming larger.

     

    In any case, if you still think stretching text fields are not for you, what about the situation where the text field is much bigger than the text? Should the font size be increased so that we make the most of the available space?

     

    Thanks,
    Teodor

     

  7. Hi,

     

    In that case, what you need is to write a program that creates the report template dynamically, using the JR Library API. You can see thie API being used in the /demo/samples/noxmldesign sample that we ship with the project source files. Also, the great majority of the samples there have an Ant task that produces a Java file that shows the code needed to create the same report template using the API and not JRXML. The Ant task is called "writeApi" and the generated program can be executed using >ant writeApiXml. These should help you understand the API for creating report templates dynamically and not using static JRXML.

     

    I hope this helps.

    Teodor

     

  8. Hi,

     

    You can send us a viewer_uk.properties file attached to a tracker that you post for the JR Library project on this site. We'll review and integrate into future versions.

     

    Thanks,

    Teodor

     

  9. Hi,

     

    It depends on how do you plan to allow changing the columns. Do you want the end user to be able to do that interactively? If so, then you can use the table component that is now shipped in the JR library and has interactive features such as the ability to sort columns, move them, resize them, hide/show them, or even format the values displayed and their headers. The only condition to leverage these features is to deploy reports in HTML format using an interactive report viewer. Such an interactive report viewer can be put together by following the example under the /demo/samples/webapp-repo folder, where a small Web application shows interactive reports.

     

    I hope this helps.

    Teodor

     

  10. Hi,

     

    A Russian translation is already available in the viewer_ru.properties that is part of the JR jar.

    You should be able to see the viewer in Russian if you provide the correct locale on JRViewer instantiation.

     

    I hope this helps.

    Teodor

     

  11. Hi,

     

    If your application is a Web application and displays reports in HTML format, then you need to configure the "image servlet". The images inside the report are delivered to the browser on separate requests made to this special URL that needs to be configured.

    You can take a look at the sample Web application that we ship with JR source code, under the /demo/samples/webapp folder and see how the image servlet is configured there and how the HTML exporter is given the path for the images.

    If you do all this, the name of the image should no longer matter for you as the servlet will deliver them to the browser.

     

    I hope this helps.

    Teodor

     

  12. Hi,

     

    Have you added the HTML component JAR to the classpath of your application that is running the reports? The JAR can be built from the /demo/samples/htmlcomponent either using the >ant jar command.

     

    I hope this helps.

    Teodor

  13. Hi,

     

    Not sure if you are referring to creating report templates dynamically, instead of using JRXML. Or you are referring to creating final documents directly, withouth running them as reports.

    Both are possible and are shown in these two samples in the JR project distro:

    /demo/samples/noxmldesign

    /demo/samples/noreport

     

    If it is indeed about creating JasperDesign report template objects dynamically, then the firts question would be: if it were to use JRXML, how do you plan to cause the page break?

    Were you supposed to use a page break element? Or the isStartNewPage flag of a report group?

    Well, you do the same when the report is created with API instead of JRXML.

    If you do not know how, then create the desired JRXML with iReport or Jaspersoft Studio and have the Java code version of it created for you by replacing the JRXML with yours in one of the JR samples where the "writeApi" Ant task is available.

     

    This Ant task in the sample is supposed to generate the Java code that would create the same report template as the source JRXML found in the sample itself.

     

    I hope this helps.

    Teodor

     

  14. Yes, what makes a data source rewindable is the moveFirst() method, the only method that you need to implement for the JRRewindableDataSource interface. As you saw, after properly implementing that method, the program works as expected.

     

    Thanks,

    Teodor

     

  15. One more thing. A JRDataSource implementation that has the ability to move its record pointer back to the first record when a page break requires the subreport to render again, is called a "rewindable data source" and implements JRRewindableDataSource interface.

     

    I hope this helps.

    Teodor

     

  16. Hi,

    Forget what I asked in my previous comment. I understand now what happens and it should have been obvious for me if I would have looked closer at your PDF.

    Although the content of that record is missing, we can see the rectangle on the right hand side of the page being rendered on the second page.

    This means that the table component is is trying to render again on the second page because on its first attempt it did not succeed as there was not enough space.

    The problem is that when the table component tries to render again its first row on the second page, the rectangle appears fine in the second table column, but the subreport on the first column is trying to iterate again on a data source object that was already exhausted by the first attempt to render it on the first page.

    You see, data sources have record pointer that is moved from one record to the next until the last record is reached and the report/subreport has finished. This way, data source objects are "consumed". If you want to reuse the same data source object again, you need to either recreate the data source object in the expression, or you need to hage a way to move its record pointer back everytime the subreport tries to use it.

    You know better what data sources you have there and how to workaround this situation.

    I hope this helps.
    Teodor

     

×
×
  • Create New...