StrataFrame Forum

Master - Detail report using DevExpress

http://forum.strataframe.net/Topic22699.aspx

By Juan Carlos Pazos - 4/13/2009

CrazyHi

I make a master/detail report using DevExpress report control. Is something basic, like order / orderitems.

In the report code I add this:

Private Sub Publicacion_DataSourceRowChanged(ByVal sender As System.Object, ByVal e As DevExpress.XtraReports.UI.DataSourceRowEventArgs) Handles MyBase.DataSourceRowChanged

'-- On Each Publicaciones DataSource Row Changed, we need to fill for the PublicacionesProductos

CType(Me.PublicacionesProductosBBS1.BusinessObject, PublicacionesProductosBO).FillByParentPrimaryKey(CType(Me.PublicacionesBBS1.BusinessObject, PublicacionesBO).IdPublicacion)

End Sub

The report works exactly as I need.

But I need this report can be customized by the end users; in other reports I use Scrips, because a custom reports does not have code inside it, this need to be done with scripts.

Adding the script to the reports, has a problem, there is a big error, because the script does not found the "PublicacionesProductosBO", my solution has a a proyect with the reports, forms, resources, business binding sources and another proyect with the BOs.

In other reports that has data of only one BBS there is not problem at all using scripts, but in this it seems that the "child BO" can not be found, I already add the Imports clause but not work.

I have read many post about master/detail reports and can not found anything, most post are relatead to Report SharpShooter. I think than I'm not the only one using xtraReports, maybe someone already has this problemas and can point me in the right direction.

If the only solution is have the BOs and the BBSs, forms, reports and all in the same proyect, Can you tell me how can do this, because at this time I have all in two proyects.

Regards

By Trent L. Taylor - 4/14/2009

You may be going down a road that is more difficult than you need.  The very first thing I would suggest is looking at the StrataFlix sample as there is a master/detail sample report in there and it also shows how to setup the BBS and child BBS.  Instead of handling a DataSourceRowChanged event, all of this will already be handled within the BBS and child BBS (actually the parent BO will apply the filter within the exposed child property).  So all of this is encapsulated within the data source.

Before I get much deeper, I would stronly suggest looking at StrataFlix as this has already been done and it should get you going down the right path.  Also, the StrataFlix sample uses RDL reports, not Report Sharp-Shooter.

It is also very important for you to understand that whether you are using Report Sharp-Shooter, Crystal Reports, Active Reports, or XtraReports, this is all going to be done the same way.

By Juan Carlos Pazos - 4/14/2009

Thanks Trent

I will take a look to StrataFlix, in past I done that but I could not understand the logic you use, so I will study this time more carefully, trying to understand how you do it and how can I implement in my own application.

Regards

By Edhy Rijo - 4/14/2009

Juan Carlos Pazos (04/14/2009)
I will take a look to StrataFlix, in past I done that but I could not understand the logic you use...


Hi Juan Carlos,

I have been down that route with StrataFlix and one thing that helped was to use the debugger and set some break points to follow the code.
By Juan Carlos Pazos - 4/14/2009

Edhy

Thanks, I will use those for first time.

Regards