Chan
|
|
Group: Forum Members
Posts: 533,
Visits: 2K
|
Hi,
I would like to know, what is the best practice of reporting using SF?
My report could be DevEx XtraReport, or just on screen. Should I use BO, or access DataLayer directly?
Thank you
|
|
|
Larry Caylor
|
|
Group: Awaiting Activation
Posts: 592,
Visits: 3.7K
|
Any progress on a sample of what you derived from BusinessBindingSource to work with Report Sharp-Shooter? I'm currently using Active Reports 2.0 and I thought I should take a look at the alternatives before upgrading to 3.0 -Larry
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
Hi Larry. I'm currently using Sharp-Shooter. I bet the guys will post a sample, but this might get you going. I assume you have donwloaded and installed the trial (http://www.perpetuumsoft.com/) To use a SF Business Object as a datasource: Public Class MyBOReportBBS Inherits MicroFour.StrataFrame.Business.BusinessBindingSource#Region " Constructors " ''' <summary> ''' Default Constructor ''' </summary> ''' <remarks></remarks> Public Sub New() Me.BusinessObject = New MyBO() End Sub #End Region #Region " Public Methods " ''' <summary> ''' Populate the data source ''' </summary> ''' <remarks></remarks> Public Sub Fill() If Not Me.DesignMode Then CType(Me.BusinessObject, MyBO).FillTop100() End If End Sub #End Region End Class Now, that will be your datasource. Of course, it is just a sample, you can grow from there. I'm usually inheriting the BO first, and then wrapping it with the BBS, so if I need to do anything specific to the report, I will do it in the inherited BO. After that, on a form, drop a Report Sharp-Shooter ReportManager. Also drop your MyBOReportBBS. Double click your ReportManager and on the Reports Tab, Add a new InlineReport. On the Data sources Tab, add a new data a new data source, name it as you wish. Back on your Reports Tab, click the InlineReport you created and click Run Designer. Go to File / New and create a new Standard Report. In the Standard Wizard, click on the Plus sign and add a DataSection. On the right, you will find a Data Source textbox, click the ... button an choose yours. Add the fields and play with it. Hope I could make some sense with this...
|
|
|
DanMetcalf
|
|
Group: Forum Members
Posts: 7,
Visits: 442
|
Ivan -- I got Sharp-Shooter to finally work for me -- and the instructions you posted were very helpful! We differ only in the final final step -- in the Standard Report Wizard --- I kept getting locked out for some reason -- the datasource ellipsis just doesn't like me there. If I skip that step, I'm ok. Since the Sharp-Shooter documentation gives me indigestion, your step-by-step instructions were a perfect start -- thanks!
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
Hey Dan. Glad I could help.  Yep, the datasource ellipsis has a known bug that comes up when you first create the new report, I have talked to them about it. And have you downloaded the last updated version? The help file is a lot better. Cheers.
|
|
|
DanMetcalf
|
|
Group: Forum Members
Posts: 7,
Visits: 442
|
Ivan-- Thanks Again! v3.7 --- and browsing through Suite_Eng.Doc, as we speak! Hopefully, I'll find something akin to the RowPopulating event handler, where Strataframe has definitely spoiled me. It would be nice to replace row values in a Report Shooter inline report with something meaningful from another BO --- much like the way SF does with e.Values().Displayvalue....
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
Hi Dan. Have a look at your Designer. If you have your Document property open, you will see under Script some properties you can setup for a general purpose, like Imports (for references), COMMON SCRIPT, GENERATE SCRIPT... and then, if you click any control on your lay-out, you will also find a GENERATE SCRIPT where you can enter any code, something like: Dim loBO As New MyBO txtMyControl.Text = loBO.GetInfo(GetData("MyBOReportBBS.my_Field")) loBO.Dispose() Or anyhing you want. Would that help?
|
|
|
DanMetcalf
|
|
Group: Forum Members
Posts: 7,
Visits: 442
|
Jangling Spurs! Works like a Charm! Here's my final code: Dim lobo = DataObjects("MyVendorNames") loBo.BusinessObject.seektoprimarykey(GetData("MyBBS.Provider")) Dim last = loBo.BusinessObject.LASTNM Dim first = loBo.BusinessObject.FIRSTNM textbox11.Text = first & " " & last As you can see, I had to walk my way through the "BusinessObjectProperty" of the BusinessBindingSource Object to expose the strong-typed properties I was after. Ivan -- thank you for very much for your help!
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
Dan, you are very welcome. I see you are concatenating First and Last Name properties of your BO. Have you had a look at Custom Properties? Have a look at the Help File, under Application Framework / Business Layer / Common Business Object Tasks / Adding Custom Field Properties... and see if it gives you some ideas. You can also follow the Tutorial, Creating a WinForms App [VB] / Adding Custom Field Properties. Now, just one thing... what is the meaning of "Jangling Spurs" ?
|
|
|
Greg McGuffey
|
|
Group: Forum Members
Posts: 2K,
Visits: 6.6K
|
Now, just one thing... what is the meaning of "Jangling Spurs" ? I think it's from the "Spur-Jangled Banner"? Old cowboy song I think (mostly old cowboys sing it).
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
ROFL I would enjoy being a cowboy... I asked Trent if we could ride horses and camp on the desert next time I visited, have beens and bacon, kill snakes with a Colt 38... not sure he really enjoyed the idea.
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
kill snakes with a Colt 38 LOL...how about a Colt 45 ....Oh, and I saw that post where you are signing me up for beer again....I might just have that chicken suit waiting for you next time
|
|
|
DanMetcalf
|
|
Group: Forum Members
Posts: 7,
Visits: 442
|
That surely saves on code --- Thanks! Dim lobo = DataObjects("MyVendorNames") loBo.BusinessObject.seektoprimarykey(GetData("MyBBS.Provider")) textbox11.Text = loBo.BusinessObject.cust_fullname As far as the Jangling Spurs, Ivan -- I'm not altogether sure... Perhaps I was reminiscing on an old Tex Ritter Song...
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
Great! I know it doesn't save a lot on this case, but I was just checking if you were aware of the concept. As for Tex Ritter, I've just had a look at his discography!!! I will see if I can download and listen to some of his songs.
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
kill snakes with a Colt 38 You could always come for the annual Rattlesnake Roundup... it's held in one of the surrounding little towns around Amarillo (Childress, maybe, or Chillicothe, but that might be too far away). A bunch of people get together and scour the brush looking for rattlesnakes. They capture them and milk them for the venom and donate the venom to the company that makes the antivenom carried by the local hospitals. Sounds like fun, right? Colt 38 Oh, and most of the "cowboys" around here don't carry those much any more. It's mostly 1911-style .45s.
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
They capture them and milk them for the venom and donate the venom to the company that makes the antivenom carried by the local hospitals. Sounds like fun, right? Yeah, it does! Even more when thinking about "milking them", I got the idea, it just sounded funny to me. Anyway, I wouldn't be able to shoot them, and milking them sounds even more exciting. Oh, and most of the "cowboys" around here don't carry those much any more. It's mostly 1911-style .45s. Oh, well, guess I will just keep watching them on the movies.
|
|
|
DanMetcalf
|
|
Group: Forum Members
Posts: 7,
Visits: 442
|
We could sure use a Rattlesnake Roundup here in Santa Cruz. Although I don't think we'd get much value from milking. Thanks guys --- I hope I can make it back to Texas some day --- my friend is from Katy and every now and again I take her to lunch just to get her to say "OIL". But I really love Ivan's quixotic, if not romantic, sense of adventure for the Great Southwest! His imagery of all of us sitting around a campfire, maybe, eating a real cowboy's dinner, is quite compelling. I see us there, too, but with laptop in hand, and the glow of web colors irradiating the night sky.....
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
I see us there, too, but with laptop in hand, and the glow of web colors irradiating the night sky..... Come on, Dan! Don't spoil it...
|
|
|
DanMetcalf
|
|
Group: Forum Members
Posts: 7,
Visits: 442
|
Ivan George Borges (02/01/2008)
I see us there, too, but with laptop in hand, and the glow of web colors irradiating the night sky..... Come on, Dan! Don't spoil it...  Sorry, Ivan. I was just trying to entice Trent. I'll go ahead and take out the laptops if you take out the beans. Greg has a good point about the Blazing Saddles issue. I'd hate to find ourselves embroiled in controversy after a good bowl of beans. And perhaps that was Trent's hesitancy all along.
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
LOL...sorry, I am all for the beans since we will be outdoors  And I suppose our laptops will last fora few hours until the battery dies...and then we will have to figure out something else to do
|
|
|
Greg McGuffey
|
|
Group: Forum Members
Posts: 2K,
Visits: 6.6K
|
His imagery of all of us sitting around a campfire, maybe, eating a real cowboy's dinner, is quite compelling. Brings back memories of a specific scene from Blazing Saddles
|
|
|