none
IList properties. RRS feed

  • Question

  • Hi,

    I've created a report which is filled with an objects list as a datasource, this list contains specific type objects with the followings properties:

    InvoiceNumber
    InvoiceDate
    InvoiceCustomer
    ... <other properties>
    InvoiceItems

    The last property type is ILis<Item>. The problem with the report is how to print the content of this property, with the following format:

    InvoiceNumber InvoiceDate        InvoiceCustomer

        ItemNumber.     ItemProduct   ItemQuantity   ItemPrice

     

    Does anybody knows how to do that? Do I have to use a subreport or a group control?

    Thanks

    Gustavo.

     

    Monday, July 12, 2010 3:08 PM

All replies

  • Hi...........Gustavo Ferrero

    You can use Table control to display your Invoice Items

    First create one entity or class for your report items and make properties for each item which is in th Ilist

     

    Ex.

    public class InvoiceItems
     {
    
      private int _no
       public int No
      {
       get
       {
        return _no;
       }
       set
       {
        if (value == _no)
         return;
    
        _no = value;
          }
      }
      
      private int _qty;
       public int Qty
      {
       get { return _qty; }
       set
       {
        if (value == _qty)
         return;
    
        _qty = value;
       }
      }
    }

    Now in code behind create on object of List type

    Ex:

    List<InvoiceItem> items =new List<InvoiceItem>();

    Then after Add InvocieItems entity as DataSource in your Dataset.

    New after follow below steps........

    1) Drag Table control from toolbox.

    2) Now drag property from Data Source to Table Datails part. one item in one column(For all item).

    That's it.

    If you have any question that feel free to ask.

    Besk of luck

     

     

     

    Friday, July 30, 2010 12:05 PM