locked
Show summary based on many tables RRS feed

  • Question

  • Hello,

    I have these tables;
    Colors(Name,Code), ProductType(Name,Code),
    AddedProducts(AddedDate), AddedProductDetails (Quantity, Color)
    SoldProducts(SellDate), SoldProductDetails (Quantity, Color)

    each AddedProducts has ProductType and many AddedProductDetails
    each SoldProducts has ProductType and many SoldProductDetails

    each *ProductDetails has color and related to *Products

    I want to be able to show summary of available products per color for each ProductType as:

    Name(ProductType.Name), InStock(AddedProductDetails.Quantity - SoldProductDetails.Quantity), Color(Colors.Name)

    So either I have to create a table and populate it manually with these data, or make a computed field but it will be a bit complex.

    What is your advice to handle situation like this?

    Tuesday, November 26, 2013 2:06 PM

Answers

  • Hi,

    As the data you want to summary comes from a lot of different tables and the number of data is not large, I'd like to suggest the option one(create a table and populate it manually with these data).

    If you want to do some operations on one or two tables, making a computed field is a better choice.

    There is a blog below about defining data relationships, you may check it if it helps.

    Beginning LightSwitch in VS 2012 Part 2: Feel the Love - Defining Data Relationships

    http://blogs.msdn.com/b/bethmassi/archive/2012/08/15/beginning-lightswitch-in-vs-2012-part-2-feel-the-love-defining-data-relationships.aspx

    Hope it helps.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, November 27, 2013 7:51 AM

All replies

  • Hi,

    As the data you want to summary comes from a lot of different tables and the number of data is not large, I'd like to suggest the option one(create a table and populate it manually with these data).

    If you want to do some operations on one or two tables, making a computed field is a better choice.

    There is a blog below about defining data relationships, you may check it if it helps.

    Beginning LightSwitch in VS 2012 Part 2: Feel the Love - Defining Data Relationships

    http://blogs.msdn.com/b/bethmassi/archive/2012/08/15/beginning-lightswitch-in-vs-2012-part-2-feel-the-love-defining-data-relationships.aspx

    Hope it helps.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, November 27, 2013 7:51 AM
  • Ok, thank you for your answer, I will check the blog post you mentioned
    Wednesday, November 27, 2013 9:45 AM