BusinessObjects reporting

Stimulsoft Reports.Silverlight discussion
Lex Lavnikov
Posts: 34
Joined: Tue Nov 08, 2011 9:34 am
Location: Frankfurt

BusinessObjects reporting

Post 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.
Attachments
1878.Stimulsoft.zip
(8.92 KiB) Downloaded 293 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

BusinessObjects reporting

Post by HighAley »

Hello.

We need more time to prepare an answer for you.

Thank you.
Lex Lavnikov
Posts: 34
Joined: Tue Nov 08, 2011 9:34 am
Location: Frankfurt

BusinessObjects reporting

Post 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.
Lex Lavnikov
Posts: 34
Joined: Tue Nov 08, 2011 9:34 am
Location: Frankfurt

BusinessObjects reporting

Post 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.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

BusinessObjects reporting

Post by Alex K. »

Hello,

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

Thank you.
Attachments
1899.Report_modified.mrt
(7.64 KiB) Downloaded 523 times
Lex Lavnikov
Posts: 34
Joined: Tue Nov 08, 2011 9:34 am
Location: Frankfurt

BusinessObjects reporting

Post by Lex Lavnikov »

Ok. I see it.

How about fixing filtering problem?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

BusinessObjects reporting

Post 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.
Lex Lavnikov
Posts: 34
Joined: Tue Nov 08, 2011 9:34 am
Location: Frankfurt

BusinessObjects reporting

Post 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?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

BusinessObjects reporting

Post 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.
Lex Lavnikov
Posts: 34
Joined: Tue Nov 08, 2011 9:34 am
Location: Frankfurt

BusinessObjects reporting

Post 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.

Locked