StrataFrame Forum

Crystal Reports

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

By Elio Reyes - 10/2/2008

Is welcome any experience with this tool, How to use BO with Crystal Reports.
By Trent L. Taylor - 10/3/2008

It will be the same with Crystal as it would with any other reporting environment.  You will want to use the Custom BBS classes.  For more information on this, please load the StrataFlix sample as this shows you exactly how to create BOs and Custom BBS classes for reports.  Also, you can refer to the docs in regards to the Custom BBS class as well.
By Peter Jones - 10/5/2008

Hi Pedro,

While not addressing your specific question I can say we successfully use BO's with Crystal Reports. We went through the process of looking at Sharp Shooter and the DevExpress report writer (we use DevExpress for our UI) and decided to stay with Crystal Reports because it was the only tool of the three that gave us the functionality we needed in Cross Tab (Pivot) reports.

Cheers, Peter

By Elio Reyes - 10/6/2008

Chess



I'm glad to here that, well my question is in this way :



1.- We use crystal in all environments, like VFP, VB, Xbase++... and use the designer to make reports, in this tool we have the database, tables and fields for drag into report designer, but now with StrataFrame we had not found the way to do this.



2.- I had used the BBS that told me Trent, in others controls like grids .. an else .. it go well but in crystal I don't find this object to put it into report.



I will appreciate your help, this is very important for us



Thanks SF
By Trent L. Taylor - 10/6/2008

2.- I had used the BBS that told me Trent, in others controls like grids .. an else .. it go well but in crystal I don't find this object to put it into report

You need to use the Custom BBS not just the BBS.  This was released in 1.6.6 and allows you to create reporting BOs as well as wrap any BO without the need for dropping on a BBS.  I think I have already mentioned this on another post, but if you would download and install the StrataFlix sample it will show you exactly how to do this.

By Elio Reyes - 10/9/2008

do you have a video .. how to create a Custom Business Binding Source ?



Because when I finish to make .. I can't drag and drop into crystal reports design.



Thanks in advanced
By Ivan George Borges - 10/9/2008

Hi Pedro.

This post might help you:

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

By Dustin Taylor - 10/10/2008

Yep! Just add that toolbox attribute as Ivan pointed out and you should be able drag it in from your toolbox Smile.
By Edhy Rijo - 10/10/2008

Dustin Taylor (10/10/2008)
Yep! Just add that toolbox attribute as Ivan pointed out and you should be able drag it in from your toolbox Smile.

Hi Dustin,

I am working on creating reports, and have been using the "SF Custom Business Binding Source" template, and manually adding the toolbox attribute, is there a configuration somewhere which will add this attribute by default?

By the way, thanks a lot to Ivan and the StrataFlix sample which has helped me a lot in getting started with .NET reporting, specially the Report Sharp-Shooter, and the generic logic in StrataFlix to generate the reports, very clever.

By Ivan George Borges - 10/10/2008

Hey Edhy.

You are most welcome! Wink

By Dustin Taylor - 10/10/2008

We intentionally left it out of the item template, actually.  The reason being that, in reporting scnearios, you can end up with so many custom BBSs that it would put a whole new meaning to "blue cog of death" if they were all flagged to show up in the toolbox w00t

We create and manage the custom BBSs in code, which we find cleaner (and less blue coggy), but you can always make your own template based off of our standard BBS item template and modify it to include the toolbox attribute.

By Edhy Rijo - 10/10/2008

Dustin Taylor (10/10/2008)
We create and manage the custom BBSs in code, which we find cleaner (and less blue coggy)

Understand and it is reasonable, but then there must be something I am missing, for example to design the reports, I drop a ReportManager into the form where the report will be called, then I drop an instance of the reports BBS in the same form, so I can create the report's Data Sources and design the report, is there any other way to do this that would not required all my report's BBS to have the ToolBox attribute?

Please see the attached image.

By Trent L. Taylor - 10/10/2008

This is about to become a really long post if I try and explain a different way to do this.  You can do it the way that you are going at it just fine without issue.  But there are two things that we do here.  First, we actually program with the AutoPopulateToolboxWindow set to False so in this casn we just open up the designer file and add the BBS manually (we do the same for BOs) since the toolbox population can take longer and longer the more than you have.  That is the easy part of this explanation.

The long drawn out part is what we actually do in our medical software.  We actually design all of our reports at run-time after we have designed the data sources, etc.  This allows us to change and create reports in the field.  In this case, we define the data sources, and then they become available as a data source selection at run-time.  So all of our reports are stored in a database instead of in a code file.  Now the BBSs, data sources, report criteria forms, etc. are all in code, obviously.  But the actual report itself is data stored and driven.

You can see all of the reports available here in our report designer.  I can add a new report, template, etc.  all through the run-time interface.  When I create a report, I can then select the report and set the data source:

This is a BBS that gets associated with the report when run.  So in this case, when we open the designer within the template we create and expose the data sources to the Report Sharp-Shooter report and design controls so that they can be accessed and referenced just as though they were dropped on a form.

Within the designer, you can see all of the elements associated with the data source and just drag and drop them onto the report:

Finally, before the question comes up, we really cannot give this to you or pre-plumb this as it is really specific to our medical application and our needs.  Most likely, you do not need anything this elaborate so it would be overkill for most developers.  However, we have very complex and specific needs so we had to take this approach so that it allows our users to copy over the default templates and change every report in the application.  Also, for us to provide this as an app or module to purchase like RBS, it would get really complex and muddy as this is part application, but also part customized.  So it is really entrenched into our medical app.  But this should at least help you understand Dustin's comment and understand how to take a different data driven approach if you have this need.

By Edhy Rijo - 10/10/2008

Finally, before the question comes up, we really cannot give this to you or pre-plumb this as it is really specific to our medical application and our needs.

Darn, I knew you would say something like that BigGrin.

Seriously, thanks, it does explain many things, and you are right, that kind of flexibility is not always needed by the end user.  So in my case it would be safe to do one of the following:

  1. Design reports as I am doing, in the form where they will be called, and then remove the reports BBS from this form and the toolbox attributes since once the report is complete, they would not be used unless I need to add or change a field?
  2. Or, could I create a ReportManager subclass in a temporary form used to just create all reports, then in each forms where the reports would be used, create an instance of that ReportManager subclass to use the report?

If number 2 can be done, I would prefer that path, since I notice that in the ReportManager you can have many reports and many Data Sources to assign to those reports, this way, I would have some sort of centralization at least to create the reports.

By Trent L. Taylor - 10/10/2008

You could do your #2 option, but the only thing I would caution on this one could be size and sluggishness of you get a lot of reports.  In our medical application, we will have over 200 reports.  This on a single form would kill it, but if you are only going to have a couple of dozen, then it wouldn't be that big of a deal.  Even if you go with option #2 and run into performance issues at design-time (or run-time), it shoulnd't be too difficult to break it apart if you had to.