StrataFrame Forum

StrataFlix and Report SharpShooter

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

By Edhy Rijo - 9/26/2008

Hi Trent,

I am about to start working on some reports for my 1st SF project, for now I will used the free version of Report SharpShooter and honestly I have no idea where to start even to create the report and use the BBS with it.

Do you think you guys could put together a simple quick sample report in StrataFlix using Report SharpShooter?

You already included 3 reports using MS report, but I am really stuck on this and would like to use Report SharpShooter instead.

By Ivan George Borges - 9/26/2008

I hate being repetitive, but you could have a look at this post:

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

BigGrin

By Edhy Rijo - 9/26/2008

Ivan George Borges (09/26/2008)
I hate being repetitive...

Hi Ivan,

Not a problem with being repetitive.  I have looked at those post, but still I am not able to start up with the build process of the reports.  I checked the RSS web site for any video on how to create a report and their help file is not that clear either.

I am re-visiting again your posts, but it would be very helpful, at least to me to have one of the reports included in StrataFlix done with RSS.

By Edhy Rijo - 9/26/2008

Ivan, I am doing this in the SimpleReportShooterSample:
  • Add a new item to the project based on "SF CustomBusinessBindingSource" template, named MyTest.
  • When the wizard shows I select the following:
    • BO = CustomerBO
    • Create a Reporting Business Object = checked.
    • Create a Custom Business Binding Source = checked.
    • Use a Namespace = Not checked.
  • The file MyTestBBS.vb is created with the following code:

Public Class MyTestBBS

     Inherits MicroFour.StrataFrame.Business.BusinessBindingSource(Of SimpleReportShooterSample.CustomersBO)

End Class

  • Now I build the project, open the Form1.vb and MyTestBBS is not shown in the Toolbox.  Everything else is showing fine in the Toolbox since I have AutoToolboxPopulate = True.
By Ivan George Borges - 9/29/2008

Now I build the project, open the Form1.vb and MyTestBBS is not shown in the Toolbox.  Everything else is showing fine in the Toolbox since I have AutoToolboxPopulate = True.

Hey Edhy, regarding to the toolbox, have a look at the Help file:

Also, I have built a sample project on how to generate a report with Report Sharp-Shooter and a CustomBusinessBindingSource, hope it helps.

Abraços.

By Edhy Rijo - 9/29/2008

Thanks again Ivan,

Will check your sample.

By Edhy Rijo - 9/29/2008

Hi Ivan,

Thanks a lot for your sample and the reference to the help file, I was obviously missing the ToolBoxItem part and assuming it should show up by default.

When creating a report I noticed you use "InlineReportSlot", is there a particular reason to use this in SF application, or it is just your preference?

By Ivan George Borges - 9/29/2008

When creating a report I noticed you use "InlineReportSlot", is there a particular reason to use this in SF application, or it is just your preference?

No special reason, really. To be honest, I haven't tried any of the others.

Glad it helped over there. Wink

By Trent L. Taylor - 9/29/2008

The InlineReportSlot will give you some additional flexibility if you choose to serialize the report and store it in a database (which is what we do in our medical software).
By Ivan George Borges - 9/29/2008

Yeah! Of course, now I remember why I chose it. BigGrin
By Dustin Taylor - 9/29/2008

Ivan's so smart he has forgotten more than the rest of us ever learned BigGrin
By Ivan George Borges - 9/30/2008

LOL!

Tongue

By Edhy Rijo - 9/30/2008

Hi Ivan,

How would you handle a report for a One 2 Many relation like (Customers->Orders->OrderItems)?

Do we have to create a BSS for each table?

P.S.

Sorry I keep asking about this, but I have not other experience with report writers except for VFP.

By Trent L. Taylor - 10/1/2008

Yes.  You will create a BBS for each each table in question.  StrataFlix actually shows you how to do this.  If you look at the movie profile report or the people profile report, you will see that each BO that will be used has its own reporting BO and BBS.  The root object will then have the private fields for each of the BBS classes that need to be exposed.

For example, in the People Profile Report, the PeopleBO is the root BO for this report.  If you look at this class, you will see that there are two additional exposed child tables: MovieCast and PeopleImages.  These are children tables of PeopleBO.  If I were to have a grandchild, for example, if MovieCast had another child, then I would open up the MovieCastBO and add all of the BBS classes that are children of this class. 

Also, look at the properties of the exposed BBS classes and you will see how the filter is applied to each child BO so that it syncs up with the parent record.

By Edhy Rijo - 10/1/2008

Thanks Trent.

I will review those classes in detail. 

Also I noticed that in Ivan's sample the RSS preview window is created and in StrataFlix you have a custom Preview Form to handle all reports and it looks like a better approach.  Would you guys consider adding a RSS version report to StrataFlix using the same nice logic as the existing MS reports?

By Ivan George Borges - 10/2/2008

Hey Edhy.

Have a look at the Report Sharp-Shooter samples, there are a lot of things demonstrated there. Check the CustomDesignerViewer folder.

In short, you just add a new form to your project and drop a Perpetuum ReportViewer control in it.

Have a look at the same sample attached.

Hope it helps. Wink

By Edhy Rijo - 10/2/2008

Thanks Ivan,

It does help a lot.  I will check the samples as suggested, and the attached sample is very clear.

By Ivan George Borges - 10/2/2008

Great to hear that. Cool
By Ross L. Rooker, Sr. - 1/24/2009

You indicated that in the medical billing software you serialize the reports and store them in a database. Can you elaborate on how you do this and then later let a user run the report?
By Trent L. Taylor - 1/25/2009

I'd be happy to, Ross.  It is actually pretty simple in concept and once you get it implemented within your environment it is simple in use as well.  This has turned out to be a wonderful solution for us and it makes it very simple to modify and redistribute reports.

Here are the elements:

  1. You will need to create a report designer within your application that uses the run-time designer components of Report Sharp-Shooter.  This allows you and your users (if you choose) to design the reports within the application at run-time instead of within the VS IDE.
  2. You will need to create your report structures that will house your reports, templates, style sheets (if you elect to use them, I would recommend it), and the serialized report data.  The report data is just a child of a report, but it is always a good idea to separate the data into another table as this is where the bulk of the size will be and will make loading up BOs, tree-views, etc. faster and you only retrieve the serialized report template when you are deigning it or running the report.
  3. You will create the data sources used within the run-time designer within the VS IDE.  So these will be static.  We use reflection to populate our designer at run-time with the data source that we want the report to use.  So when we launch the designer within our report designer, we create the data source object by setting the DataSources programmatically to an instance of the data source selectedWe set the style sheets, masgter pages, etc. the same way (prior to loading the designer).
  4. You can just use the standard BinaryFormatter class to serialize the data to and from the reporting database.
  5. Finally, the basic structure that is shown in StrataFlix in regards to the ReportDataSource, etc. is what we use in our medical software, just modified a bit to support the data driven reports.  But the design of the data sources will be the same.
By Richard Keller - 1/26/2009

I think that this would be a great addition to the next version of SF.  Just like using Devexpress controls.
By Edhy Rijo - 1/26/2009

Hi Richard,

I agree with you to add this to an enhancement, I am even willing to pay a fee for it as an adding in order to have a report manager tool for Report SharpShooter.

I am still new to .NET and tanks to all the contributions here (Ivan, Trent, Greg, etc.) I have been able to produce reports easily with RSS and SF-BBS, but I am sure would like to have a tool like the Security Module to handle all my reports in a single place.