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

sergeleo

Members
  • Posts

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

Posts posted by sergeleo


  1. Ok, I solved this dilemma.

     

    Basically, I introduced one extra group. This group should be leading and this group is invisible (i.e. has 0 size for all elements). And bucket expression for this group combines all id's for subsequent groups... So, the crosstab will always have unique values in leading group and it will forse repeat values in subsequent groups... Voila...

    Regards,

    Serge

  2.  

    Hopefully there will be simple solution for my issue.

    I'm having troubles when I'm creating CSV or XLS out of Crosstb. My customer would like to have repeating values in columnGroup and rowGroup, but I can't find any option that will allow me to display repeating values there. My values is always grouped. I tried to set  isPrintRepeatedValues to true for textField, but it didn’t help.

    Ideally I would like to see following:

                                    Group1,Group1,Group1

                                                    Group2,Group2

                                                                    Group3

    Row1                     Data       Data       Data

    Row1,Row2        Data       Data       Data

    But Instead I'm getting:

                                    Group1

                                                    Group2

                                                                    Group3

    Row1                     Data       Data       Data

    Row2     Data       Data       Data

    Regards,

    Serge



    Post Edited by sergeleo at 06/02/2010 06:40 PM

  3. I'm using JRDataSource implementation for my application as well. The difference is that I'm passing data to CrossTab. There was a lot of hickups.

    Anyway, I don't see any groups defined in your report. Could you please try to create empty group for your field and see if it helps. If not, try to put it into summary section.

    Regards,

    Serge

  4. In your HTTPResponse object set ContentType as "application/pdf". Browser will call Adobe plugin to open your document. Make sure that Adobe plugin is installed.

    Also I would reccomend to add followin in HTTPResponse Header:

    addHEader("Content-Disposition",  "inline;filename=YourPDFFileName.pdf");

    It will predefine file name if user will click "Save As"

    Regards,

    Serge

  5. All,

    I finally  resolved my issue with placing Crosstab into Detail section. Maybe my workaround can go to FAQ ot Exmaples...

     

    1. I switched my code to use JasperFillManager.fillReport(JasperReport jasperReport, Map parameters ) method. I'm not passing DataSource through the method parameter.
    2. I'm passing my implementation of JRDataSource as a parameter JRParameter.REPORT_DATA_SOURCE.
    3. Also I created custom parameter "DynamicDataSource" and I'm passing same JRDataSource there.
    4. Inside of my template I defined subDataset and parameter for DynamicDataSource defined by class="net.sf.jasperreports.engine.JRDataSource"
    5. My crosstab placed into Detail section and datasetRun refering to pre-defined subDataset with dataSourceExpression referring to custom parameter "DynamicDataSource"

    So, now my reports displays data in Detail section, and I can get advantage of  use pageHeader, pageFooter and all other sections.

     

    Regards,

    Serge

    Code:
    	protected JasperPrint fillJasperTemplate(JasperReport jasperReport,			JRDataSource dataSource) throws JRException {		// Preparing parameters		// Setting up virtualizer to have only 2 pages in memory and		// rest on file system		JRFileVirtualizer virtualizer = new JRFileVirtualizer(2, System				.getProperty("java.io.tmpdir"));		Map<String, Object> parameters = new HashMap<String, Object>();		parameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer);		parameters.put(JRParameter.REPORT_DATA_SOURCE, dataSource);		parameters.put("DynamicDataSource", dataSource);		return JasperFillManager.fillReport(jasperReport, parameters);	}
  6. Lucian,

    Thank you!!!
     

    I'll set debug for Jasper in my Log4j.

    I'm trying something else for my Crosstab /tools/fckeditor/editor/images/smiley/msn/shades_smile.gif. I'll keep you posted /tools/fckeditor/editor/images/smiley/msn/thumbs_up.gif

    Regards,

    Serge

  7. There is two ways to acheve it.

    #1 Use JasperDesign to build your report in Java.

    #2 (I prefer this) Use Apache Velocity template engine to add columns into your template...

    Regards,

    Serge

  8. I made suggested change and now I have 15 blank pages /tools/fckeditor/editor/images/smiley/msn/whatchutalkingabout_smile.gif

     

    ((net.sf.jasperreports.engine.data.JRBeanCollectionDataSource)$P{REPORT_DATA_SOURCE}).cloneDataSource()

    Regards,

    Serge




    Post Edited by sergeleo at 09/10/2009 07:01 PM
×
×
  • Create New...