cancel
Showing results for 
Search instead for 
Did you mean: 

Error displaying report in .Net CrystalReportViewer

Former Member
0 Kudos

Having a big problem with some reports in my Visual Studio developed application. To simplify things, I just created a new project and dropped a CrystalReportView control onto the form. I set its report to one of the ones I'm having a problem with and this is what happens (see below).

This just started happening after I updated crystal references to 13.0.2000.0. Not all reports have this problem. Some reports will display some pages but not others. I just get a white box with a red cross through it.

I'm pretty sure there is something about the .rpt files that this viewer does not like. I fixed one report by changing a report option from Full Page to Fit Page but it only worked on that one report.

In my real application, this is what I see in the viewer.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Make sure you are on SP4:

http://scn.sap.com/docs/DOC-7824

If you have CR 10.2 (bundled with .NET 2005), or CR 10.5 (bundled with .NET 2008), uninstall these. Remove the viewer off the form. Remove any references to CR. Check that in the toolbox the viewer referenced is version 13. Re-add the viewer to the form. Re-add version 13 references (viewer should have added them when placed on the form).

- Ludek

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

Thank you for the reply. I did not know about SP4. However, nothing seemed to change. My Crystal references are still 13.0.2000.0. Shouldn't they change to 13.0.4xxx?

former_member188030
Active Contributor
0 Kudos

Hi Bob,

Have you migrated the app or reports to CR for VS 2010?

What is the original CR version in which you have designed the rpts?

One thing to try before viewing the report from the app.-

Open the report in the CRVS2010 bundled designer inside VS2010 IDE.

Preview the report and see if it is working fine, save it and then view it in the viewer.

Hope this helps,

Bhushan

Former Member
0 Kudos

Hi Bob,

Check the file version of CrystalDecisions.CrystalReports.Design.dll or CrystalDecisions.CrystalReports.Engine.dll in

"C:\Program Files \SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet" folder.

If you have installed sp4 correctly you will see that the real file version is 13.0.4.705

Although , inside Visual Studio , the referenced assemblies still show 13.0.200.0

Former Member
0 Kudos

The app was built with VS 2005 originally then moved to 2008 and now 2010. The reports are all designed with Crystal XI, not Visual Studio though I tried opening one up in the VS designer. It updated the report and worked fine in the designer but did not help my forms viewer problem.

Former Member
0 Kudos

The app was built with VS 2005 originally then moved to 2008 and now 2010. The reports are all designed with Crystal XI, not Visual Studio though I tried opening one up in the VS designer. It updated the report and worked fine in the designer but did not help my forms viewer problem.

Former Member
0 Kudos

My path is a little different, but yes they are 13.0.4.705

C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet

former_member183750
Active Contributor
0 Kudos

Make sure you're using the full 4.0 framework, not the client.

See if you can repro this on another computer. If not, check DPI / screen resolution settings on your computer.

- Ludek

Answers (1)

Answers (1)

Former Member
0 Kudos

I think I have found the problem. I think there is a bug in the winforms crystalreportviewer.

We have some formula fields that override Display String in Format Object -> Common -> Display String.

If the formula is a Number type, and it evaluates to a value, you cannot set display string to empty, ie, ''. You can set it to a space however, ie, ' '.

If the formula does not evaluate to anything, display string value does not matter.

Please don't ask why we would override display string to empty on a number formula. I inherited these reports.

0 Kudos

Hi Bob,

But if the Formula type result is a number setting it to a string is going make the formula invalid, try doing it in the Designer, it won't allow you to set the result to a string if it's expecting a number.

Possibly changing all of your number formula to a totext() will resolve this issue for you but of course that is going to introduce a lot of other issues having to deal with numbers as strings.

Not a bug in CR. And with out sample code not sure how you are trying to change it, cloning would be the first thing to do.

Don

Former Member
0 Kudos

I don't call things a bug lightly. I know problems are almost always the fault of the developer. But consider these points:

These reports have worked for years in previous versions of .net report viewer.

These reports work in Crystal Reports.

They also work in the asp.net reportviewer control (despite some wonky html but that is not specific to the reports i'm having trouble with).

Pages that do not have the offending field, like report footer, etc appear fine. Navigate to a page with the formula and you get the white box of death.

When the display string is empty string, the problem occurs. When it is set as a single space, no problem (space is not a number either).

I just don't think the viewer should choke on the report for this reason. I could accept it better if it threw an exception. And why does the asp.net viewer have no problem?

We intend to change all the reports, but this is a daunting task. There are hundreds and since the problem only occurs when the formula is attempted to be set we could miss something easily based on what data we test with.

Off topic, but they also obsoleted GroupTree visible which triggered alot of source code changes. Can't wait for the surprises in the next version!

I see you responded to my question about programmatically accessing the displaystring property. I'll check that out. If I can write a utility to identify where we have this bad code it would help tremendously. Thank you.

0 Kudos

Hi Bob,

Completely understand.... Can you attach a report that is causing the and a simple sample app to show the problem? Or if you have a support contract log a case in SMP and let us know the case number and I'll pick it up.

Zip up the report and sample app and then rename it to *.txt, in the Use Advanced Editor link above you can then attach the file. As long as it's 1 meg or less.

I'll then see if I can repro of determine what the issue is in the report.

Oh and check the readme file on SP 4, there are a few new API's you can use and for the group tree trigger you should be able to capture the event using click method. Or Please  explain more what youa re trying to do and post a new question.

Thanks

Don

Former Member
0 Kudos

Here is a basic VS 2010 project that simply has a form and a report. The report was created in the VS designer and all I did was add one formula field that does - 3 * 13

If you design the report, right click the field and select Format Object -> Common tab -> display string, observe what happens if you change it from a space to an empty space.

0 Kudos

Hi Bob,

Works for me so this suggests an issue with your Video Drivers or screen resolution. We've seen this happen before, it's a problem in GDIPlus.

Try updating your video drivers or changing your screen resolution. Nothing we can do to fix this, we ahve escalated to R&D before and they simply rejected it as a problem in MS's video driver. Other posts in here also noted that after updating their video cards or changing resolution it resolved the issue.

Thanks again

Don

Former Member
0 Kudos

Thank you for trying it. Just to be clear, the report works as I sent it to you. You have to edit the display string property to break it. Did you do that or are you just looking at it as is?

0 Kudos

I did edit it as you indicated to be just 2 single quotes, no space.

0 Kudos

Are you going to try changing your screen resolution and update your video drivers?

Former Member
0 Kudos

I just verified my video driver is up-to-date. I cannot change my screen resolution, I am working remotely and that is not allowed over a remote desktop session.

I'm about to try it on my home pc.

Former Member
0 Kudos

I just tried it at home. I have a reasonably fresh install of Win7 64bit and VS 2010. I had to install the crystal for VS 2010 and the runtimes. I experience the same problem even when I drop the screen resolution down to 1024x768. I also disabled my second monitor to eliminate anything regarding a dual monitor situation. My colleague also experiences the problem on her XP 32 bit pc even after adjusting the resolution.

Former Member
0 Kudos

Do you have links to the posts about display resolution and drivers?

0 Kudos

No unfortunately I never kept the link to those posts in the previous version of forums. Try searching on "red x".

Just to clarify also, you are previewing the report in .NET IDE correct? Does it also happen when you run the report in your app and preview?

I'm using 7 x64 also, can you run Modules and send me the list file?

Former Member
0 Kudos

This is what I see when I view the form in the IDE designer. Not the report, the .rpt file designs just fine. This is the form I am putting the viewer on. This error only happens when I assign the report to the viewer's report source:

And this is what I see when I run the application:

Former Member
0 Kudos

I apologize if this is duplicate, but I don't see that my first attempt posted. Here is my modules output.

0 Kudos

Hi Bob,

That helps, for some reason you are not loading the usp10.dll from our folder:

C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86

It should be version 1.04.x.x.

Did you rename it and do you have it?

Only other differences is I have VS 2010 Service Pack 1 installed also.

Don

Former Member
0 Kudos

I do have the file, it is version 1.0422.3790.1830. I wouldn't know what this is, so I have not renamed it.

Also, my VS 2010 is on SP1.

0 Kudos

Hi Bob,

Sorry I sould have explained more... We have a dependency on that specific version, in Modules it shows you are not loading it and just the 1.6 version in syswow64. In CR Designer you'll actually see both being loaded, which isn't a problem, but in an application is must load the one from our folder.

It's a Unicode dll that MS uses for displaying unicode characters in GDIPlus....

Can you do a Modules quick test on those other PC's and see if the app is loading it from our directory?

If it is then we cna rule it out.

The different Windows runtime is likely due to Windows patches then, could be Framework patches also. We tend to be a little behind, IT has to valid them before applying.

Thanks again

Don

Former Member
0 Kudos

Here is the modules output from another PC.

Former Member
0 Kudos

as a  test, I renamed the usp10.dll that is in my syswow64 folder. I still experience the report viewer problem.

0 Kudos

Thanks Bob,

I see it is 1.04 but now it's loading it from the \windows\sytem32 folder. It should be loading it from our folder.... Don't knkow why, is the dll in our folder?

A few notes back you said you renamed it, did you rename the one in the CR folder? If you did rename it back to *.dll.

Very strange, I've never seen anyone have this problem of not loading our copy of the dll... there may be other dependencies missing.

You are installing the installer for VS and not jsut the runtime correct?

mmmm.... can you export your CR registry keys?

HKEY_CURRENT_USER\Software\SAP BusinessObjects

and

HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects

I'll compare them to mine, could be something in there...

Did you installed to the default c:\Program... folder for VS, CR would follow?

Do you have our reference folder in the References in the project properties.

When you add the references are you adding them via the .NET tab or browsing to the CR folder or framework folder?

And did you install the 64 bit runtime?

Very strange...

Don

Former Member
0 Kudos

Yes, the usp10.dll is in both folders.

Yes, on my system, I did rename the file back to its original name right after testing.

I did install crystal for VS as well as the runtime. My colleague from whom I also sent you the modules output, is on xp 32 bit and she only installed the runtime. She does not develop .net but she runs the product.

Everything was installed at the default path.

This is in my project reference paths: C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\

In my testing project, where I just created a new project and dropped a viewer on the form, the references were automatically added. In our real product, I was browsing to the dlls in the GAC becasue they did not appear in the framework list.

I installed the 64 bit runtime, my colleague uses 32 bit.

Attached are my registry hives.

0 Kudos

Hi Bob,

I did install crystal for VS as well as the runtime. My colleague from whom I also sent you the modules output, is on xp 32 bit and she only installed the runtime. She does not develop .net but she runs the product.

[Don] The modules list for her PC shows devenv.exe running so that's what I look in... So doesn't make sense when you say she doesn't have VS installed?

Everything was installed at the default path.

[Don] Great.

This is in my project reference paths: C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\

[Don] Great.

In my testing project, where I just created a new project and dropped a viewer on the form, the references were automatically added. In our real product, I was browsing to the dlls in the GAC becasue they did not appear in the framework list.

[Don], they don't show up until you set your project to use the full framework, don't use the client. Not recommended to browse the GAC for the CR assemblies, use the .NET tab when adding the CR References.

Try removing them and adding them back in using the .NET Tab.

I installed the 64 bit runtime, my colleague uses 32 bit.

[Don] Make sure you set the project for x86, not any CPU for her app. AnyCPU and MSIExec will install the 64 bit runtime which won't work.

Don

Former Member
0 Kudos

She does have VS installed, she just rarely uses it so she has not installed the crystal for VS. So when she runs the application, like our clients would, it is a good test. Our clients certainly do not have visual studio.

My project is definitely Full Framework, not client profile. The crystal items won't even show in the toolbox with client profile. I can say with confidence that the crystal references do NOT show up in the Framework tab. I struggled with that for a while until I just browsed out to the gac manually.

We can't set different build targets for our solution per developer. We only maintain one build that is targeted to anyCPU. Do you think we need to make two builds to support crystal on x86 and 64? So far it mostly works, it is just those (relatively) few reports with that special formula condition that is problematic.

There are other issues i have not even brought up yet. I mentioned that the asp.net viewer works. That is true if I create a new web project. BUT, the html emitted is poorly formatted.

All of my existing web projects are now horribly broken when trying to show a page with a report. I have checked carefully that all references point to 13.0.2000.0.

Because of these two problems I am going to recreate the web reports in SSRS.

0 Kudos

Hi Bob,

Your install is all messed up, and looking at the beginning of all of these posts you tried to short cut the install so the state of your PC is unknown now. If installed correctly the CR assemblies will show up in the .NET tab for references so adding them by browsing is likely the cause of these issues and any other issue you have or possibly due to some environment on your PC's CR doesn't have full permissions/access to it's dependencies.

I suggest you uninstlal CR for VS and all of it's runtime, use Programs and Feature, and then repair VS 2010 and then reinstall using the ONLY the CR for VS 2010 installer, do not install the runtime packages separately.

If that doesn't fix it then all I can suggest is to create a phone case and work with a rep to see what you have done.

Or since you are moving to SSRS then just remove CR and mark the post as answered.

Good luck

Don

Former Member
0 Kudos

I will consider doing a repair install on VS. I wonder if I will have to reinstall SP1?

If I need to make phone case, how/where would I do that?

You've been very helpful and I appreciate it. It has just been a very difficult time when I have actual work that needs to get done none of it matters if crystal reports aren't working.

0 Kudos

CR for VS 2010 Service Packs are complete installs, no need to start from SP 1

You can purchase a support case here:

http://store.businessobjects.com/store/bobjamer/en_US/list/parentCategoryID.57067600/categoryID.5706...

There is a new issue with WEB app's the header line of the report viewer has a problem so for now install SP 3.

You can get the installer from this link:

http://scn.sap.com/docs/DOC-7824

Don

Former Member
0 Kudos

Just to document, this reminds me. When I tested on my home pc, I did install the CR for VS 2010 installer and I had not installed any other Crystal anything previously. I did not test any web applications, but as noted, I still experienced the problem with the winforms viewer. I don't know if this provides any insight, but even if I messed up my work pc, that doesn't explain what is wrong at home.

0 Kudos

Good point... This has only been reported a few times, unfortunately the other forum posts were in the previous Forum site and only 6 months of posts were copied over so no way to find them now or what the fix was if anything. Of the roughly 480,000 downloads and only 3 people, that we recall, have run into this issue. Not going to be easy to find the reason why.... but we suspect it's environment related of some kind...

I don't recall if you tried updating the Video card drivers?

And as a quicjk test I renamed usp10.dll to *.org in C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86 and previewed a report in .NET IDE and I never got the red X but I did not get a report either. When running the app it load version 1.6 from the Windows folder and the report previewed.

So I suspect it is something around Usp10.dll or it's dependencies that is causing this issue for you...

Don