cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports Viewer 11.5 fails in Vista

Former Member
0 Kudos
105

We are using the Crystal Reports Viewer (crviewer.dll) version 11.5.10.1263. It works fine in XP but fails with the following error in Vista:

A first chance exception of type 'System.AccessViolationException' occurred in sprdlgs2.dll

An unhandled exception of type 'System.AccessViolationException' occurred in sprdlgs2.dll

Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Sprdlgs2.dll is the DLL that contains the dialog in which the viewer resides. I know that crviewer.dll is registered correctly.

Our product is a C++ MFC multi-document application migrated from Visual Studio 6.0 to the .NET Framework 2.0 with the managed code flag (/clr) on.

Any help would be appreciated.

View Entire Topic
former_member183750
Active Contributor
0 Kudos

The only supported versions of Crystal Reports on Vista are CR 10.5 which bundles with .NET 2008 and CR 2008 with SP 0 applied.

Ludek

0 Kudos

It's also likely due to DEP. Check this [thread|; for more info...

Former Member
0 Kudos

This is hard to believe. I read elsewhere that the 11.5 that I am using (R2, SP4) does support Vista. Also, 11.5 has been out for a couple of years, how can it not support vista and an older version does? This is crazy. I tries your suggestion, and it does not work.

0 Kudos

Hi Peter,

You are correct. Version 10.5 is the bundled version of CR that comes with .NET 2008 and is actually older than 11.5. And XI R2 SP2 is supported on Vista.

I did a search on my PC and using google and I don't the file: sprdlgs2.dll. It's very rare that Google has never heard of it.

Can you tell me what it is? It looks like some third party Dialog resource you may be using or is included in your project. We tend not to support those form customizing tools you can download to make the windows form look unique. They have problems adjusting to the way we format the page.

Thank you

Don

Former Member
0 Kudos

Sprdlgs2.dll is the DLL that contains the dialog in which the viewer resides. This is my DLL. I am pretty sure the problem occurs when the viewer activex object is being loaded into the dialog. It never gets to OnInitDialog.

Also, I know that crviewer.dll is registered correctly.

0 Kudos

Ah, that explains why I couldn't find it.

Have you tried creating a simple app, open the report and preview to see if that works? Use a sample report using xtreme.mdb so no log on info is required. Don't use your dll but simply call the viewer to display the report.

So you've turned DEP off completely correct?

You can also use a Windows tool called WINDIAG, search MS's site to download. You can use the defaults and capture exceptions and then analize, it may tell you where and why it's causing the exception. Another great tool is from www.sysinternals.com ( also Microsoft ) and download Process Explorer.

Can you explain what your dll is doing? How about running it in Debug mode to catch the exception and where the exception is being created.

It is ActiveX so it may also be a permission issue.

Are you testing on Vista 32 or 64?

Thanks again

Don

Former Member
0 Kudos

Don,

Here are the answers to your questions.

DEP was completely turned off. However, even if it did work, I could not expect our customers to do this.

I am running in debug mode in Visual Studio 2008. As indicated in my initial post, it is an unhandled exception and the description is relatively vague. I will try the products you suggested.

I am running Vista 32.

The Crystal viewer activeX object is the only control in the dialog in question. If the enum in the following code is changed to a dialog that does not have an activex control, all is well.

// Dialog Data

//{{AFX_DATA(CReportViewer)

enum { IDD = IDD_REPORT_VIEWER };

CCrystalReportViewer11 m_reportViewer;

//}}AFX_DATA

Note that IDD_REPORT_VIEWER is the id for the dialog that has the viewer in it.

As you suggested, this could be an activex permission issue. But if it is, what will solve it and will the solution be palatible to our customers?

Peter

0 Kudos

Hi Peter,

The reason DEP must or may need to be turned off is because XI R2 was compiled with VC .NET 2003 C++ compiler. At the time DEP was not released so it therefore has no set of instructions to be disable on install. We've upgrade BOE XI R3 and CR 2008 to be DEP aware so it should not be an issue when you upgrade.

With XI R2 and previous it is an issue and for the reason above we cannot work around it unless lowering the security settings.

ActiveX controls ( COM ) are being phazed out by Microsoft so again it's an OS permission issue. Using those tools should reveal where the issue is.

If you find anything post the short version. If it's something that you cannot debug you always have the option to purchase a support case and have a dedicated engineer work with you dirrectly to resolve the problem.

Thanks again

Don

Former Member
0 Kudos

Don,

The issue I am dealing with is with the Crystal Reports 11 runtime (RDC) which includes the viewer activex control. It is made up of CrystalReports11_5_RDC_Designtime.msm, CrystalReports11_5_RDC_License.msm, CrystalReports11_5_RDC_Reportengine.msm, and CrystalReports11_5_RDC_Runtime.msm. I am presently using version 11 R2 SP4 which seems to be the latest. I use the msm files to create an msi file which I use to install the RDC along with our application. The install works fine but when we try to view a report in the application using the viewer, it fails as stated before.

I cannot find a R3 version of the runtime. Is there one? My bottom line question is which version of the runtime (RDC) must I use to get around this problem and where is its download page?

Peter

Former Member
0 Kudos

Don,

I hope your still out there. This problem is very serious business for my very small company. I would much appreciate if you could help me find a version of the RDC that will work with Vista if in fact there is one. I hope to hear from you soon.

Peter

former_member184995
Active Contributor
0 Kudos

HI Peter,

Have you tried running your app using unmanaged C++ (COM) instead of VS.NET?

We do not support using the RDC in .NET so it was never tested and we have no idea what issues you may run into.

Jason

Former Member
0 Kudos

Jason,

I did try making the dialog containing the viewer unmanaged and it still fails.

So what does one do to preview a Crystal Reports report within an application running in .NET? It would be hard to believe that you guys don't support the environment that Microsoft wants everyone using.

Peter

former_member184995
Active Contributor
0 Kudos

Hi Peter,

I believe there is some miscommunication going on.

The RDC, which you are using, is a COM component that is designed for use with VB6 or other COM languages (C++ being one). It is not tested or supported in .NET. Now, if you use Visual Studio 6 with C++ along with the RDC from XI R2 Service Pack 4 and you are seeing the error then there is something else going on.

If you want to use .NET you can, but you will need to use the Crystal Reports .NET SDK.

Here is a link to the [Dev Library|http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm]

Scroll down to the Crystal Reports .NET SDK section. You will find the SDK documentation, samples, etc. there.

Also, we do not support VS.NET 2008 with XI R2. You would need to go back to VS.NET 2005 to use XI R2.

Jason

0 Kudos

Hi Peter,

As Jason indicated the RDC has not been tested with Vista nor any version of .NET IDE. RDC is COM and Microsoft is moving away from COM and to their Framework which as you said you must also do as we must. Even though MS upgrades their OS's we can't follow for old technolgies, it just becomes too much coding and vertually becomes a new version of CR with the amount of work required. To move CR forward we try to release patches for the current versions that are 100% backward compatable with the current OS's. XI R2 with SP2 now supports Vista through a service patch.

The RDC has not been updated since Version 9 at that time Windows XP and 2000 were the only OS's available and they fully supported COM. It simply becomes to costly to make everything backward compatable. For developers like yourself you can appriciate this, do you still support Windows 3.1? At some point everyone has to cut off backward compatablity.

Moving forward because .NET 2008 is also new, even XI R2 has problems with it, this is due to MS updating their 1.1 Framework to 2.0 and 3.5. they changed things which we had specific dependencies on so now we have to also change, this all takes time to implement.

So this becomes a "best effort support" case since you are doing this on an unsupported platform. I did not see any results of your testing in debug mode on Vista? Install .NET 2008 on a Vista 32 PC and run your app in debug mode, if you use Vista 64 set your compiler to use x86 only. I believe your dll's are wrappers around the crviewer.dll and is likely either a permission issue with our COM(ActiveX) dll's or your dll's. Using regedt32.exe will give you the ability also to change permissions on the viewer and possibly your dll. It may be that Windows is not allowing your exe to access your wrapper as the error suggests in your original post.

Bottom line is, you should upgrade your app to use the .NET assemblies and stop using the RDC. There are lots of samples and fairly easy to migrate what your RDC app is doing to .NET code. Coding won't be one to one but the steps to execute a report and view are the same.

Thanks again

Don

Former Member
0 Kudos

Don,

The viewer works in XP but not in Vista so I can only assume it is a Vista problem. I followed your suggestion and checked the permissions on the viewer DLL but they were fine. I am running as an administrator.

So, since we are using Visual Studio 2008 for our C++ application, it appears that we have no options. From what you have said and what I have read, we should be using the Crystal Reports .NET SDK and the Crystal Reports .NET viewer controls. The problem here is that you guys are way behind in your VS 2008 support (MS announces VS 2010 today). It does not make much sense for us to go back to VS 2005.

I guess we will use the SDKs mentioned above and see if we can get by.

When will you be supporting VS 2008?

Peter

0 Kudos

Hi Peter,

We support MS .NET 2008 with CR 2008 but only the CR .NET components. RDC is not shipped with CR 2008. CR 2008 SP0 will integrate into a .NET application. SP1 which should be out shortly is DEP aware and will work now also without disabling DEP.

When MS VS 2010 goes GA, not Beta, we will begin our final testing for any issues with what ever the current version is of CR. It is pointless to test and release against Beta versions as there is no assurance what is in beta will be released. ALL beta builds are considered not feature complete, if something doesn't work completely and connot be function complete when it goes GA it's removed from the final build. It's waste of resources to work on something that may not part of the final build. Depending on what the issues are we may be able to backward support CR but we can only determine that after MS release the GA build and we have time to test.

Basically we have to wait for Microsoft to release before we can fully support their product. We have no control on the final release from Microsoft so we have to wait for them before we can support their product.

Thanks again

Don

Former Member
0 Kudos

Don,

Our application does only two things with the XI RDC. We allow the user to print pre-existing reports (.rpt) and we allow the user to print preview these same reports using the CR Viewer. So, everything we need comes with the RDC.

You have made it clear that the RDC is not the way to go so I must decide what to use to accomplish the above two tasks (printing and viewing).

You said that CR 2008 SP0 will integrate into a .NET application. In the CR 2008 download page I see Crystal Reports 2008 - Service Pack 0. Is this what I need? Also, what do you mean by "integrate"?

You also say that only the CR .NET components can be used. Does this mean that I can use this CR 2008 "integration" for viewing reports but not printing? I suppose I could continue to use the RDC for printing since it works fine.

Finally, you said that SP1 should be out shortly. How shortly approximately?

As you can see, I am having problems zeroing in on a plan of attack. Any help would be appreciated including identifying some web pages that address my issues.

Thanks, Peter

0 Kudos

Hi Peter,

We don't have the specific date yet so I can't give it to you until it becomes public on our web site.

Since you are simply viewing reports and printing then the .NET assemblies is all you need. They are included in MS .NET and the Developer verison of CR.

Go to our Diamon support site and download samples that for your configuration. This way you have somethign to test and see how it's used and should be fairly simple to port your main app code to use the CrystalDecisions.Windows.Forms which is the .NET viewer.

And yes you can view and print from the viewer or using the printtoprinter API in .NET.

Check this site and download the .NET samples: https://boc.sdn.sap.com/developer/library

Plan of attack:

1. Download sample .NET app. and see how it's done.

2. Migrate your RDC app to CrystalDecisions.CrystalReports.Engine and CrystalDecisions.ReportSource and CrystalDecisions.Sharedand CrystalDecisions.Windows.Forms assemblies.

Report Engine is the core report engine and the others are used to open the report. Windows.Form is the viewer.

Build a deployment package for your app and use the CR Distribution MSI to install on work stations.

Hope this clears it up for you?

Thanks again

Don

Former Member
0 Kudos

Don,

Your last response definitely helps.

I noticed that the assemblies you referenced (CrystalDecisions.CrystalReports.Engine etc.) are integrated into VS 2008 but they are version 10.2.36600.0. Our Crystal Reports reports have been built in CR XI. Do we have a problem here? Do I have to go back to CR 10?

Thanks Peter

0 Kudos

Hi Peter,

VS 2008 should have included 10.5 assemblies. CR XI is 11.0 and .NET 2005 is 10.2.

You can upgrade to CR XI R2 for free, install SP4 minimum and then it should work in .NET 2008 I believe. It would be best to upgrade to CR 2008 SP0 and then you are fully supported in .NET 2008.

You can use 10.2 or 10.5 if you are simply viewing, only issue you may run into is if you are using Cascading parameters and/or refreshing, cascading parameters are not backward compatable in the 10.x components. All other parts should be 100% compatable.

As long as you move the the CR .net Assemblies it should resolve all your permission and runtime issues.

Thanks again

Don

Former Member
0 Kudos

Don,

Thanks for the help. I have updated CR XI to R2 SP4 and now I have version 11.5.3700.0 of the needed assemblies. I will start working on the migration.

I would like to keep this communication open for a couple of days until I can be sure that everything works.

Peter

former_member184995
Active Contributor
0 Kudos

Just something to remember, XI R2 is still not supported or tested in VS.NET 2008 so we have no idea what kind of issues you may run into.

Jason

ido_millet
Active Contributor
0 Kudos

The Crystal XI version of my viewer application uses the RDC, and it's running under Vista without a problem. This means that the problem is probably not with the RDC - Vista interaction, but with something else.

Former Member
0 Kudos

Don,

I migrated the code to use CrystalDecisions.CrystalReports.Engine.dll, CrystalDecisions.Shared.dll, and CrystalDecisions.Windows.Forms.dll which came to me by upgrading my CR XI to CR XI R2 SP4. The development was done in Visual Studio 2008.

Once again it works in XP but not in Vista. The exception I get in debug mode is System.IO.FileNotFoundException. The file not found is CrystalDecisions.CrystalReports.Engine.dll Version 11.5.3700.0, Culture=Neutral, PublicKey token=692fbea5521e1304.

The dll version I built with and does exist is 11.5.9710.1263.

What do you think? It seems like I built with a newer version. However, I don't understand why the runtime is looking for a version I did not use.

Peter

Former Member
0 Kudos

Ido,

Thanks for your response. Anything is possible but remember this application works fine in XP so I assume it was programmed correctly. In addition, given that the RDC was not built for .NET, it is time to move on.

Peter

0 Kudos

HI Peter,

Can you install VS .NET 2008 and then CR XI R2 SP4 onto Vista. Must be in that order so we install all the parts, we need to find .NET to install CR assemblies properly.

This will tell us if it's a Vista configuration issue or if something is missing from the installer. Use VM-ware or Microsoft's equivolent, I believe there is a free trial version you can use.

Thanks again

Don

Former Member
0 Kudos

Don,

I did what you suggested and good news, it worked in Vista. However, I have no idea why. All that I did was install CR XI R2 SP4 on my Vista machine. I did not even re-build the application. The 3 Crystal DLLs are the same (same version) as before. The only difference is that the 3 Crystal DLLs are now in the folders thay were installed into. Note that the application build looks for those DLLs in a folder used by my application for third party DLLs. This brings me to my main question. Our customers will probably not have CR XI R2 SP4 installed. The 3 Crystal DLLS will be put into probably the same folder as the executable. Will we once again have the problem? does the install have to do anything else?

Peter

0 Kudos

Hi Peter,

Kind of late now, sorry I should have suggested this last time, but did you turn on install logging? You can compare the CR install and CR Runtime install logs to see what's different?

It may be a location of the runtime as specified in the registry. Use Regmon on working and non-working to see if we are finding the runtime from the same location or if we look but not found on the runtime PC.

As a work around what ever is different you could manually install the dll's and registry keys. It's messy but may resolve your problem.

Thanks again

Don

Former Member
0 Kudos

Don,

Sorry about the delay in my response, I got pulled onto something else.

Unfortunately, the 3 CR dlls are not self-registrating so asking InstallShield to register them does not work. I also simply put them into the same folder as the application and that didn't work. Finally, I tried putting them into the global cache which also did not work. It appears that the registry entry is used and nothing else is considered.

Manually registering the dlls is not at all easy since I do not know specifically what is required.

Any suggestions? Is there a .msi or .msm available?

Peter

0 Kudos

Hi Peter,

Try adding your application where the CR dll's are located to your PATH statement and also add our \bin folder.

There's been other posts using this method and it seemed to have resolved the issue.

Thanks again

Don

Former Member
0 Kudos

Don,

Thanks for your response but I'm not sure I understand what you are asking me to try.

Are you asking me to add a "bin" sub-folder to my application's folder and put the CR dlls in it and then add the "bin" folder to my PATH variable?

Peter

Former Member
0 Kudos

Don,

I finally have this problem solved. The only way that I could find the CR DLLs at runtime was to install the CR 11.5 R2 SP4 SDK.

I downloaded crXIr2sp4_net_merge_modules.zip. I used CrystalReports11_5_NET_2005.msm to create a .msi file. I then used the .msi file in my install process.

It appears that you guys don't want users to be able to use only the DLLs they need. It would be nice to have a much smaller footprint. However, I tried everything you and I could think of and nothing worked. So, I am stuck with the .msi file.

Thanks for your help.

Peter