[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Excel Export  XML
Forum Index -> Development
Author Message
roesch

Active

Joined: 04/09/2008 12:35:56
Messages: 9
Offline

At the moment i write a managementprogram. In the entrancemask there must be made some informations. After this you could search for entries (filter). The results are listed in a FixgridList. If you click double on an entry, it opens all details about. This data i export in a Jasper Report.
The overview (the FixgridList) should be exported in an excel sheet with all details, but there are only 5 details in the overview. How can i get all details in every row (in excel)?

In every row should be one data set. In the columns should be the details. In my matter there are over 40 details/columns.

Code:
 public void onExcelListe(ActionEvent event) {
       
       HSSFWorkbook arbeitsmappe = new HSSFWorkbook();
       HSSFSheet datenblatt = arbeitsmappe.createSheet("Schadensverwaltung");
       
       HSSFRow ueberschrift1 = datenblatt.createRow(0);
       HSSFCell ueberschriftA = ueberschrift1.createCell( (short) 0);      ueberschriftA.setCellValue("Sachbearbeiter");
       ...
 
       for (int i = 0; i < schadenListe.getRows().size(); i++) {
          
          HSSFRow inhalt = datenblatt.createRow(i+1);
          HSSFCell inhaltA = inhalt.createCell( (short) 0);      inhaltA.setCellValue(?????);
       ...
 


The question is, how can i get all details above the FixgridList? The site in which all details are displayed, is a separate class. I can't write so:
FixgridList.getSelectedItem().SeparateClass.getDetail
because there is nothing marked. I hope it is understandable what i mean.
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5533
Offline

hmm, I have problems to understand what you want to do, sorry... - could you contact us directly?

Björn

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5533
Offline

OK, after a short phonce call...:

The Item class that you use (the one extending FIXGRIDItem) can be extended by any information you like to add - it's just a normal Java class. It is NOT restricted to serv only these properties which are displayed in the columns of the gird, but can have any other information "parked to it". This information then is available when the user selects an item, or if you iterate through all items.

Björn

Björn Müller, CaptainCasa GmbH
roesch

Active

Joined: 04/09/2008 12:35:56
Messages: 9
Offline

I don't understand the last phrase: "This information then is available when the user selects an item, or if you iterate through all items."

There is no item selected. Should all items selected? I don't know the word iterate.
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5533
Offline

What I mean:

Code:
 public class XYZ extends FIXGRIDItem
 {
     DataObject m_addInfo;
     public XYZ(DataObject addInfo)
     {
         m_addInfo = addInfo;
     }
     ...
     public void reactOnRowSelect()
     {
         System.out.println("This is my selected detail object: " + m_addInfo. ...);
     }
 }
 
 FIXGRIDListBinding<XYZ> m_rows = ... ;
 
 public void onDoWhatever(ActionEvent event)
 {
     for (XYZ xyz: m_rows.getItems())
     {
         System.out.println(xyz.m_addInfo. ... );
     }
 }
 


The "additional info" is stuck to the grid item and available at selection time and when iterating/looping through the grids items.

Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team