Re: CSV reporting..

2008-12-14 Thread Jacques Le Roux
ot;
");
 if(postalAddress.get("address2") != null)
 {
address2 += "
"+postalAddress.get("address2").replace(","," ");
 }
 city +=" "+postalAddress.get("city").replace(","," ");
 postalCode += "
"+postalAddress.get("postalCode").replace(","," ");
 if(postalAddress.get("stateProvinceGeoId") != null)
 {
state +="
"+postalAddress.getRelatedOneCache("StateProvinceGeo").get("abbreviation").replace(",","
");
 }
 if(postalAddress.get("countryGeoId") != null)
 {
country +="
"+postalAddress.getRelatedOneCache("CountryGeo").get("geoName").replace(",","
");
 }
  }

if("EMAIL_ADDRESS".equals(contactMech1.getString("contactMechTypeId")))
  {
email += contactMech1.getString("infoString")+"/";
  }

if("TELECOM_NUMBER".equals(contactMech1.getString("contactMechTypeId")))
  {
telecomNumber = contactMechGV.get("telecomNumber");
if(telecomNumber.get("areaCode") != null)
phone += telecomNumber.get("areaCode").trim();

  phone += telecomNumber.get("contactNumber").trim();

   // if(telecomNumber.partyContactMech.get("extension") !=
null)
// phone +=
telecomNumber.partyContactMech.get("extension");
  }
 // print(" partyId "+partyId+" email "+email+" fullName
"+fullName+" address "+address+" phone "+phone);
}
fw.append(partyId);
fw.append(',');
fw.append(toName);
  fw.append(',');
  fw.append(attnName);
  fw.append(',');
fw.append(address1);
  fw.append(',');
fw.append(address2);
  fw.append(',');
  fw.append(city);
  fw.append(',');
  fw.append(postalCode);
  fw.append(',');
  fw.append(state);
  fw.append(',');
  fw.append(country);
  fw.append(',');
  fw.append(fullName);
fw.append('\n');

  fw.flush();
 // fw.close();
  //response.sendRedirect("control/main");
}
}






On Wed, Dec 3, 2008 at 2:05 AM, nalin chandra <
nalin.chan...@palindromesoftware.com> wrote:


i use CSV reporting in ofbiz

As we all know, we can display data of only one list in the form.

so i use view entity to display data of multiple table.
now i have one problem.

i want to display the detail of party like name, address, email, contact
number etc.
for this purpose i create a view entity but it only display the email id or
telephone number because contactMechId id different for those two, so
please
help me on this issue..

below i paste the view entity code which i use for this purpose:-

DynamicViewEntity dynamicView = new DynamicViewEntity();
List orderBy = FastList.newInstance();
List fieldsToSelect = FastList.newInstance();

dynamicView.addMemberEntity("PT", "Party");
dynamicView.addAlias("PT", "partyId");
dynamicView.addAlias("PT", "statusId");
dynamicView.addAlias("PT", "partyTypeId");
dynamicView.addAlias("PT", "createdDate");
dynamicView.addRelation("one-nofk", "", "PartyType",
ModelKeyMap.makeKeyMapList("partyTypeId"));
dynamicView.addRelation("many", "", "UserLogin",
ModelKeyMap.makeKeyMapList("partyId"));


fieldsToSelect.add("partyId");
fieldsToSelect.add("statusId");
fieldsToSelect.add("partyTypeId");
fieldsToSelect.add("createdDate");
orderBy.add("createdDate");

dynamicView.addMemberEntity("PDS", "PartyDataSource");
dynamicView.addAlias("PDS", "visitId");
dynamicView.addViewLink("PT", "PDS", Boolean.FALSE,
ModelKeyMap.makeKeyMapList("partyId"));

fieldsToSelect.add("visitId");

dynamicView.addMemberEntity("UL", "UserLogin");
dynamicView.addAlias("UL", "userLoginId");
dynamicView.addViewLink("PT", "UL", Boolean.FALSE,
ModelKeyMap.makeKeyMapList("partyId"));

fieldsToSelect.add("userLoginId");

dynamicView.addMemberEntity("PE", "Person");
dynamicView.addAlias("PE", "firstName");
dynamicView.addAlias("PE", "lastName");
dynamicView.addViewLink("PT", "PE", Boolean.FALSE,
ModelKeyMap.makeKeyMapList("partyId"));

fieldsToSelect.add("firstName");
fieldsToSelect.add("lastName");

dynamicView.addMemberEntity("PC", "PartyContactMech");
dynamicView.addMemberEntity("CM", "ContactMech");
dynamicView.addMemberEntity("TM", "TelecomNumber");
dynamicView.addAlias("PC", "contactMechId");
dynamicView.addAlias("CM", "infoString");
dynamicView.addAlias("TM", "countryCode");
dynamicView.addAlias("TM", "areaCode");
dynamicView.addAlias("TM", "contactNumber");
dynamicView.addViewLink("PT", "PC", Boolean.FALSE,
ModelKeyMap.makeKeyMapList("partyId"));
dynamicView.addViewLink("PC", "CM", Boolean.FALSE,
ModelKeyMap.makeKeyMapList("contactMechId"));
dynamicView.addViewLink("PC", "TM", Boolean.FALSE,
ModelKeyMap.makeKeyMapList("contactMechId"));

fieldsToSelect.add("infoString");
fieldsToSelect.add("contactNumber");
fieldsToSelect.add("areaCode");
fieldsToSelect.add("countryCode");


in ftl file if i display partyLists.infoSting is display null because for
telecomNumber there is no infoString value in corresponding column of
contactMech table.

--
View this message in context:
http://www.nabble.com/CSV-reporting..-tp20800340p20800340.html
Sent from the OFBiz - User mailing list archive at Nabble.com.









Re: CSV reporting..

2008-12-03 Thread nalin chandra
) != null)
>  {
>  toName += postalAddress.get("toName").replace(",","
> ");
>  }
>  if(postalAddress.get("attnName") != null)
>  {
> attnName += "
> "+postalAddress.get("attnName").replace(","," ");
>  }
>  address1 +="
> "+postalAddress.get("address1").replace(",","
> ");
>  if(postalAddress.get("address2") != null)
>  {
> address2 += "
> "+postalAddress.get("address2").replace(","," ");
>  }
>  city +=" "+postalAddress.get("city").replace(","," ");
>  postalCode += "
> "+postalAddress.get("postalCode").replace(","," ");
>  if(postalAddress.get("stateProvinceGeoId") != null)
>  {
> state +="
> "+postalAddress.getRelatedOneCache("StateProvinceGeo").get("abbreviation").replace(",","
> ");
>  }
>  if(postalAddress.get("countryGeoId") != null)
>  {
> country +="
> "+postalAddress.getRelatedOneCache("CountryGeo").get("geoName").replace(",","
> ");
>  }
>   }
> 
> if("EMAIL_ADDRESS".equals(contactMech1.getString("contactMechTypeId")))
>   {
> email += contactMech1.getString("infoString")+"/";
>   }
> 
> if("TELECOM_NUMBER".equals(contactMech1.getString("contactMechTypeId")))
>       {
> telecomNumber = contactMechGV.get("telecomNumber");
> if(telecomNumber.get("areaCode") != null)
> phone += telecomNumber.get("areaCode").trim();
> 
>   phone += telecomNumber.get("contactNumber").trim();
> 
>// if(telecomNumber.partyContactMech.get("extension")
> !=
> null)
> // phone +=
> telecomNumber.partyContactMech.get("extension");
>   }
>  // print(" partyId "+partyId+" email "+email+" fullName
> "+fullName+" address "+address+" phone "+phone);
> }
> fw.append(partyId);
> fw.append(',');
> fw.append(toName);
>   fw.append(',');
>   fw.append(attnName);
>   fw.append(',');
> fw.append(address1);
>   fw.append(',');
> fw.append(address2);
>   fw.append(',');
>   fw.append(city);
>   fw.append(',');
>   fw.append(postalCode);
>   fw.append(',');
>   fw.append(state);
>   fw.append(',');
>   fw.append(country);
>   fw.append(',');
>   fw.append(fullName);
> fw.append('\n');
> 
>   fw.flush();
>  // fw.close();
>   //response.sendRedirect("control/main");
> }
> }
> 
> 
> 
> 
> 
> 
> On Wed, Dec 3, 2008 at 2:05 AM, nalin chandra <
> [EMAIL PROTECTED]> wrote:
> 
>>
>> i use CSV reporting in ofbiz
>>
>> As we all know, we can display data of only one list in the form.
>>
>> so i use view entity to display data of multiple table.
>> now i have one problem.
>>
>> i want to display the detail of party like name, address, email, contact
>> number etc.
>> for this purpose i create a view entity but it only display the email id
>> or
>> telephone number because contactMechId id different for those two, so
>> please
>> help me on this issue..
>>
>> below i paste the view entity code which i use for this purpose:-
>>
>> DynamicViewEntity dynamicView = new DynamicViewEntity();
>> List orderBy = FastList.newInstance();
>> List fieldsToSelect = FastList.newInstance();
>>
>> dynamicView.addMemberEntity("PT", "Party");
>> dynamicView.addAlias("PT", "partyId");
>> dynamicView.addAlias("PT", "statusId");
>> dynamicView.addAlias("PT", "partyTypeId");
>> dynam

Re: CSV reporting..

2008-12-03 Thread BJ Freeman
}
>  if(postalAddress.get("attnName") != null)
>  {
> attnName += "
> "+postalAddress.get("attnName").replace(","," ");
>  }
>  address1 +=" "+postalAddress.get("address1").replace(",","
> ");
>  if(postalAddress.get("address2") != null)
>  {
> address2 += "
> "+postalAddress.get("address2").replace(","," ");
>  }
>  city +=" "+postalAddress.get("city").replace(","," ");
>  postalCode += "
> "+postalAddress.get("postalCode").replace(","," ");
>  if(postalAddress.get("stateProvinceGeoId") != null)
>  {
> state +="
> "+postalAddress.getRelatedOneCache("StateProvinceGeo").get("abbreviation").replace(",","
> ");
>  }
>  if(postalAddress.get("countryGeoId") != null)
>  {
> country +="
> "+postalAddress.getRelatedOneCache("CountryGeo").get("geoName").replace(",","
> ");
>  }
>   }
> 
> if("EMAIL_ADDRESS".equals(contactMech1.getString("contactMechTypeId")))
>   {
> email += contactMech1.getString("infoString")+"/";
>   }
> 
> if("TELECOM_NUMBER".equals(contactMech1.getString("contactMechTypeId")))
>       {
> telecomNumber = contactMechGV.get("telecomNumber");
> if(telecomNumber.get("areaCode") != null)
> phone += telecomNumber.get("areaCode").trim();
> 
>   phone += telecomNumber.get("contactNumber").trim();
> 
>// if(telecomNumber.partyContactMech.get("extension") !=
> null)
> // phone +=
> telecomNumber.partyContactMech.get("extension");
>   }
>  // print(" partyId "+partyId+" email "+email+" fullName
> "+fullName+" address "+address+" phone "+phone);
> }
> fw.append(partyId);
> fw.append(',');
> fw.append(toName);
>   fw.append(',');
>   fw.append(attnName);
>   fw.append(',');
> fw.append(address1);
>   fw.append(',');
> fw.append(address2);
>   fw.append(',');
>   fw.append(city);
>   fw.append(',');
>   fw.append(postalCode);
>   fw.append(',');
>   fw.append(state);
>   fw.append(',');
>   fw.append(country);
>   fw.append(',');
>   fw.append(fullName);
> fw.append('\n');
> 
>   fw.flush();
>  // fw.close();
>   //response.sendRedirect("control/main");
> }
> }
> 
> 
> 
> 
> 
> 
> On Wed, Dec 3, 2008 at 2:05 AM, nalin chandra <
> [EMAIL PROTECTED]> wrote:
> 
>> i use CSV reporting in ofbiz
>>
>> As we all know, we can display data of only one list in the form.
>>
>> so i use view entity to display data of multiple table.
>> now i have one problem.
>>
>> i want to display the detail of party like name, address, email, contact
>> number etc.
>> for this purpose i create a view entity but it only display the email id or
>> telephone number because contactMechId id different for those two, so
>> please
>> help me on this issue..
>>
>> below i paste the view entity code which i use for this purpose:-
>>
>> DynamicViewEntity dynamicView = new DynamicViewEntity();
>> List orderBy = FastList.newInstance();
>> List fieldsToSelect = FastList.newInstance();
>>
>> dynamicView.addMemberEntity("PT", "Party");
>> dynamicView.addAlias("PT", "partyId");
>> dynamicView.addAlias("PT", "statusId");
>> dynamicView.addAlias("PT", "partyTypeId");
>> dynamicView.addAlias("PT", "createdDate");
>> dynamicView.addRelation("one-nofk", "", "PartyType",
>> ModelKeyMap.makeKeyMapLi

Re: CSV reporting..

2008-12-03 Thread S K Pradeep kumar
alCode += "
"+postalAddress.get("postalCode").replace(","," ");
 if(postalAddress.get("stateProvinceGeoId") != null)
 {
state +="
"+postalAddress.getRelatedOneCache("StateProvinceGeo").get("abbreviation").replace(",","
");
 }
 if(postalAddress.get("countryGeoId") != null)
 {
country +="
"+postalAddress.getRelatedOneCache("CountryGeo").get("geoName").replace(",","
");
 }
  }

if("EMAIL_ADDRESS".equals(contactMech1.getString("contactMechTypeId")))
  {
email += contactMech1.getString("infoString")+"/";
  }

if("TELECOM_NUMBER".equals(contactMech1.getString("contactMechTypeId")))
  {
telecomNumber = contactMechGV.get("telecomNumber");
if(telecomNumber.get("areaCode") != null)
phone += telecomNumber.get("areaCode").trim();

  phone += telecomNumber.get("contactNumber").trim();

       // if(telecomNumber.partyContactMech.get("extension") !=
null)
// phone +=
telecomNumber.partyContactMech.get("extension");
  }
 // print(" partyId "+partyId+" email "+email+" fullName
"+fullName+" address "+address+" phone "+phone);
}
fw.append(partyId);
fw.append(',');
fw.append(toName);
  fw.append(',');
  fw.append(attnName);
  fw.append(',');
fw.append(address1);
  fw.append(',');
fw.append(address2);
  fw.append(',');
  fw.append(city);
  fw.append(',');
  fw.append(postalCode);
  fw.append(',');
  fw.append(state);
  fw.append(',');
  fw.append(country);
  fw.append(',');
  fw.append(fullName);
fw.append('\n');

  fw.flush();
 // fw.close();
  //response.sendRedirect("control/main");
}
}






On Wed, Dec 3, 2008 at 2:05 AM, nalin chandra <
[EMAIL PROTECTED]> wrote:

>
> i use CSV reporting in ofbiz
>
> As we all know, we can display data of only one list in the form.
>
> so i use view entity to display data of multiple table.
> now i have one problem.
>
> i want to display the detail of party like name, address, email, contact
> number etc.
> for this purpose i create a view entity but it only display the email id or
> telephone number because contactMechId id different for those two, so
> please
> help me on this issue..
>
> below i paste the view entity code which i use for this purpose:-
>
> DynamicViewEntity dynamicView = new DynamicViewEntity();
> List orderBy = FastList.newInstance();
> List fieldsToSelect = FastList.newInstance();
>
> dynamicView.addMemberEntity("PT", "Party");
> dynamicView.addAlias("PT", "partyId");
> dynamicView.addAlias("PT", "statusId");
> dynamicView.addAlias("PT", "partyTypeId");
> dynamicView.addAlias("PT", "createdDate");
> dynamicView.addRelation("one-nofk", "", "PartyType",
> ModelKeyMap.makeKeyMapList("partyTypeId"));
> dynamicView.addRelation("many", "", "UserLogin",
> ModelKeyMap.makeKeyMapList("partyId"));
>
>
> fieldsToSelect.add("partyId");
> fieldsToSelect.add("statusId");
> fieldsToSelect.add("partyTypeId");
> fieldsToSelect.add("createdDate");
> orderBy.add("createdDate");
>
> dynamicView.addMemberEntity("PDS", "PartyDataSource");
> dynamicView.addAlias("PDS", "visitId");
> dynamicView.addViewLink("PT", "PDS", Boolean.FALSE,
> ModelKeyMap.makeKeyMapList("partyId"));
>
> fieldsToSelect.add("visitId");
>
> dynamicView.addMemberEntity("UL", "UserLogin");
> dynamicView.addAlias("UL", "userLoginId");
> dynamicView.addViewLink("PT", "UL", Boolean.FALSE,
> ModelKeyMap.makeKeyMapList("partyId"));
>
> fieldsToSelect.add("userLoginId");
>
> dynamicView.addMemberEntity("PE", "Person");
> dynamicView.addAlias("PE", "firstName");
> dynamicView.addAlias("PE", "lastName");
> dynamicView.addViewLink("PT", "PE", Boolean.FALSE,
> ModelKeyMap.makeKeyMapList("partyId"));
>
> fieldsToSelect.add("firstName");
> fieldsToSelect.add("lastName");
>
> dynamicView.addMemberEntity("PC", "PartyContactMech");
> dynamicView.addMemberEntity("CM", "ContactMech");
> dynamicView.addMemberEntity("TM", "TelecomNumber");
> dynamicView.addAlias("PC", "contactMechId");
> dynamicView.addAlias("CM", "infoString");
> dynamicView.addAlias("TM", "countryCode");
> dynamicView.addAlias("TM", "areaCode");
> dynamicView.addAlias("TM", "contactNumber");
> dynamicView.addViewLink("PT", "PC", Boolean.FALSE,
> ModelKeyMap.makeKeyMapList("partyId"));
> dynamicView.addViewLink("PC", "CM", Boolean.FALSE,
> ModelKeyMap.makeKeyMapList("contactMechId"));
> dynamicView.addViewLink("PC", "TM", Boolean.FALSE,
> ModelKeyMap.makeKeyMapList("contactMechId"));
>
> fieldsToSelect.add("infoString");
> fieldsToSelect.add("contactNumber");
> fieldsToSelect.add("areaCode");
> fieldsToSelect.add("countryCode");
>
>
> in ftl file if i display partyLists.infoSting is display null because for
> telecomNumber there is no infoString value in corresponding column of
> contactMech table.
>
> --
> View this message in context:
> http://www.nabble.com/CSV-reporting..-tp20800340p20800340.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>


-- 
With regards,
S K Pradeep kumar


Re: CSV reporting..

2008-12-02 Thread nalin chandra

Thanks for suggestion


BJ Freeman wrote:
> 
> my first suggestion is you make a view-entity in a xml file
> and include it in your project.
> then you can use web tools to look at it like anyother entity.
> https://demo.hotwaxmedia.com/webtools/control/FindGeneric?entityName=ContactMechDetail&find=true&VIEW_SIZE=50&VIEW_INDEX=0
> 
> you should have a _NA_ for fields instead of Nulls where there is a
> relationship.
> 
> 
> nalin chandra sent the following on 12/2/2008 12:35 PM:
>> i use CSV reporting in ofbiz
>> 
>> As we all know, we can display data of only one list in the form.
>> 
>> so i use view entity to display data of multiple table.
>> now i have one problem.
>> 
>> i want to display the detail of party like name, address, email, contact
>> number etc.
>> for this purpose i create a view entity but it only display the email id
>> or
>> telephone number because contactMechId id different for those two, so
>> please
>> help me on this issue..
>> 
>> below i paste the view entity code which i use for this purpose:-
>> 
>> DynamicViewEntity dynamicView = new DynamicViewEntity();
>> List orderBy = FastList.newInstance();
>> List fieldsToSelect = FastList.newInstance();
>> 
>> dynamicView.addMemberEntity("PT", "Party");
>> dynamicView.addAlias("PT", "partyId");
>> dynamicView.addAlias("PT", "statusId");
>> dynamicView.addAlias("PT", "partyTypeId");
>> dynamicView.addAlias("PT", "createdDate");
>> dynamicView.addRelation("one-nofk", "", "PartyType",
>> ModelKeyMap.makeKeyMapList("partyTypeId"));
>> dynamicView.addRelation("many", "", "UserLogin",
>> ModelKeyMap.makeKeyMapList("partyId"));
>> 
>> 
>> fieldsToSelect.add("partyId");
>> fieldsToSelect.add("statusId");
>> fieldsToSelect.add("partyTypeId");
>> fieldsToSelect.add("createdDate");
>> orderBy.add("createdDate");
>> 
>> dynamicView.addMemberEntity("PDS", "PartyDataSource");
>> dynamicView.addAlias("PDS", "visitId");
>> dynamicView.addViewLink("PT", "PDS", Boolean.FALSE,
>> ModelKeyMap.makeKeyMapList("partyId"));
>> 
>> fieldsToSelect.add("visitId");
>> 
>> dynamicView.addMemberEntity("UL", "UserLogin");
>> dynamicView.addAlias("UL", "userLoginId");
>> dynamicView.addViewLink("PT", "UL", Boolean.FALSE,
>> ModelKeyMap.makeKeyMapList("partyId"));
>> 
>> fieldsToSelect.add("userLoginId");
>> 
>> dynamicView.addMemberEntity("PE", "Person");
>> dynamicView.addAlias("PE", "firstName");
>> dynamicView.addAlias("PE", "lastName");
>> dynamicView.addViewLink("PT", "PE", Boolean.FALSE,
>> ModelKeyMap.makeKeyMapList("partyId"));
>> 
>> fieldsToSelect.add("firstName");
>> fieldsToSelect.add("lastName");
>> 
>> dynamicView.addMemberEntity("PC", "PartyContactMech");
>> dynamicView.addMemberEntity("CM", "ContactMech");
>> dynamicView.addMemberEntity("TM", "TelecomNumber");
>> dynamicView.addAlias("PC", "contactMechId");
>> dynamicView.addAlias("CM", "infoString");
>> dynamicView.addAlias("TM", "countryCode");
>> dynamicView.addAlias("TM", "areaCode");
>> dynamicView.addAlias("TM", "contactNumber");
>> dynamicView.addViewLink("PT", "PC", Boolean.FALSE,
>> ModelKeyMap.makeKeyMapList("partyId"));
>> dynamicView.addViewLink("PC", "CM", Boolean.FALSE,
>> ModelKeyMap.makeKeyMapList("contactMechId"));
>> dynamicView.addViewLink("PC", "TM", Boolean.FALSE,
>> ModelKeyMap.makeKeyMapList("contactMechId"));
>> 
>> fieldsToSelect.add("infoString");
>> fieldsToSelect.add("contactNumber");
>> fieldsToSelect.add("areaCode");
>> fieldsToSelect.add("countryCode");
>> 
>> 
>> in ftl file if i display partyLists.infoSting is display null because for
>> telecomNumber there is no infoString value in corresponding column of 
>> contactMech table.
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/CSV-reporting..-tp20800340p20800983.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: CSV reporting..

2008-12-02 Thread BJ Freeman
my first suggestion is you make a view-entity in a xml file
and include it in your project.
then you can use web tools to look at it like anyother entity.
https://demo.hotwaxmedia.com/webtools/control/FindGeneric?entityName=ContactMechDetail&find=true&VIEW_SIZE=50&VIEW_INDEX=0

you should have a _NA_ for fields instead of Nulls where there is a
relationship.


nalin chandra sent the following on 12/2/2008 12:35 PM:
> i use CSV reporting in ofbiz
> 
> As we all know, we can display data of only one list in the form.
> 
> so i use view entity to display data of multiple table.
> now i have one problem.
> 
> i want to display the detail of party like name, address, email, contact
> number etc.
> for this purpose i create a view entity but it only display the email id or
> telephone number because contactMechId id different for those two, so please
> help me on this issue..
> 
> below i paste the view entity code which i use for this purpose:-
> 
> DynamicViewEntity dynamicView = new DynamicViewEntity();
> List orderBy = FastList.newInstance();
> List fieldsToSelect = FastList.newInstance();
> 
> dynamicView.addMemberEntity("PT", "Party");
> dynamicView.addAlias("PT", "partyId");
> dynamicView.addAlias("PT", "statusId");
> dynamicView.addAlias("PT", "partyTypeId");
> dynamicView.addAlias("PT", "createdDate");
> dynamicView.addRelation("one-nofk", "", "PartyType",
> ModelKeyMap.makeKeyMapList("partyTypeId"));
> dynamicView.addRelation("many", "", "UserLogin",
> ModelKeyMap.makeKeyMapList("partyId"));
> 
> 
> fieldsToSelect.add("partyId");
> fieldsToSelect.add("statusId");
> fieldsToSelect.add("partyTypeId");
> fieldsToSelect.add("createdDate");
> orderBy.add("createdDate");
> 
> dynamicView.addMemberEntity("PDS", "PartyDataSource");
> dynamicView.addAlias("PDS", "visitId");
> dynamicView.addViewLink("PT", "PDS", Boolean.FALSE,
> ModelKeyMap.makeKeyMapList("partyId"));
> 
> fieldsToSelect.add("visitId");
> 
> dynamicView.addMemberEntity("UL", "UserLogin");
> dynamicView.addAlias("UL", "userLoginId");
> dynamicView.addViewLink("PT", "UL", Boolean.FALSE,
> ModelKeyMap.makeKeyMapList("partyId"));
> 
> fieldsToSelect.add("userLoginId");
> 
> dynamicView.addMemberEntity("PE", "Person");
> dynamicView.addAlias("PE", "firstName");
> dynamicView.addAlias("PE", "lastName");
> dynamicView.addViewLink("PT", "PE", Boolean.FALSE,
> ModelKeyMap.makeKeyMapList("partyId"));
> 
> fieldsToSelect.add("firstName");
> fieldsToSelect.add("lastName");
> 
> dynamicView.addMemberEntity("PC", "PartyContactMech");
> dynamicView.addMemberEntity("CM", "ContactMech");
> dynamicView.addMemberEntity("TM", "TelecomNumber");
> dynamicView.addAlias("PC", "contactMechId");
> dynamicView.addAlias("CM", "infoString");
> dynamicView.addAlias("TM", "countryCode");
> dynamicView.addAlias("TM", "areaCode");
> dynamicView.addAlias("TM", "contactNumber");
> dynamicView.addViewLink("PT", "PC", Boolean.FALSE,
> ModelKeyMap.makeKeyMapList("partyId"));
> dynamicView.addViewLink("PC", "CM", Boolean.FALSE,
> ModelKeyMap.makeKeyMapList("contactMechId"));
> dynamicView.addViewLink("PC", "TM", Boolean.FALSE,
> ModelKeyMap.makeKeyMapList("contactMechId"));
> 
> fieldsToSelect.add("infoString");
> fieldsToSelect.add("contactNumber");
> fieldsToSelect.add("areaCode");
> fieldsToSelect.add("countryCode");
> 
> 
> in ftl file if i display partyLists.infoSting is display null because for
> telecomNumber there is no infoString value in corresponding column of 
> contactMech table.
> 


CSV reporting..

2008-12-02 Thread nalin chandra

i use CSV reporting in ofbiz

As we all know, we can display data of only one list in the form.

so i use view entity to display data of multiple table.
now i have one problem.

i want to display the detail of party like name, address, email, contact
number etc.
for this purpose i create a view entity but it only display the email id or
telephone number because contactMechId id different for those two, so please
help me on this issue..

below i paste the view entity code which i use for this purpose:-

DynamicViewEntity dynamicView = new DynamicViewEntity();
List orderBy = FastList.newInstance();
List fieldsToSelect = FastList.newInstance();

dynamicView.addMemberEntity("PT", "Party");
dynamicView.addAlias("PT", "partyId");
dynamicView.addAlias("PT", "statusId");
dynamicView.addAlias("PT", "partyTypeId");
dynamicView.addAlias("PT", "createdDate");
dynamicView.addRelation("one-nofk", "", "PartyType",
ModelKeyMap.makeKeyMapList("partyTypeId"));
dynamicView.addRelation("many", "", "UserLogin",
ModelKeyMap.makeKeyMapList("partyId"));


fieldsToSelect.add("partyId");
fieldsToSelect.add("statusId");
fieldsToSelect.add("partyTypeId");
fieldsToSelect.add("createdDate");
orderBy.add("createdDate");

dynamicView.addMemberEntity("PDS", "PartyDataSource");
dynamicView.addAlias("PDS", "visitId");
dynamicView.addViewLink("PT", "PDS", Boolean.FALSE,
ModelKeyMap.makeKeyMapList("partyId"));

fieldsToSelect.add("visitId");

dynamicView.addMemberEntity("UL", "UserLogin");
dynamicView.addAlias("UL", "userLoginId");
dynamicView.addViewLink("PT", "UL", Boolean.FALSE,
ModelKeyMap.makeKeyMapList("partyId"));

fieldsToSelect.add("userLoginId");

dynamicView.addMemberEntity("PE", "Person");
dynamicView.addAlias("PE", "firstName");
dynamicView.addAlias("PE", "lastName");
dynamicView.addViewLink("PT", "PE", Boolean.FALSE,
ModelKeyMap.makeKeyMapList("partyId"));

fieldsToSelect.add("firstName");
fieldsToSelect.add("lastName");

dynamicView.addMemberEntity("PC", "PartyContactMech");
dynamicView.addMemberEntity("CM", "ContactMech");
dynamicView.addMemberEntity("TM", "TelecomNumber");
dynamicView.addAlias("PC", "contactMechId");
dynamicView.addAlias("CM", "infoString");
dynamicView.addAlias("TM", "countryCode");
dynamicView.addAlias("TM", "areaCode");
dynamicView.addAlias("TM", "contactNumber");
dynamicView.addViewLink("PT", "PC", Boolean.FALSE,
ModelKeyMap.makeKeyMapList("partyId"));
dynamicView.addViewLink("PC", "CM", Boolean.FALSE,
ModelKeyMap.makeKeyMapList("contactMechId"));
dynamicView.addViewLink("PC", "TM", Boolean.FALSE,
ModelKeyMap.makeKeyMapList("contactMechId"));

fieldsToSelect.add("infoString");
fieldsToSelect.add("contactNumber");
fieldsToSelect.add("areaCode");
fieldsToSelect.add("countryCode");


in ftl file if i display partyLists.infoSting is display null because for
telecomNumber there is no infoString value in corresponding column of 
contactMech table.

-- 
View this message in context: 
http://www.nabble.com/CSV-reporting..-tp20800340p20800340.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: CSV Reporting.....

2008-10-24 Thread BJ Freeman
use entity-view to create you data.
you can do this in code or make a static one in your entitydef folder
this is a csv file so the excel your using you need to open and set the
default load for excel.
the other suggestion is to force a excel time format.
if you export as an excel using PIO then you can control this.


nalin chandra sent the following on 10/24/2008 10:20 AM:
> how we generate the CSV report.
> In CSV reporting i have 2 problem
> first:-
> how to export the data from two different list
> 
>  odd-row-style="alternate-row" default-table-style="basic-table
> hover-bar">
> 
>  description=","/>
>  description="""/>
> 
>  description="""/>
> 
> 
> here we can use only one list.
> 
> second:-
> when we export the data in the Excel Sheet date field is not display
> properly. It display only time so there is need to change the field format
> for that column. but if i remove the 
> 
> 
> 
> field it display completely but then separator is remove from there. 
> 
> So please help me if any one have solution.
> 
> Thankyou


CSV Reporting.....

2008-10-24 Thread nalin chandra

how we generate the CSV report.
In CSV reporting i have 2 problem
first:-
how to export the data from two different list









here we can use only one list.

second:-
when we export the data in the Excel Sheet date field is not display
properly. It display only time so there is need to change the field format
for that column. but if i remove the 



field it display completely but then separator is remove from there. 

So please help me if any one have solution.

Thankyou
-- 
View this message in context: 
http://www.nabble.com/CSV-Reporting.-tp20154273p20154273.html
Sent from the OFBiz - User mailing list archive at Nabble.com.