QUESTION: My Crystal report
won't run. What's the problem? ANSWER: There are a few possible reasons: 1) Does it work in Crystal Reports? This is always the starting point. If your answer is "I don't have Crystal Reports" or "I don't know Crystal Reports" there's not a lot we can do to help. You (or a resource at your company) MUST have a basic understanding of Crystal Reports. The bottom line is this... if someone knows Crystal Reports, all of the technical setup of our software will make sense. Also, even if Crystal Reports is on the same machine as our software, some of the remaining items need to be checked out. Crystal Reports and the Crystal runtime engine (that our software uses) is NOT the same. Crystal Reports fixes a lot of stuff on-the-fly that it does not make available to the Crystal runtime engine. 2) Did you enter the ID/password for the report? 3) The report uses two or more DIFFERENT IDs/passwords (or one connection requires and ID/password and another requires no ID/password --- like an Excel or Access connection), and you only configured one of them. In Report Runner Viewer, use the button on the bottom right of the login information window to Add and Advanced Data Connection. This will allow you to set up multiple IDs and passwords. In Report Runner Batch, select the 4th login option in the Job window for multiple IDs. This will add a middle tab to the window that allows you to set up all of your multiple IDs and passwords. These options will also allow you to override the DSN or override the database for a given table, too. 4) Missing DSNs are another big reason your report will not run. It's not the only way, but most Crystal Reports connect to a data source (SQL Server, Oracle, MySQL) using a DSN. If you run a report on a different machine, that machine must have the exact same DSN created for that data source. What is a DSN?: Click Here If you can't resolve this issue, we ask that you speak with your Crystal Reports developer first, before contacting us. We can not set up the DSNs, and there is no way for our software products to "know" how to set them up for you. If the report is working on another machine in your company, THAT machine will have the DSN configured correctly. Simply copy those settings. 5) The DSN exists, but it's created as a User DSN and not a System DSN. User DSNs are ONLY available to the Windows user that creates the DSN, not to all users. The easiest way to fix this is to NEVER create a User DSN. ALWAYS create a System DSN. 6) An incorrectly named DSN. Your report is looking for "MyDSN - DB1" and you have created one called "MyDSN - SQL". We see this issue A LOT. Our log files show what DSN the report is looking for. Just do a find on "DSN=". You see lines in the log file that look like: 01/01/2011 08:00:00 - Set Login: Server,Path,DSN=MyDSN - DB1 7) On a 64-bit OS you created a DSN, but you created a 64-bit DSN, not a 32-bit DSN. By default on a 64-bit OS, the ODBC Administrator you start is 64-bit and is only capable of creating 64-bit DSNs. You need to go to the C:\Windows\SysWow64 folder and start the ODBC Administrator from that folder (ODBCAD32.EXE). And YES, 32-bit DSNs get created from the SysWow64 folder. It doesn't make sense, but that's how Microsoft does it. This will create the 32-bit DSNs you need to run the 32-bit version of our software. Note, as of 2013, we DO support 64-bit drivers with our 64-bit edition, and in that case, you would need 64-bit DSNs and not 32-bit DSNs. Make sure you do not have the same named DSNs in both 64-bit and 32-bit, too. 8) Your reports use an OLE DB connection, not a DSN, and either you simply cannot access the connection or the ID and password are wrong. You can test your OLE DB connection external to Crystal Reports and/or Report Runner. 9) If your reports connect to Oracle, make sure the machine is configured correctly to connect to Oracle. Your Oracle database administrator can help you with. Most Oracle reports will not run by simply installing our software and running the report. Most Oracle connections require running some kind of Oracle-based installer so the connection can be configured. 10) Have you tried doing a Database, Verify Database in Crystal Reports? The underlying database structure may have changed since the report was originally developed. Try opening the report in Crystal Reports, and do a Database, Verify Database. 11) Now, SOMETIMES a report doesn't connect to the database correctly, because certain database connection settings in the report are out of sync. Doing a Database, Verify Database will fix some of these. Othertimes it can be fixed by [Updating] the data connection information, from Database, Set Datasource Location. You can try this EVEN IF YOU'RE UPDATING IT TO THE SAME DATASOURCE. It has a way of resetting the DB connection info in the report. Here is an external article related to using this UPDATE process. 12) Last but not least, your report template could be corrupted. This is not the norm, but it is possible. You're probably going to say, "But it runs in Crystal Reports!"... yes, but Crystal Reports has a way of auto-correcting some issues in reports that is not possible done in the Crystal runtime engine (which is what our software utilizes). The easiest way to determine if a report is corrupted or not is to create a dummy report using the same DSN, tables, and/or connections. Drop a few fields on the template (don't worry about pretty formatting) and try to run this newly created report. 99% of the time you will see that it works. Lastly, we see a lot of reports become corrupted that were created originally in version 8/8.5 or previous and resaved in 10, then XI, then 2008, etc. It's all the different versions and resaves that corrupts it. This corruption is not anything that SAP will acknowledge, but we know from years and years of experience, it exists.
Another thing to try if the report has multiple
sub-reports is to remove the sub-reports one-at-a-time until the report
works. That of course, would indicate an issue with that specific sub-report.
---Did you just skim over this article without really reading it? Please verify each of these common issues. Nine times out of ten, once we schedule a remote session to review these settings, it ends up being one of the easier issues listed above (1-12). And actually, it's not likely that it's not one of the issues above. If it's not listed above, it's probably not fixable. --- If you are using any of our Report Runner products, it will show a log of information, and if a table/view/stored procedure is failing to connect, it will indicate which one. Be sure and include a log file showing the error if/when you submit report data connection issues. |
Understanding
Crystal Reports Compatibility Issues
Note: This topic may use “Crystal
Reports” to refer to both Crystal Reports 2011 and Crystal Reports 2008.
When
you upgrade to Crystal Reports 2011 or Crystal Reports 2008, consider the
following compatibility issues:
- Crystal Reports
can run a report that is saved in an earlier version of Crystal Reports
format.
However,
if you save the report definition from the Crystal Reports 2011 or Crystal
Reports 2008 designer, the report will be saved in Crystal Reports 2011 or
Crystal Reports 2008 format and can not be opened by any version of Crystal
Reports earlier than version 9. In addition, if you open a Crystal Reports 2011
or Crystal Reports 2008 report in Crystal Reports 9, you will be warned that
the report is in a later format and certain features may not be supported.
When
you run an earlier format Crystal report in the Crystal Reports 2011 or Crystal
Reports 2008 application or through the PeopleSoft Process Scheduler, the
Crystal Reports application runs the Verify Database function, which picks up
any errors—such as missing fields—in the report. If errors are detected, you
must correct the report before you can run it successfully.
- When you run
reports using the PeopleSoft Process Scheduler in the PeopleSoft Pure
Internet Architecture, they are created in the Crystal Reports 2011 or
Crystal Reports 2008 .rpt format and you cannot open them using any
version of Crystal Reports earlier than version 9.
You
can use earlier format report templates to generate reports; however, to ensure
compatibility, you should always create the reports in the Crystal Reports 2011
or Crystal Reports 2008 format.
See
the PeopleTools Installation Guide for
your database platform: “Installing and Configuring Software for Crystal
Reports,” Converting Crystal Reports.
- If you use the
PeopleSoft Process Scheduler to run Crystal Reports, do not install a
version of Crystal Reports on the Process Scheduler server that is
different from the version of the Crystal Runtime Redistributable already
installed on the machine.
- Crystal Reports
2011 and Crystal Reports 2008 are more particular than earlier versions of
Crystal Reports about null values being passed to its in-built functions.
To
prevent errors occurring in formulas, check that the values you are passing are
not null. For example, instead of:
compare = toText({CUSTOMER_SALES.END_DATE});
use:
if (IsNull({CUSTOMER_SALES.END_DATE})) then
chooseDate := "";
else
chooseDate := {CUSTOMER_SALES.END_DATE};
- If you are
upgrading from previous versions of PeopleSoft PeopleTools, your
pre-PeopleTools 8.50 Crystal reports need to be converted to the Crystal
Reports 2011 or Crystal Reports 2008 format.
The
PeopleTools RPT Conversion utility pscvtrpt.exe is a standalone program that
converts your .rpt files from the format used in previous releases to the
Crystal Reports 2011 or Crystal Reports 2008 format.
See
the PeopleTools Installation Guide for
your database platform: “Installing and Configuring Software for Crystal
Reports,” Converting Crystal Reports.
Being a Crystal Report Developer
With a few
simple, but highly significant, improvements the whole process of being a
Crystal Reports Developer would become spectacularly more productive. This is
especially the case for enterprise environments where there are hundreds or
thousands of reports to manage.Here is a semi-random list of the most significant drawbacks - together with some simple solutions - as I see them at least. This article is incomplete. There are a whole heap of other things about Crystal Reports I would love to see improved. I had to stop somewhere though.
The Problem of Presentation
Why do I have
to define the presentation of every field independently?Whether creating a new report or editing an existing one, every field and every label in a Crystal Report has to be individually formatted, by hand. If any form of conditional formatting is used, the details need to be entered anew for every use. For new fields, copy & paste represents a useful shortcut, but when the focus turns to tweaking the presentation of things that already exist, well, tedious is a polite term to describe the amount of fiddly work required.
Consistency is an important aspect of report design. Not only consistency within a report, but between reports. All the reports related to a single system should demonstrate a high level of consistency - each report should use the same fonts, at the same sizes, use the same formats for dates and currency values, and apply the same rules for rounding and aggregating values.
At the moment, Crystal Reports provides no support for helping a developer achieve this desired level of consistency. The entire process is manual - and error prone. I’ve seen reports that use the Tahoma, Verdana and Arial fonts on the same line item - the original developers were attempting to match the fonts to achieve a consistent look and feel, but because Crystal Reports makes it so hard to do so, they failed.
Solving the problem of
presentation
Provide a
mechanism for separating content from presentation.The concept of separating content from presentation is hardly new. Some history:
·
Microsoft
Word has had Styles since at least Word 97 (maybe earlier - a colleague
indicated Word 95). Each style defines the formatting to apply to a different
part of the document, based on the semantics of the text - this is a heading;
that is a quote.
·
HTML
started with the idea of semantic mark-up in 1991 - and it copied the idea from
SGML. In both languages, the content is marked up with tags that describe
meaning, not presentation. This should be emphasized; that is a hyperlink.
·
CSS
is a newer standard that allows fine control of presentation, but in a way that
is well separated from the content itself.
·
Earlier
still, the Model-View-Controller design pattern emerged from the Smalltalk
community in the 1980’s. Under MVC, the model captures the business domain,
while the view takes care of the look and feel.
I want to be
able to define styles (for both fields and labels) that get reused across
multiple reports. Heck, I’d settle for styles reused within a single report.For example, let me define a field style called “currency” with these characteristics:
- 40 mm wide;
- Tahoma 10pt;
- 2 decimal places
with a period separator;
- Leading “$”
immediately to the left of the first digit;
- Digit groups of 3,
with comma separators; and
- Right justified.
Conclusion: It is time that semantic mark-up made its way into mainstream reporting tools. As the market leader, Crystal Reports could be leading the way.
The problem of errors
When something
goes wrong, tell me about it.Don’t ever leave me looking at a blank report simply because something went wrong. Worse, don’t give me a report with missing pages and no warning.
Even when previewing within Crystal Developer (when it is safe to presume the user isn’t a complete dimwit), Crystal Reports has a nasty habit of silently failing. Sometimes, all you see on screen is a blank window with nothing at all. No diagnostic message, no error dialog, no indication of failure, no picture of an empty page, no buttons, nothing. I’ve come to call this the Gray screen of Death.
When this happens, development becomes a battle of wits with the machine - requiring me, the developer, to intuit (or guess) the nature of the problem - instead of an exercise in providing business value.
On the rare occasions when Crystal Reports is kind enough to actually admit that something may have gone wrong, the information supplied is meagre at best. Most of the time, the only clue is a cryptic error number, requiring a trip to Google for explanation.
Solving the problem of errors
Failure should
be obvious.When something goes wrong and the report can’t be generated, tell me about it. I care about my reports and about the data in those reports. Don’t lie to me and let me rely on reports that contain inaccurate or incorrect information - tell the truth and generate reports I can rely upon to make sound business decisions.
Give me the information I (or my technical support) need to have when attempting to fix the underlying cause. Make sure to include some context for the error. If a sub-report was being generated, tell me its name so I know where to look. If a special query was being run for a crosstab, tell me which one. Make it easy for me to lodge a useful fault report with my help or service desk. For example, including an email button would make it easy for me to ask for help - and if the resulting email included an attachment of detailed diagnostic information, so much the better.
Most of all, let me see the pages of the report that were generated. The content may be useful from a business perspective. It will be useful from a diagnostics perspective. But: don’t let me make the mistake of thinking the results are valid or complete - use a watermark or something else to make it clear that the report is suspect.
Conclusion: Error reporting should be robust, informative and reliable. End users must be able to rely on their reports being correct.
The problem of database
connections
Why are the
details of the database connection replicated so many times? Why must those
details always be kept inside the report?Most (if not all) enterprise systems that employ Crystal Reports have many reports - dozens, if not hundreds. Having connection information replicated in every report becomes a logistical nightmare.
Consider (1): It is good practice to regularly change sensitive passwords, to prevent unauthorized access to restricted information. This is as true for databases as for other systems. But which DBA is going to do this if a dozen, or a hundred, or five hundred reports need updating as a result?
True, using integrated security, where the users machine or network credentials are passed through to the database server, can be a solution for this - but it’s only a partial solution as there are circumstances (and products) where this kind of approach is simply impractical.
Consider (2): One of the standard tenets of software development is that changes should be thoroughly tested before being deployed to production. This requires that the testing of the report should occur against a test system. The point of testing is not only to ensure the report works, but also that the load of running the report won’t have any deleterious effects on production. Importantly, the report that is deployed to production should be the same report that was tested - if the report has been modified (say, to change the database connection) then the results of testing become suspect.
Crystal Reports seems to take delight in firmly welding itself to the original data source, making this kind of multiple environment use perversely difficult.
Before someone jumps down my throat, I do know about the set location menu item. Two observations:
(a) It doesn’t work reliably - sometimes redirecting only some tables, giving reports with a mixture (say) of development & test information;
(b) Making the change involves editing the report, akin to editing the source code of a regular application and recompiling just before go-live.
Solving the problem of
database connections
Allow
connection information to be externalized.I know that there are good reasons to have the connection information embedded … in some scenarios.
That said, make it optional. There should be an option to externalize connection information for sharing across multiple reports. With some form of externalized connection information in place, the database connections of an entire collection of reports (say, in the same directory) can be updated in one go.
The first impact of this is to lower the cost of adopting good security practices such as changing database passwords regularly.
A second, less obvious impact is that deployment of a report from a test environment into production becomes a simple file copy, rather than requiring the report to be changed, eliminating a route by which production errors can be introduced.
Conclusion: Redeployment of a report from one database to another (with an identical schema) can, and should, be trivial.
The problem of hidden
information
Why do I have
to hunt out the way the report is configured?There is no one single way to see how a given Crystal Report works. Database connection information is one place; the predicates for the database selection are another; fields, formulas and parameters in a third, and so on and on and on.
Worse, even when you’re looking at just one thing - say, the formulas that have been defined - you don’t get to see all the definitions in one go. You have to open a separate dialog for each item to see its definition.
It’s like programming in C# but being forced to open a new window to see the type of each variable that has been defined. Worse, you’re forced to close those windows before you can change any of the code, and none of the variables has a sensible name.
In order to understand a report, a developer has to manually check out all the different dialogs, inspect each one, and remember what they’ve seen.
Solving
the problem of hidden information
Support a Text
based file format (like XML).Contrast this with more conventional development environments where everything is stored in text files that can be read and understood. All the information about the program is in those files - there are no important details only accessible in obscure dialog XJ42.
The same should apply to Crystal Reports - having some kind of text based format would allow for all of the existing tools for change management to be applied.
Imagine …
- Being able to
compare two versions of a report and see what had been changed;</li>
- Being able to copy
and paste field definitions between reports to guarantee
consistency;</li>
- Being able to do a
formal code inspection of the changes made to a report;</li>
- Being on site at a
client and being able to fix a faulty report on the spot with a text
editor;</li>
Conclusions
Crystal
Reports is a very effective product that dominates both the mind-share and
market-share of the enterprise reporting space.In this article, I’ve identified four areas where the Crystal Reports makes life difficult for the very developers who are responsible for creating the reports themselves:
- Presentation
- Errors
- Database
Connections
- Hidden Information
HTTP Error 404.3 - Not Found
Question2: I have a very
similar problem. Everything was working great in IIS 7.0 Windows
Server 2008 but as soon as we upgraded to Server 2008 R2 IIS 7.5 Crystal
Reports no longer work. I can go to the web server, open CR and view the
report on the server but as soon as I try to open it through the application in
IIS it breaks. However, we aren't getting any error messages, the
application will open CR but the report never displays.
Question3: I am facing issue as
IIS 7 on a x64 bit server.....Unable to view the report, Add MIME and Handlers
still no change...Tried using the URL and getting this Message
...."A report id or report source session variable is required."
Question4: I had the very same
issue publishing crystal reports XI through IIS7 via Classic ASP. The
viewer appeared, but no report, just a gray area.
Ans: Our reports are generated using the
ActiveXViewer object. If you are using this method, find the file named
'RDCrptserver11.asp' and open it for editing. Look around line 203 for the
following: Response.AddHeader "CONTENT-LENGTH", lenb(temp) and change
it to this: Response.AddHeader "CONTENT-LENGTH", lenb(temp + 0).
There are other places where the
lenb function is used, but I only had to change it here to get the reports to
show up.
Question: We used Crystal Reports for Visual
Studio 2005 in our application. Everything is fine when deploy in 32bit
environment, but in 64bit we do have a problem.
The report cannot be printed out
when we click print button in report viewer. And Crystal Reports 64bit version
have been installed.
We develop using Visual Studio 2005
SP1, Windows 7 with 32bit version.
Ans: Make sure that app is compiled as 64 bit - not
"Any CPU".Make sure you are using SP1 for CR 10.2:
https://smpdl.sap-ag.de/~sapidp/012002523100006007872008E/crvs05sp1.exe
Then
look in c:\program files\microsoft visual studio
8\sdk\v2.0\bootstrapper\packages\crystal reports\CRRedist2005_x86.msi
for SP1 MSI
and use that to deploy the SP1 runtime. Compiling with VS 2005 SP1 on 64 bit OS
and compiled as "Any CPU".And also installing Crystal Report SP1 for
VS 2005
Troubleshooting
a 404
Since
IIS 6, Microsoft has made it very easy to troubleshoot the cause of a 404
"not found" error from the web server. Most admins don't
realize that the IIS log file can now include the substatus code along with the
404.
The
first step is to make sure that you are using the W3C log file format and that
you have selected Protocol Substatus code as one of the extended logging fields
as in the example below.
You
can now lookup 404 entry in the log file to determine why the resouce is coming
back as "not found". In this example, we see a request for a
Flash file that is failing:
#Fields:
date time c-ip cs-username s-computername s-ip cs-method cs-uri-stem
cs-uri-query sc-status sc-substatus sc-win32-status sc-bytes cs-bytes
time-taken cs-version cs-host cs(User-Agent) cs(Cookie) cs(Referer)
2009-04-10 00:21:55 133.71.125.97 - WEBSERVER 133.73.246.56 GET /media/logic.swf - 404 3 0 93241 920 2141 HTTP/1.1 www.server.com Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1+.NET+CLR+2.0.50727;+MS-RTC+LM+8) - -
2009-04-10 00:21:55 133.71.125.97 - WEBSERVER 133.73.246.56 GET /media/logic.swf - 404 3 0 93241 920 2141 HTTP/1.1 www.server.com Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1+.NET+CLR+2.0.50727;+MS-RTC+LM+8) - -
You
can see that the status and substatus logged are 404 3. The following
MSKB articles are helpful for looking up the status codes with their
corresponding causes and remedies:
The
MSKB tells us that 404.3 means that the mime map policy prevents this request.
In other words, the .swf file is an unknown mime-type to IIS. We simply need to
define the mime-type for .swf and IIS will now serve the file.
The
following articles are also helpful in torubleshooting 404 errors:
- http://support.microsoft.com/kb/248033
- http://support.microsoft.com/kb/315122
- http://support.microsoft.com/kb/216803
- http://support.microsoft.com/kb/810784
- http://support.microsoft.com/kb/814875
- http://support.microsoft.com/kb/199806
I believe that putting some effort into making the lives of its developers easier would directly result in increased use of Crystal Reports - and that would lead directly to greater sales - greater revenue.
No comments:
Post a Comment