BBS DataRelation <> Report Sharp Shooter


Author
Message
Philipp Guntermann
Philipp Guntermann
StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)
Group: Forum Members
Posts: 141, Visits: 263
Hi,

i am using the express version of report sharpshooter. i can create simple reports with no parent/child relations by just dropping a BBS onto the form and setting it up. Tho i dont see a possibility to set up a parent-child relationship between two bbs objects in a way that report sharpshooter understands.

any ideas ?

thanks.

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Yes, look at the StrataFlix sample.  It shows you how to do this and is the purpose of these samples.  You will see that the child BBS is exposed through the parent BO.  In the exposed child BO property on the parent BO, you will set the filter of the child through the exposed property versus setting a relationship like you do when the controls are dropped on a form.  Please refer to the StrataFlix sample as this was the intention of all of the report samples, to help show how to implement a BBS as well as the children BBS in a report environment.
Philipp Guntermann
Philipp Guntermann
StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)
Group: Forum Members
Posts: 141, Visits: 263
hi trent,

thanks for your reply. can you give me a hint where in the strataflix example i should be looking, since its a quite big example and i am kind of on a time contraint.

thanks.

Dustin Taylor
Dustin Taylor
StrataFrame Team Member (652 reputation)
Group: StrataFrame Users
Posts: 364, Visits: 771
The Movie Profile BO used by the Movie Profile Report is an example of this. The BO is at the following location within the solution:

StrataFlix.Reporting -> Reports -> Movie Profile Report -> MoviesBO.vb

If you edit the BO, you will see a code file matching the attatched image. Within it you can see several child BOs declared as privates and exposed using a custom property that filters on the current row of the parent (with an associated reflection property descriptor for each custom property.) I've highlighted the three pieces that expose the MovieCast child item in the attatched image.

If you then look at the MovieProfileDataSource.vb, you'll notice that the data source is inheriting off of MoviesBBS, and the FillMultipleDataTables statement is filling the data tables of the child BOs by way of the public properties that have been exposed within the source business object (MoviesBO).

Attachments
Report_ChildParentExample.png (197 views, 132.00 KB)
Dustin Taylor
Dustin Taylor
StrataFrame Team Member (652 reputation)
Group: StrataFrame Users
Posts: 364, Visits: 771
Sorry, the first line of that reply should read "The MoviesBO used by the Movies Profile Report...".
Philipp Guntermann
Philipp Guntermann
StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)
Group: Forum Members
Posts: 141, Visits: 263
Thanks for the reply. i been looking at it now, but to be honest i dont get it.

I start off by adding 2 buiness objects to my project, say "OrdersBO" And "OrderPositionsBO".

I then build them through the Buisness Object Mapper.

Next i build the project and put an instance of each BO onto the form. Then I provide a fill method for the OrdersBO.

And then, what do i do to set them up correctly ?

What i did and what worked for non child/parent relating simple reports was to add a Buissness Binding Source to the form trough the Toolbox and set the BuisnessObject Property.

thanks.

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Next i build the project and put an instance of each BO onto the form. Then I provide a fill method for the OrdersBO. And then, what do i do to set them up correctly ?

As I tell my kids when they are running towards the street, "Errrck...Stop!" BigGrin

Creating the BOs that you use within your application is the first step.  But we recommend and have created a tool for reporting BOs.  You will want to create a Custom Business Binding Source (it is a template when you add a new item).  You will then want to select the BO you want to inherit from and create a BBS as well.  Be sure to change the namespace to match the report you are writing so that you do not have any ambiguous names.

Then you will use the CustomBBS classes that you created here within your report.  The StrataFlix sample shows this as well as the docs.  Look up the Custom BBS in the docs for more information as well.

Philipp Guntermann
Philipp Guntermann
StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)
Group: Forum Members
Posts: 141, Visits: 263
what you mean by "within your report" ? i have a report sharpshooter reportmanager control on the form. upon right-clicking that i choose "run editor" i then switch to the datasources tab and tell it the datasource.

?

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hey Philipp.

I went ahead and changed once more Trent's report sample... there are 2 reports being generated now. One simple just dropping BO and BBS on the form, as you were doing, and a Master-Detail one, following the StrataFlix concept. Have a look at them and see if it gets clearer to you.

Attachments
SimpleReportShooterSample.zip (182 views, 7.00 MB)
Philipp Guntermann
Philipp Guntermann
StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)
Group: Forum Members
Posts: 141, Visits: 263
Hi,

thanks for providing that.

unfourtanatly i am currently at home where i dont have the full development environement and thus cannot look at it right now.

but i will study it tommorow at work.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search