|
|
Sample codes, tips, random rantings on Crystal Reports, Crystal Enterprise etc...
-
Business Objects has released two tools to make learning and using the reporting API much easier. Here are some links:
Navigate the APIs related to Crystal Reports - view reporting and enterprise reporting API classes and objects etc. The interactive object model interface will take you through a decision tree of high level functionality questions related to your application and drilling into the object model boxes provides detailed access to the complete model structure. The right panel operates as a help screen and is context sensitive to the objects you click on.
http://support.businessobjects.com/global/interactive/xi/om/default.html?extcmp=devnews_na_0508_intobjmod
Using a Decision Tree to Navigate Complex APIs - The increasing complexity of software makes the task of selecting the right tool more and more difficult. This article references the above Interactive Enterprise Reporting Object Model as one possible solution to complex evaluations, and acts as a guide to the Object Model interface.
http://www.businessobjects.com/global/pdf/dev_zone/om_article.pdf
HTH,
Brian Bischof
www.CrystalReportsBook.com
|
-
I've been seeing some confusion lately about the release of Visual Studio .NET 2005 and Crystal Reports. I wanted to provide a FAQ to clear things up.
Crystal Reports .NET 2005
First off, Crystal Reports WILL be in Visual Studio 2005. I've been hearing rumors that it won't ship with VS 2005 and this is definitely not the case. Makes me wonder who starts these rumors and if they have any knowledge whatsoever of what is really going on.
Secondly, Microsoft has announced that VS 2005 will have a “Go Live“ license. This means that even though the product is still in beta, MS is saying its okay to use it in production applications. Personally, I don't know how they can say that a product is in beta, but you can use it in production. Anyway, you will also be able to use Crystal Reports in your production applications b/c it has the same license. I've been working with a recent build of the CR.NET Beta 2 build and it is very stable. Although I don't have the list of bugs that are being worked on, I'm sure that there are things that might not work for you and it will be more stable when VS 2005 is officially released later in the year. But I assume that the same applies to VS 2005. Anyone willing to use a beta product in production has a tendency to be more on the “bleeding edge“ rather than “cutting edge“ of technology and they know the risks involved.
Crystal Reports XI
Crystal Reports XI (version 11) was recently released and people are asking how this effects CR.NET 2005 with respect to features and compatibility. The first thing you need to understand is that CR.NET 2005 is built using a version of CR 10. It takes a long time to integrate a product into the .NET IDE and fully test it according Microsoft's policies. Thus, the customization and integration of CR into VS 2005 was started before CR XI was around. Crystal Reports XI has more and newer features than CR .NET 2005 has. Even though CR.NET 2005 is being released after CR XI, it should not be considered an upgrade over CR XI. The most powerful version of Crystal Reports will always be the latest full product release.
Since CR XI is available today and VS 2005 is still in development, CR XI will not be immediately compatible with VS 2005. Business Objects will issue an upgrade to CR XI to make it compatible with VS 2005 once MS ships it. The upgrade details have not been announced yet.
I hope this clears things up for everyone. If you have any questions please post them here and I will try to address them.
Brian Bischof
|
-
-
I just discovered a new trick for getting CR.NET to automatically format a number as a percentage. For example, let's say you have a number 55.99 and you want it to be printed as 55.99%. What I have done in the past is convert the number to a string and concatenate the '%' character to the end. Not bad if you only have to do this to one number, but a pain if you have to do this to more than one field. I was jealous of how CR stand-alone version has a '%' button that you click and it formats it automatically.
I went into CR10 and analyzed what is happening behind the scenes when you click on the '%' button. I found out that the button tells CR that the field is a currency value and it replaces the '$' with a '%'instead. Plus, it tells it to right-align the “currency symbol“. Wow, what a discovery. Here's how to do it in CR.NET. It looks like a lot of steps, but after you doing it the first time it is a breeze.
To format a number as a percentage in CR.NET:
- Right-click on the numeric field and select Format.
- Go to the Number tab and click Customize.
- Click the Currency Symbol tab.
- Click Enable Currency Symbol.
- Change the Currency Symbol to '%'
- Change Position combobox to '-123%'
- Click OK, OK to exit and save.
Hope this helps,
Brian Bischof
|
-
With the release of Service Pack 2 for Windows XP, some people may be concerned about how this effects their Crystal Reports applications. According to the Business Objects website, Business Objects officially states that Crystal Reports is not supported for SP2. It is recommended that you do not install SP2 for machines running Crystal Reports. That being said, it appears that most installations haven't really run into problems. I've searched the newsgroups/forums and have only seen a couple posts relating to SP2 problems. In general, if you do install SP2 on a machine with Crystal Reports (even though Business Objects does not support this), then the best thing to do is to turn off the personal firewall. The personal firewall can cause the most problems and should be disabled.
HTH,
Brian Bischof
|
-
Here's the announcement text, hope to see you all there.
ANN] October 28, "Data and Deployment with Crystal Reports for Visual Studio" chat
Join the development team of Crystal Reports for Visual Studio to discuss common deployment and data connectivity issues. Come discuss the best practices and common pitfalls for deploying Windows Form and Web Form applications. Find out what new deployment options are available when using Visual Studio 2005's ClickOnce deployment. Ask the team questions about connecting to data with ADO.NET, OLE DB, ODBC, data sets, and new data connectivity features that will be available in Crystal Reports for Visual Studio 2005.
Date:
October 28, 2004
1:00 - 2:00 P.M. Pacific time
4:00 - 5:00 P.M. Eastern time
20:00 - 21:00 GMT
(For a list of local time zones relative to GMT, please see
http://msdn.microsoft.com/chats/timezones.asp.)
Outlook Reminder:
http://msdn.microsoft.com/chats/outlook_reminders/04_VS2005_CR_Oct28.ics
Location:
http://communities2.microsoft.com/home/chatroom.aspx?siteid=34000014
To see a list of upcoming chats or set a reminder for this chat, see
http://msdn.microsoft.com/chats.
thanks,
yuying
|
-
A problem I found when working with Crystal Reports 8.5 (and earlier versions) was that it was always difficult to figure out everything happening behind the scenes. For example, when I'm given someone else's report to make changes to I have to figure out how certain objects are being formatted. If a field is in Bold, I can click on it and look at the toolbar to see if the Bold button has been selected. If not, then I can go into the Format Editor and look to see if conditional formatting is being used. The last options are to look at the Hightlighting Experts or my VB code if I'm using VB6 or .NET.
CR 10 fixes this problem by adding a new item to the Workshop Tree: Formatting Formulas. By clicking on Formatting Formulas you see a list of all the sections on the report. By clicking on the '+' next to a section it shows you the objects within that section. Again, click on the '+' and it shows you the properties that have formulas associated with them. You can examine each formula and make changes if you need to.
By adding the Formatting Formulas item to the Workship Tree, CR10 lets you quickly see which objects have conditional formatting and get a quick overview of all the changes being made to a report behind the scenes. Nice feature!
Hope this helps,
Brian Bischof
|
-
Lately I've seen a lot of questions posted stating that when and ASP.NET app is deployed to the webserver that the report icons appear as red “X”s. The BusObj support site lists two KB articles to help you resolve this.
In summary, there are two things happening. The first is that you are using Forms Authentication and you don't have permission to view the file crystalimagehandler.aspx. You have to modify the web config file to make this accessible. The second reason is that the app was deployed manually and not using with the merge modules. The files were not deployed correctly and you have to either move the files to the GAC or copy them to the same virtual directory as crystalimagehandler.aspx.
The KB articles are here:
A third problem I've seen, although I can't find any KB articles on it, is that the virtual directory that stores the images never gets created. As mentioned before, this can happen during a manual installation. To fix this you need to create a folder within the Inetpub/wwwroot folder called 'CrystalReportWebFormViewer2'. Copy from the development machine the file in the Viewers folder (and its subfolders). This is found in the Crystal Reports folder of the MS.NET Program Files installation location. After creating the folder and copying the image files over, make it an IIS application by right-clicking on it and selecting Properties. Then click the Create button. Now you ASP.NET application will be able to use the virtual directory to display the images on the report.
Hope this helps,
Brian Bischof
|
-
Q:
I want to use the “push mode“ with custom ADO.Net datasets passed to the report engine.
What is the best method to get the data ? Stored procedures or views ?
How can I get the fields definition at design time, without creating typed datasets?
A:
In theory, there is no difference if you get your data from stored procedure or views. It is entirely up to you what is best for your application. It is faster for us to use View and Stored Proc directly instead of data set.
You can design the report by connecting to a database with analogous data schema, and not use strongly-typed dataset. Then push in the dataset at runtime.
The report engine has the Database member will show users the field definitions.
Gook luck.
|
-
If you want to filter out the data your report returns such as only people whose last name starts with letter A-L, you'll want to use the SelectionFormula for filtering out the data at runtime. The formula editor allows you to create design-time filters. Here's the link to a tutorial that has the sample code for using the Selection Formula to do this filtering out of data:
http://www.businessobjects.com/products/dev_zone/granville_beta/GranvilleBetaOnlineHelp/html/crtsktutorialscrvselectionformulas.htm
The selection formula tutorial uses the API, and therefore is intended to create run-time filters.
The tutorial allows you to make selections in the web page that apply modified filters to the report upon clicking of the submit button.
Good luck,
Y
|
-
I got asked this and will give a really quick answer here:
you can use a csv file as the data source in either the version that comes with Visual Studio or the full retail version.
You can get to the csv file either using ODBC or DAO, I would recommend ODBC. I just did the below steps to make this work:
I exported my Yahoo mail addresses to a .csv file.
I then created a new ODBC data source, using the Microsoft Text driver (it's available in the ODBC connection wizard) to point to the directory containing the CSV file.
When I create the report, the columns of the CSV are displayed correctly, and the report works.
Good luck,
Y
|
-
We're doing a web chat on MSDN!! Come ask us questions! The dev team'll be there, I'll be there, the QA guys'll be there... Below is the official announcement...
[ANN] August 24, "Ask the Experts: Developing Applications with Crystal Reports for Visual Studio 2005" chat
Join the development team of Crystal Reports for Visual Studio 2005 to discuss how to develop Windows Forms and Web application using Crystal Reports for Visual Studio 2005. Come discuss and the new Beta 1 features; a few of the highlights include: ClickOnce deployment, design-time preview, automatic databinding, the ReportSource control, theme support and cascading style sheets for ASP.NET applications, and more. Members of our team will answer your questions, and they want to hear your suggestions and learn about your experience with the Beta 1. They will also address any questions or comments about using Crystal Reports for Visual Studio .NET 2002 or 2003.
Date: August 31, 2004 1:00 - 2:00 P.M. Pacific time 4:00 - 5:00 P.M. Eastern time 20:00 - 21:00 GMT (For a list of local time zones relative to GMT, please see http://msdn.microsoft.com/chats/timezones.asp.)
Outlook Reminder: http://msdn.microsoft.com/chats/outlook_reminders/MSDN_SMS_Aug3104.ics
Location: http://msdn.microsoft.com/chats (then click the name of the chat to enter the chat room)
For more information about Visual Basic .NET, see http://msdn.microsoft.com/vbasic/ To see a list of upcoming chats or set a reminder for this chat, see http://msdn.microsoft.com/chats. For archives of previous chats, see http://msdn.microsoft.com/chats/recent.asp.
|
-
re: Feel free to ask me questions
We are trying to send notification email to the user who scheduled the report. I know we can set up the server to notify the users email. I want to know if we can programmatically modify the email address and body through the SDK.
A:
You can change anything on the infoobject and it will be reflected when the object is run.
But this is a little risky to write code like this because you're changes may happen after the object has started to be scheduled, in which case your changes will not be picked up.
Here's sample code to set it when scheduling.
' This example shows how to modify the alert settings of the "Alerting" sample report '
Sub Alerts(IStore, ReportID)
Dim Result, Report
'Query for a report.
Set Result = IStore.Query("Select SI_PROCESSINFO From CI_INFOOBJECTS Where SI_ID = " & ReportID)
Set Report = Result.Item(1)
Dim ReportInterface
'Retrieve the report interface.
Set ReportInterface = Report.PluginInterface
Dim Alerts, Alert
'Specify the alert information that will be displayed in the alert notification email.
Set Alerts = ReportInterface.ReportAlerts
For Each Alert In Alerts
Alert.AlertSetSize = 3
'Select the default viewer URL
'You can also specify a specific viewer URL: " http://webserver/virtualpath/viewer.csp?id=%SI_ID%"
Alert.ViewerURL = "%SI_VIEWER_URL%"
Next
'Schedule the report and send the report alerts to an SMTP server.
'Set the report's scheduling options.
Dim ScheduleInfo
Set ScheduleInfo = Report.SchedulingInfo
'Run the report once.
ScheduleInfo.Type = 0
'Run it right now.
ScheduleInfo.RightNow = True
'Set the destination's scheduling options.
Dim SMTP, SMTPSchedulingOptions
Set SMTP = IStore.Query("Select SI_DEST_SCHEDULEOPTIONS, SI_PROGID From CI_SYSTEMOBJECTS Where SI_PARENTID = 29 and SI_NAME='CrystalEnterprise.SMTP'").Item(1)
Set SMTPSchedulingOptions = SMTP.PluginInterface.ScheduleOptions
SMTPSchedulingOptions.DomainName = "yourdomain.com"
SMTPSchedulingOptions.Subject = "Alerts for sales report"
SMTPSchedulingOptions.ToAddresses.Add ("bob@yourdomain.com")
SMTPSchedulingOptions.Port = 25
SMTPSchedulingOptions.SenderAddress = "Robert@Nowhere.com"
SMTPSchedulingOptions.ServerName = "SMTPServer"
SMTPSchedulingOptions.Message = "The most current sales report. Rob."
SMTPSchedulingOptions.SMTPAuthentication = 0
SMTPSchedulingOptions.SMTPUserName = ""
SMTPSchedulingOptions.SMTPPassword = ""
SMTPSchedulingOptions.EnableAttachments = True
ScheduleInfo.AlertDestination.SetFromPlugin (SMTP)
'Schedule the report.
IStore.Schedule (Result)
End Sub
Sorry about the weird line spacing, it's doesn't copy that over well for some reason.
Y
|
-
I've gotten some questions about how to add a group to a Crystal Report at runtime. I just wanted to clarify that report modification is NOT supported in the Visual Studio versions of .Net and the Developer edition of CR .Net. If you're trying to add anything to the report at runtime, those are report creation API's and are only available with Report Application Server (RAS) for .Net. RAS has also been renamed to CE Embedded recently to add to confusion. RAS is available in the Adv. Developer edition of Crystal Reports.
thanks,
Y
|
-
The Crystal Reports for Visual Studio 2005 Technology Adoption Program is now open!
Business Objects is now accepting applications for a special program intended to assist companies new to the .Net reporting applications space. The Crystal Reports for Visual Studio 2005 Technology Adoption Program is designed by the product team to help your development staff ramp up to embedding reporting functionality in your .Net apps with specialized support from the product development team and the technical support team. Crystal Reports for Visual Studio 2005 is especially designed to lower the barrier of entry for embedding reporting functionality into your .Net application.
We are looking for small to medium sized development groups/companies that are new to integrating reporting functionality into their .Net applications, no previous Crystal Reports usage necessary. We are also looking for companies with existing deployments of Crystal Reports for Visual Studio .Net 2002 or 2003 but have not deployed Crystal Reports 9 or 10. No Beta 1 deployment of CR for VS 2005 is required, but Beta 2 or early RTM deployment is preferred.
If you wish to be a part of the program, please send the below information to CrystalReportsVS2005Beta@businessobjects.com, we will be conducting informational interviews with the contact person for additional details on the project.
Company:
Contact Name:
Title:
Contact Email:
Contact Phone #:
Current Reporting Technology used, if any:
Current Crystal Reports versions used, if any:
Proposed .Net Reporting Project details:
Comments:
|
|
|
|