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.

Reply via email to