Export from custom table to Excel using CommandMenu is empty.

I've created a custom screen showing sale records based on specific project criteria. (see example below)
But when I use the standard export to Excel function in the CommandMenu, I get an empty excel file!

When I remove the project criteria my excel file contains sale records. Why?

SearchEngine example:

SearchEngine seSales;
seSales.addField("sale.sale_id");
seSales.addField("sale.heading");
seSales.addField("sale.contact_id.name");
seSales.addField("sale.associate_id.name");
seSales.addField("sale.project_id");
seSales.addField("sale.project_id.name");
seSales.addField("sale.project_id.userdef_id.long19");
seSales.addField("sale.project_id.userdef_id.long20");
seSales.addField("sale.project_id.userdef_id.long21");
seSales.addField("sale.project_id.userdef_id.long22");
seSales.addField("sale.project_id.endDate");
seSales.addCriteria("sale.project_id.status_idx.name", "OperatorEquals", projectStatus, "OperatorAnd", 0);
seSales.addCriteria("sale.project_id.endDate", "OperatorGte", enddateFrom, "OperatorAnd", 0);
seSales.addCriteria("sale.project_id.endDate", "OperatorLt", enddateBefore, "OperatorAnd", 0);

for (seSales.execute();!seSales.eof();seSales.next())
{
// Some code

............

// Fill grid with values from search engine

  grid.setFieldValue("addRow", Map()
                     .insert("id=", saleId));

  grid.setFieldValue("addCell", Map("label=" + saleId));
  grid.setFieldValue("addCell", Map("label=" + listEndUsers.get(projectId)));
  grid.setFieldValue("addCell", Map("label=" + listProducts.get(projectProduct)));
  grid.setFieldValue("addCell", Map("label=" + listProcesses.get(projectProcess)));
  grid.setFieldValue("addCell", Map("label=" + listCountries.get(projectCountry)));
  grid.setFieldValue("addCell", Map("label=" + projectMonthYear));
  grid.setFieldValue("addCell", Map("label=" + projectHours));
  grid.setFieldValue("addCell", Map("label=" + listChances.get(projectChance)));
  grid.setFieldValue("addCell", Map("label=" + projectName));
  grid.setFieldValue("addCell", Map("label=" + saleContact));
  grid.setFieldValue("addCell", Map("label=" + saleHeading));
  grid.setFieldValue("addCell", Map("label=" + saleAssociate));
}

Example screen result (with project criteria):

Example export result (with project criteria):

When I remove the project criteria from search engine my export result looks like this:

Any suggestions?

Noch keine Antworten!