Starting with business objects

Stimulsoft Reports.NET discussion
Post Reply
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Starting with business objects

Post by Jennypi »

Hi

We are building a new application that will be linked to Stimulsoft.
I created a template for our first try. It consists in printing a/several list of seed lots, with information about their pedigree, the number of seeds to use, etc.
In this template, I manually created a business object and all the columns that I need.
A C# code is making the link between the query and the business object, via a collection of objects with the same names as my columns.
Here is a simplified version of the model:
model.png
model.png (14.26 KiB) Viewed 2016 times
To display data coming from LIST, LOT_IN_LIST and LOT, no problem, it works perfectly. The designer looks like this (please scroll on the right):
1.png
1.png (66.21 KiB) Viewed 2016 times
Now, I want to retrieve characteristics of the lots. For example, a characteristic is "germination rate". In the table lot_characteristics, we would have the value "99" for "lot1" and "germination rate".
Each user can choose the characteristics he would like to display by defining a layout profile. A layout profile contain several characteristics.
The users will choose the profile in the report filters, so the characteristics retrieved by the query will never be the same.

And I don't know how to manage this...
I thought about creating a set of 30 default characteristic columns, in the business objects: characteristic1_name, characteristic1_value, characteristic2_name, characteristic2_value, etc...
char.png
char.png (1.88 KiB) Viewed 2016 times
But if the profile has only 5 characteristics then I have 25 columns for nothing. Plus it's not dynamic. Each time the user add a characteristic to a profile, he would have to add the corresponding component on the designer.

Then I thought about crosstabs.
I defined a child business object:
2.png
2.png (11.77 KiB) Viewed 2016 times
and placed a crosstab in a panel:
crosstab.png
crosstab.png (50.7 KiB) Viewed 2016 times
- What I'm missing here, is how to define a relation between the 2 business object? How do I tell that the link in between them is on the LotID ?
- Second problem: the headers of the crosstab will be repeated for each lot of the list. This is not what I want, I would like the headers to be displayed only once, at the top of the page, in the GroupHeaderBand or at least at the same level. How can I do? (Similar problem as in this topic).

Do you see any other solution?

Thank you and sorry for this looooon post!
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Re: Starting with business objects

Post by Jennypi »

Oops I forgot to join the mrt. It's attached.
Attachments
SOWLIST.mrt
(31.29 KiB) Downloaded 154 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Starting with business objects

Post by HighAley »

Hello.

Sorry for the delay with answer.
We need some additional time.

Thank you.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Starting with business objects

Post by HighAley »

Hello.

You can add a relation to your business objects and register them in the report.
It's impossible to add relation to any business object in our product. This feature will not be available.

You could use next code to disable header of cross-tabs:

Code: Select all

CrossTab1_RightTitle.Enabled = false;
Thank you.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Re: Starting with business objects

Post by Jennypi »

Hello,

thanks for your answer, but I don't understand.
You say that
You can add a relation to your business objects
but
It's impossible to add relation to any business object
.
Can you please be more precise?

Thanks a lot.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Starting with business objects

Post by HighAley »

Hello.

It's impossible to add relation between business objects because it breaks conception of them. The business object have nested objects and there could not be created relation between set of business objects.
So you should create necessary structure of business objects before registering it in the report.

Thank you.
Post Reply