Page 1 of 2

BusinessObjects reporting

Posted: Mon May 28, 2012 8:36 am
by Lex Lavnikov
Hi,

Could be an understanding problem, but I cannot report business objects from collections:

Here is a sample of business object:

Code: Select all

  public class ProductProfile 
  {
    public string Name { get; set; }
    public string Id { get; set; }
    public ProductStatic Static { get; private set; }

    public ProductProfile()
    {
      Static = new ProductStatic();
    }
  }

  public class ProductStatic 
  {
    public string StaticField { get; set; }
    public string StaticField2 { get; set; }
    public double? Numeric { get; set; }
    public ProductAllocations Allocations { get; private set; }

    public ProductStatic()
    {
      Allocations = new ProductAllocations(new ProductAllocation { Name = "test 1", Result = "value 1" }, new ProductAllocation { Name = "test 2", Result = "value 2" });
    }
  }

  public class ProductAllocations : IEnumerable
  {
    List _items;

    public ProductAllocations(params ProductAllocation[] items)
    {
      _items = new List(items);
    }

    public IEnumerator GetEnumerator()
    {
      return _items.GetEnumerator();
    }

    IEnumerator IEnumerable.GetEnumerator()
    {
      return _items.GetEnumerator();
    }
  }

  public class ProductAllocation : ProductBase
  {
    public string Name { get; set; }
    public string Result { get; set; }
  }

Here is the initialization:

Code: Select all

      var p = new ProductProfile
      {
        Name = "Test Product",
        Id = "122",
        Static =
        {
          Numeric = 12,
          StaticField = "Field 1",
          StaticField2 = "Field 2"
        }
      };

      report.RegBusinessObject("Data", "Product", p);
Would it be possible to report Product.Static.Allocations list?

Please find attached demo app, just drag & drop Product.Static.Allocations to design surface and hit preview.
The data is definitely available. But nothing is reported.

BusinessObjects reporting

Posted: Tue May 29, 2012 10:23 am
by HighAley
Hello.

We need more time to prepare an answer for you.

Thank you.

BusinessObjects reporting

Posted: Tue May 29, 2012 7:18 pm
by Lex Lavnikov
Found additional problem:

If you modify ProductStatic class like this:

Code: Select all

public class ProductStatic 
  {
    public string StaticField { get; set; }
    public string StaticField2 { get; set; }
    public double? Numeric { get; set; }
    public ProductAllocations Allocations { get; private set; }
    public ProductAllocations Allocations2 { get; private set; }

    public ProductStatic()
    {
      Allocations = new ProductAllocations(new ProductAllocation { Name = "test 1", Result = "value 1" }, new ProductAllocation { Name = "test 2", Result = "value 2" });
      Allocations2 = new ProductAllocations(new ProductAllocation { Name = "2 test 1", Result = "2 value 1" }, new ProductAllocation { Name = "2 test 2", Result = "2 value 2" });
    }
  }
And bind those Allocation & Allocation2 to Table components -> they both display Allocation in Designer.

Looks like binding does not respect property name, but element type only.

BusinessObjects reporting

Posted: Thu May 31, 2012 7:36 am
by Lex Lavnikov
Found new one: Filters


When there are several tables bound to the same collection, but having different Filters on data - All tables display same content.

BusinessObjects reporting

Posted: Thu May 31, 2012 7:54 am
by Alex K.
Hello,

For correct rendering report with BO you need put the master empty band on the page before child.

Thank you.

BusinessObjects reporting

Posted: Mon Jun 04, 2012 11:44 am
by Lex Lavnikov
Ok. I see it.

How about fixing filtering problem?

BusinessObjects reporting

Posted: Tue Jun 05, 2012 1:48 am
by Alex K.
Hello,

We made some improvements in that direction about month ago.
Please check the last prerelease build and let us know about the result.

Thank you.

BusinessObjects reporting

Posted: Wed Jun 06, 2012 8:43 am
by Lex Lavnikov
Thank you, i'll give it a try.

Any ideas about eliminating the need to give a proper name to every component? like in WinForms - GenerateMember (false by default, no name needed, easy for GlobalizationStrings)?
Provide ability to hide Hint, Tag and other not obviously used properties from GlobalizationStrings editor.

What is also highly missed is a panel with two text components embedded (caption & value), which is collapsed if no value is provided. Caption & Value are properties of this panel, text components cannot be selected/removed/configured separately.
We have at the moment about 500 such manually configured panels with embedded texts fields, they all have names for localization. Localization is simply a mess...

How difficult is it to build compound Panel with 2 StiTexts embedded?

BusinessObjects reporting

Posted: Fri Jun 08, 2012 3:59 am
by Alex K.
Hello,

Code: Select all

Any ideas about eliminating the need to give a proper name to every component? like in WinForms - GenerateMember (false by default, no name needed, easy for GlobalizationStrings)? 
Provide ability to hide Hint, Tag and other not obviously used properties from GlobalizationStrings editor.
Unfortunately, this feature is not available.

Code: Select all

What is also highly missed is a panel with two text components embedded (caption & value), which is collapsed if no value is provided. Caption & Value are properties of this panel, text components cannot be selected/removed/configured separately.
We have at the moment about 500 such manually configured panels with embedded texts fields, they all have names for localization. Localization is simply a mess... 

How difficult is it to build compound Panel with 2 StiTexts embedded?
Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?

Thank you.

BusinessObjects reporting

Posted: Fri Jun 08, 2012 6:43 am
by Lex Lavnikov
Imagine a Table with two horizontal cells in one row. One cell is a Label/Description, second one is a Value.

This table has no data binding, cells are not exposed as selectable components => no need to name them.
Content of the first cell is set via Label property. Content of the second cell is set via Text (Expression) property.
AutoHide property (if true) hides the whole component, if Text expression is NULL or empty.
Border is set identical to both Label and Content. Width of the Label could be configurable via property or mouse resizer.