StrataFrame Forum

Reporting

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

By Chan - 9/3/2007

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
By StrataFrame Team - 9/3/2007

Since you will not be updating the data through your report, you could use the DataSources collection directly to retrieve your values and even use a typed data set at design-time to build the report.  However, you can also use a business object to build the report by creating a new class that inherits BusinessBindingSource and set the BusinessObject property within the constructor of the new class.  This initializes that BBS class to use that business object type, and you can then drop one on the report and have access to all of the fields on the BO at design-time.
By Geoff Hirst - 10/11/2007

Hi Chaps,

Very new user. Looking at reporting options, I have DevExpress Xtrareports, however if I try and drop one my business objects on an xtrareport I get the message

The object that the business object has been dropped on must implement
MicroFour.StrataFrame.UI.Windows.Forms.IContainerControl.

Now, I have seen a post elsewhere about creating a class, inheriting the BusinessBindingSource, when I tried this, I was not allowed to drop the object on the xtrareport, so I am definitely missing something or doing something wrong. I am considering that xtrareports is not an ideal companion to Strataframe. Sick

I have also looked at an alternative reporting solution, Report Sharp-Shooter, recommended elsewhere on this forum, but again, when I tried to use the reportmanager component, it could see the objects on my form as databindings, but when I actually tried to design a report I could not get a datasource to appear.Crying

So, right now I am a bit stonewalled, any suggestions are appreciated.

Thanks in advance

By Robin J Giltner - 10/11/2007

At my workplace, we exclusively use DevExpress XtraReports in our application.  Like it was said above, the Datasources our Reports use are Classes that inherit the BusinessBindingSource.  Something like

Public Class BusinessObject1DataSource

          Inherits MicroFour.StrataFrame.Business.BusinessBindingSource

          Public Sub New()

                 Me.BusinessObject = New MyBOLibrary.BusinessObject1

         End Sub

End Class

And these can be dropped on the DevExpress Reports without problem.  I have at times gotten the error about implementing the IContainer, and simply closing the report and re-opening it, has allowed me to continue.

Robin Giltner

By Peter Jones - 10/11/2007

Hi Robin,

We also plan on using XtraReports exclusively but haven't got into that part of our project yet. The only work we have done was, in the early days, to just confirm that moving from Crystal Reports to XtraReports was an option given we wanted to stay, as much as possible, within the DevExpress/StrataFrame toolsets. Previously we used VB6 and Crystal.

That being said any tips/tricks you are willing and able to share would be very much appreciated.

Cheers, Peter

By Robin J Giltner - 10/12/2007

We didn't have a lot of trouble using the DevExpress XtraReports, the only hard part we had was creating Master-Detail-Detail-Detail-Detail reports.  But once we figured out how to nest detail reports and manipulate the business objects in the datasources for each DetailReport on it's parent Datasource RowChanged event, we were in business.

Robin Giltner

By Trent L. Taylor - 10/12/2007

We have started using Report-Shooter from Perpetuum Software.  When we made a decision on our reporting engine, we tested all major (and some not so major) report engines.  This included XtraReports, Active Reports, Data Dynamics RDL Reporting, Telerik, .NETs RDL reporting, and others.  Report-Shooter in the end was a very easy to implement and solid solution providing easy integration into an application as well as a very easy environment in which to tie in a StrataFrame BO.  This month we will post a sample as well as more information regarding Report-Shooter.  Below are some features that really sealed the deal:

  • Master Report Support
  • Extremely Extensible Object Model
  • Run-time designer components
  • Easy Dynamic Report Creation
  • Easy Database Integration
  • Easy-To-Use Designer (Our end-users can use the same editor to modify a template as we did to create the report template)
  • Easy StrataFrame BBS Data-Source Integration (We will provide samples on how to do this...it is VERY easy!)
  • Fast!!!!!
  • 100% customizble interface for preview and designer components (Use SF ThemedToolsStrips, etc. if you choose to have a seamless appearence)

We will post more information about this report engine towards the end of the month.  But we have been using it for a while now and the more we use it the more we like it....very nice product.

Here is their site: www.perpetuumsoftware.com

By Peter Jones - 10/12/2007

Hi Robin,

Thanks for the response - it all sounds painless.

Trent - I will look at the samples with interest - what we found very attractive about the DevExpress approach was leverage of skills developed using other DX components.

Cheers, Peter

By Michael Reese - 11/13/2007

I am at a point where I am considering to move to Report Shooter.

I found the post very helpful however your reference activereports appear to be the RDL version. How do you compare the integration of SF with ActiveReports.Net 3.0? My product uses the report designer and it is a little tough for the user to build reports.

Do you find attaching to the business objects easier to accomplish using report shooter?

Also, are you still planning to release samples?

By the way, the prices is much lower. 

Michael

By Trent L. Taylor - 11/13/2007

How do you compare the integration of SF with ActiveReports.Net 3.0?

We looked at ActiveReports.NET in great depth as this was the engine we were probably going to go with until we found Report-Shooter.  It tied into the same data sources as Report-Shooter very well using a BBS...however, it is much more complicated to get the entire report engine for your application off of the ground.  It is a very good report-engine though, it just did not have all of the bells and whistles that Report-Shooter did...especially for the price!

Do you find attaching to the business objects easier to accomplish using report shooter?

Absolutely.  We actually created a data source that inherits the BusinessBindingSource then it automatically exposes and attaches the BO.  Using this approach you can also include child records as collections (properties exposing another BBS data source).  So this has turned out to be a very good solution for us.

Also, are you still planning to release samples?

Yes.  We have just been extremely busy as I am sure that you can relate.  We do plan on creating a reporting sample showing how to create the data sources as well as use Report Shooter.

By Jc Martinez - 11/14/2007

I’m in the process of not only learning VS 2005 and .Net but also SF. One thing I’ve found myself doing by reading these posts is making a list of other tools for my transition to this platform, one is a report writer. Coming from MS Access report writing was and is an easy and powerful tool.

 

My question is do I really need a 3rd party tool to get the same power or can I accomplish this by using VS 2005’s crystal report?

 

I’ve also noticed that I may also need a better data grid, deployment tool, help developer, etc. and It seems to be adding up…so much for a quick and painless transition.Crying

By StrataFrame Team - 11/19/2007

so much for a quick and painless transition. Crying

Aye, it does stack up rather quickly. 

As for your Crystal Reports question, yes, you can probably accomplish everything you need to with Crystal Reports, but I think the reason that we avoided using them was because when Trent looked into it, they have a runtime licensing component... so you have to pay to distribute it to your users.  I'm not positive on that, but I'm pretty sure.

On a lighter note, with .NET several tools developers package several components into one package, for example, DXperience (DevExpress suite) contains reporting, controls, and a grid all in one package.  So, if you do your research and buy right, you can save yourself a little bit of money.

By Jc Martinez - 11/19/2007

Hi Ben, Thanks for you reply.

 

Crystal report gives you a free runtime license for distribution on “Thick Clients” when the engine is installed along with the app. This changes in a server/web scenario. So I’ll go this route to initially cut cost since my app will initially run as a “thick client” but eventually I’m looking at making it a SaaS smart app so I'll probably look into purchasing Report-Shooter that you guys recommended.

 

Here is the licensing information for Crystal Report if others need it:


http://www.businessobjects.com/products/reporting/crystalreports/net/licensing.asp

 

And yes I’m looking at purchasing DevExpress in part because you can buy it peace meal cutting my upfront expenses plus they include their XtraEditors Library with some control so that just makes it more tempting.Rolleyes

 

Thanks again, JC

By Larry Caylor - 12/10/2007

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

By Ivan George Borges - 12/10/2007

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... Hehe

By Rogerio Mauri - 12/10/2007

Following a recommendation of Ricardo Quartier (Brazil), I analyzed the package of development of the Perpetuum Software. They are really adjusted to our necessities of integration with StrataFrame applications. (*)

(*)by AltaVista - Babel Fish Translation

Rogério

http://blog.licitec.com.br

Wink

By Trent L. Taylor - 12/11/2007

We have not created a robust sample yet.  However, we are full planning on doing this and including it in the next update.  I have sent several small and uncomplete samples around, so if you are in a rush I will find one and send it your way.  Otherwise, if you have a week or two, then you may want to wait so you can see a better sample. Smile
By Larry Caylor - 12/12/2007

Ivan, thanks for the example. If that's similar to what Trent is doing, I'll head down that path. Otherwise I wouldn't mind seeing what Trent has done, even if it's not a polished sample.

-Larry

By Trent L. Taylor - 12/12/2007

I am sure that it may have been one that I sent Ivan's way.  I posted a very simple sample today on another thread:  http://forum.strataframe.net/FindPost13001.aspx .  It will at least give you an idea relating data sources, etc.
By Ricardo Quartier - 12/15/2007

Yo Rogerio thanks for the remind...

Smile

By DanMetcalf - 1/30/2008

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! 
By Ivan George Borges - 1/30/2008

Hey Dan.

Glad I could help. Cool

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.

By DanMetcalf - 1/31/2008

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....

By Ivan George Borges - 1/31/2008

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?


 

By DanMetcalf - 1/31/2008

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!

By Ivan George Borges - 1/31/2008

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" ?  Hehe

By Greg McGuffey - 1/31/2008

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). Tongue
By Ivan George Borges - 1/31/2008

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. Hehe

By DanMetcalf - 1/31/2008

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...Whistling

By Ivan George Borges - 1/31/2008

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. Wink

By StrataFrame Team - 2/1/2008

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.

By Trent L. Taylor - 2/1/2008

kill snakes with a Colt 38

LOL...how about a Colt 45 Wink....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 BigGrin

By Ivan George Borges - 2/1/2008

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. BigGrin  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.

By DanMetcalf - 2/1/2008

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.....

By Ivan George Borges - 2/1/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... Tongue

By Greg McGuffey - 2/1/2008

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 Pinch
By DanMetcalf - 2/1/2008

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... Tongue

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.

By Trent L. Taylor - 2/1/2008

LOL...sorry, I am all for the beans since we will be outdoors BigGrin 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 Tongue