locked
Officeintegration Export To Word - Using Entity Relationships in Column Mappings RRS feed

  • Question

  • Hi,

    I am trying to generate a Word document in Lightswitch 2012, and am having problems with the column mappings.

    The Entity object on my screen is "Invoice", and any field that is part of the entity maps without any problem - eg InvoiceDate

    But any field which is derived through a relationship does not get exported. I have tried using both the object notation

    "Invoice.SalesOrder.Project.Customer.Name"

    and the name of the control on the actual screen

    "Invoice_SalesOrder_Project_Customer_Address1"

    But neither of the above works. An example of the full mapping code is below.

    Any help would be greatly appreciated. Thanks

    InvoiceFields.Add(new OfficeIntegration.ColumnMapping("CustomerName", "Invoice.SalesOrder.Project.Customer.Name"));
    InvoiceFields.Add(new OfficeIntegration.ColumnMapping("Address1", "Invoice_SalesOrder_Project_Customer_Address1"));
    InvoiceFields.Add(new OfficeIntegration.ColumnMapping("InvoiceDate", "InvoiceDate"));
    

    Thursday, December 13, 2012 4:58 PM

Answers

All replies

  • Hello Maurocamb,

    OfficeIntegration is provided by a third party and is not a Microsoft product. I found their documentation here: Office Integration Pack Documentation

    Thier main page is here: Office Integration Pack and they have discussion forums there that they may be able to provide more help with the problem you are having. I would suggest trying those forums to see if they can provide additional help with the field mapping issue you are running into.

    Hope that helps.

    -Pierson


    Thursday, December 13, 2012 7:40 PM
    Moderator
  • Yes, I did know it was a third party product.

    BUT

    I had seen a similar question to mine on this forum, and I also assumed this would be a problem faced by others. So I thought posting here would be best as first attempt.

    Hopefully I will get an answer to my CodePlex post here Export To Word - Using Entity Relationships in Column Mappings .


    • Marked as answer by maurocamb Friday, December 14, 2012 10:23 AM
    • Unmarked as answer by maurocamb Friday, December 14, 2012 10:30 AM
    • Edited by Yann DuranModerator Monday, December 17, 2012 4:14 AM Fixed link text
    Friday, December 14, 2012 10:22 AM
  • Just found the answer to another post on this forum, which I'd previously not found.

    You can read the solution here Office Integration Pack traverse relationship in entities.



    • Marked as answer by maurocamb Friday, December 14, 2012 10:31 AM
    • Edited by maurocamb Friday, December 14, 2012 10:47 AM spelling
    • Edited by Yann DuranModerator Monday, December 17, 2012 4:15 AM Fixed link text
    Friday, December 14, 2012 10:31 AM
  • As you've found, this forum is a perfectly reasonable place to ask any question that concerns LightSwitch. Occasionally it may be that you'll get a quicker answer in a specific external forum, but that shouldn't preclude asking here.

    I'm glad that you found your answer, & thanks for coming back to post the link to it.


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    Monday, December 17, 2012 4:18 AM
    Moderator