Binding a control to a regular form property?


Author
Message
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
When using SF we have the BindingField which is based on the BusinessObject property of the control, sometimes I have controls which I would like to bind to a new form's property and no business object, so I can reference this property instead of the control itself.



In this case if I use a SF control, can still use its BindingField property with not BusinessObject? or should I just add a regular property and assign the control value in the GET/SET?


Edhy Rijo

Replies
Charles R Hankey
Charles R Hankey
StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)
Group: Forum Members
Posts: 524, Visits: 30K
I've been working a bit more with Xtrareports now, so i wanted to share some observations and this thread seems a good place to tack it on, as Peter was so helpful.

First, there is a 42 minute video of a DevExpress Webinar ( god I love that company ) that was very helpful for me getting two very basic things worked out : having preview data available at design time when the datasource is a parameterized sproc and how to hook up the params through the interface.


tv.devexpress.com/#XtraReportsWebinar1

Key concept is to drop a sqldataadapter on the Xtrareport design surface and use that to generate the dataset ( in my case off a sproc )

The sda lets you set default values for params which will be used at design time in preview mode.  A sqltableadapter won't.

(sqldataadapter is not in the toolbox by default so you have to right-click the data tab, pick Choose Items and add it )

The video explaiins everything else very clearly.  ( the part I messed with a bit was trying to drag and drop fields from the datasource treeview onto the report - I needed to find the Fieldlist on the Xtrareports menu and D and D from there.  That is also where you create calculated fields)  

One other comment re Peter's post - there is a third alternative to denormalized tables and subreports - detail bands.  As Peter is a long-time xtrareports user he probably started designing before DevExpress added child detail bands to the product.  They are now recommended over sub reports when the goal is just to have multiple child bands.

Old Foxpro developers will particularly appreciate how easy all this is, especially since we didn't get multiple detail bands out of the box until late ( too late ) in vfp 9

Anyway, my experience of DevExpress so far has been extremely positive and I love the XtraReports !!
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Charles,

Thanks for posting the link to the video, very interesting.  I was wondering how to get the data to preview with SF BO, but guess is not possible for now.  I kind of like the SP approach, even though that will require an stored procedure for each report, but is either that or no having preview available.

Using the method explained in the video, you also need to grab the connection string at runtime to avoid having to hard code it.

Edhy Rijo

Charles R Hankey
Charles R Hankey
StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)
Group: Forum Members
Posts: 524, Visits: 30K
You can build a sql select statement into the sqldataadapter rather than point it to a sproc and you'll get the same result, I believe. 

I am hosting the form that launches the report inside a SF app, so I think I can grab the connection from the application.  The connection string at design time is a different matter.

I'll keep posting as I work through this, but I'll probably post in User Contrib Samples for easy access.  I'm pretty convinced this is the way to go with SF apps.  I don't see any plus side to using SF business objects for reporting but am willing to listen to arguments in their favor.  Just don't see where the creating a propertyinside reporting bos for child stuff is near as fast as creating datasets from a sqldataadapter. 

Makes sense for CRUD of course, but for just grabbing data for reporting seems overbloated.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Edhy Rijo - 15 Years Ago
Ivan George Borges - 15 Years Ago
Edhy Rijo - 15 Years Ago
Ivan George Borges - 15 Years Ago
                     Well, welcome to the club :cool:

Congratulations in advance...
Edhy Rijo - 15 Years Ago
                         [quote][b]Edhy Rijo (06/26/2010)[/b][hr]Well, welcome to the club...
Ivan George Borges - 15 Years Ago
Charles R Hankey - 15 Years Ago
Edhy Rijo - 15 Years Ago
Charles R Hankey - 15 Years Ago
Edhy Rijo - 15 Years Ago
Terry Bottorff - 14 Years Ago
Charles R Hankey - 15 Years Ago
Edhy Rijo - 15 Years Ago
Ger Cannoll - 15 Years Ago
Russell Scott Brown - 15 Years Ago
Bill Cunnien - 15 Years Ago
Charles R Hankey - 15 Years Ago
Peter Jones - 15 Years Ago
             Thanks Peter! :smooooth:
Ivan George Borges - 15 Years Ago
Terry Bottorff - 15 Years Ago
Edhy Rijo - 15 Years Ago
                     I'll go view those and see if they answer my question. Thanks.
Terry Bottorff - 15 Years Ago
Charles R Hankey - 15 Years Ago
Terry Bottorff - 15 Years Ago
Peter Jones - 15 Years Ago
Charles R Hankey - 15 Years Ago
Terry Bottorff - 15 Years Ago
Peter Jones - 15 Years Ago
Terry Bottorff - 15 Years Ago
Charles R Hankey - 15 Years Ago
Peter Jones - 15 Years Ago
             Really awesome, Peter! :w00t:
Ivan George Borges - 15 Years Ago
Charles R Hankey - 15 Years Ago
Edhy Rijo - 15 Years Ago
Charles R Hankey - 15 Years Ago
Peter Jones - 15 Years Ago
Peter Jones - 15 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search