cancel
Showing results for 
Search instead for 
Did you mean: 

CR2013 Can't open dBase files, Previous vs. CR8.5, 9,10,11 work fine.

0 Kudos

I am stuck. I have been using Crystal 8.5, 9, 10, and 11 for years but now Office 2016 is cause MAPI issues so I need to fine a new solution. I have a large customer base who have many custom reports using the above versions. We generate report and Exports including PDF, Excel, etc. My native programming language is Delphi 5, Xe7.  The MAPI problem specifically happens when the user tries to export a PDF twice from CR11 when Office 2016 has been installed.

My plan was to create a print engine, that my original program would call, using VS 13/15 Express to run CR 2013 and run reports previously written with one of the above.

When I try to open a report which uses dBase Files, I receive this message...  I have tried all version of dBase files a few of the open but none open which have a memo field in them.

(See attached file.) "Database Connector Error:"   and lots of oriental letters....

I have also tried creating a new report with dBase files and all fail.

Suggestions????

Thanks Tony Nasca, Dove Net Software.

Don't laugh... (I know this is old technology...)

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

What runtime are you using?

0 Kudos

For the Developer CR 2013 and the testing my reports which is failing, I am using 14.1.4.1327

I have not got that far for the runtime for CR 2013

For runtime Crystal 11.5 the version Merge Module says Version 1.0

I don't have the original install setup for Crystal 11.0

Both fail with Outlook 2016 on the machine.

0 Kudos

See if this fixes the problem:

Microsoft Office mapi32.dll error

Another issue is it appears you are using the RDC in .NET? Or are you using the CR XI R2 .NET components? CR does not work in VS Express Versions, no way to add the CR plug-in into VS Express.

I suggest upgrading to CR for VS, you can get the .NET components from the Overview tab, on the left side there is a link to download the files. But it too does not install into Express versions. May work if you install just the runtime package but this is not supported so no idea what will happen.

As for using MAPI in CR for VS it is supported but currently we don't support Office 2016/365, I believe SP 17 will support it.

As for if this is an issue with MAPI or some other dependency Office is installing we don't know since you are using something that is not supported on multiple sides....

Good luck

Don

0 Kudos

That only applies to user having a mapi problem.  with office 2016 mapi is removed but crystal11/11,5 are testing for a mail client to add to a out put list.  This test fails and then error occurs.

I would obviously appreciate any suggestions to make either CR11 for CR11.5 to work. This would be a much better solution.

On the other hand any suggestion on how to make CR2013 read dbase files would also be helpful.  VS13 Express has no problem reading and writing to dbase files.  I was quite surprised to see CR2013 not be able to read dbase files.

0 Kudos

CR 11.x is end of lifer a loing time ago, nothing going to be fixed in that version.

CR 2013 should be able to read DBF files, you should look into why its not working with your dBF.

VS 13 Express is not supported with CR for VS installer/runtime.

On the download page for the runtime this i s noted:

Note 2: SAP Crystal Reports, Developer Version for Visual Studio .NET does NOT support Express Editions of any version of Visual Studio .NET. VS.

Don

0 Kudos

I looked into it further and the problem is that CR 2013 can not read dbase files if there is a Memo field attached.

xbase files w/o memo fields work fine.

xbase files w memo fields we get the original error.

My system is a quoting/invoicing system so memo fields are used for item descriptions, etc.

I have no problem moving to the full version of VS.  My plan was to extract the Print engine from my delphi program and call VS.exe running CR 2013.

I also tested ODBC and the same problem exists.

So if we can get CR 2013 to read xbase files with memo field, we would be great.

Thanks.

0 Kudos

Interesting,

Can you attach a DBF file with a memo field and I'lll test it.

Have you googled this error? Could be you need to change the field type.

How long is the memo field?

Don

0 Kudos

The memo field can be multiple lines long 1000 characters, etc.

See attached filbd.dbf with the field FDESC being a memo field.

the sample data is

memo field data .... repeat.

the attachment would not allow a zip file.

here is a link to the zip file.

I also include a picture of the path

The are dbase files created with Borland desktop tool,

http://www.dovenet.com/downloads/windows/Filbd.zip

0 Kudos

Hi Tony,

Yes, you can't add zip files, all you had to do was rename or add a .txt extension to the file.

I tried and it doesn't work for me either, CR complains and if I use ODBC SQLCON32 test app, no CR runtime I get this:

According to ODBC the length is 1 gig, definitely going to be a problem. Max CR can read is 64k.

I have not played with DBF files in a  long time so not sure how fields types are defined, see if you can limit the length to 32k, due to UNICODE it may be 1/2 due to double byte character interpretation.

CR does see it as a memo field in ODBC, I can't browse the field, which definitely indicates it's a memo field. And my report only gets the first character

So native DBF driver is not going to work unless you lower the length of the memo field.

Don

0 Kudos

This is not good news.  I can not control the size of a memo field.  The definition is simply "M" for memo field.

0 Kudos

Hi Tony,

I installed CR XI R2 and the data file works fine in that version so I am considering this to be a regression issue and I'll track it for DEV to fix, if they can. Due to changes in various OS's and dependencies it may be one of those updates that can't be fixed...

I suspect there should be a registry key that should make this work, I just don't know of one at this time but I'll keep looking.

I'll update the post once I hear back from DEV.

Also, to explain what I believe is happening is the data is being interpreted in UNICODE which is why we see Chinese characters in the error message.

What we need to do is turn off UNICODE in the CR DB Driver somehow I believe... ODBC returns the first character of each row because it's likely padding the uncode with a leading zero.

Don

Case - Incident 275154 / 2016 / DBase memo fields error

0 Kudos

Hi Tony,

DEV looked into the problem and discovered if you select the Access/EXCEL(DAO) driver in CR Designer you will get the data. I converted my report from the XBase drvier to this one and now I do see data. Must set the Type to dBASE 5.0

ODBC is still an issue though so I'll ask them to fix the ODBC connector.

Please test and let us know if this works for you also?

Don

0 Kudos

Don, first let me say thanks for your efforts on this.

I confirmed the capability to use the Access/Excel (DAO) to read dbase files with memo fields.

The down side of this is that the reports would have to be re-written.  I do not see an easy way to get from xbase filbd.dbf to the Access/Excel connection.

And I have 800+ reports out there with current customers.

The other thing that is going on is we are dynamically changing the path to the data programmatically which is required because if the users are on a terminal server, the temp path to the data has to be different.  We can not hard code where the data connection is.  (I'm not sure that the connection pathing looks like with Access/Excel (DAO).)

Some sort of fix with xbase tables would be preferred.  Forgive me for beating a dead horse on this matter. And I know this is very old school but it has been working for as long a I have been using Crystal Reports.

Do let me know if there is a better solution.

Thanks.

0 Kudos

Hi Tony,

It is done quite easily actually. In CR Designer open the report and select Database... Set Location.

Select the DAO driver and dBASE 5.0 and browse to your DBF file. Click OK for the log on screen.

Then select the old and new connection and click Update.

Now your report is using the DAO driver. Save that report using a new name ( I'll explain why below ) This is how to do it manually one report at a time...

To do this in code there are API's to do the same.

In your app you can add a flag in the report, Summary info is one place or add a formula or text object and hide it, you can also do that in code as well, to test on open if the report has been updated or not, more on this below...

First thing to do is search for this KBA - 1553921 - Is there a utility that would help in writing database logon code?  ( link won't work for ...

Run the app and open your original report. In the code generated you see the connection info:

//Set the attributes for the boMainPropertyBag

boMainPropertyBag.Add("Database DLL", "crdb_p2bxbse.dll");

boMainPropertyBag.Add("QE_DatabaseName", "");

boMainPropertyBag.Add("QE_DatabaseType", "xBase");

//Add the QE_LogonProperties we set in the boInnerPropertyBag Object

boMainPropertyBag.Add("QE_LogonProperties", boInnerPropertyBag);

boMainPropertyBag.Add("QE_ServerDescription", @"D:\Atest\Tony Nasca\filbd.dbf");

boMainPropertyBag.Add("QE_SQLDB", "False");

boMainPropertyBag.Add("SSO Enabled", "False");

Above it notes the use of the XBase DB driver.

Now load the updated report that use DAO and you get this info:

//Set the attributes for the boInnerPropertyBag

boInnerPropertyBag.Add("Database Name", @"D:\Atest\Tony Nasca\");

boInnerPropertyBag.Add("Database Type", "dBASE 5.0");

 

//Set the attributes for the boMainPropertyBag

boMainPropertyBag.Add("Database DLL", "crdb_dao.dll");

boMainPropertyBag.Add("QE_DatabaseName", @"D:\Atest\Tony Nasca\");

boMainPropertyBag.Add("QE_DatabaseType", "Access/Excel (DAO)");

//Add the QE_LogonProperties we set in the boInnerPropertyBag Object

boMainPropertyBag.Add("QE_LogonProperties", boInnerPropertyBag);

boMainPropertyBag.Add("QE_ServerDescription", @"D:\Atest\Tony Nasca\");

boMainPropertyBag.Add("QE_SQLDB", "True");

boMainPropertyBag.Add("SSO Enabled", "False");

So now search for this blog Ludek wrote using my code using ReplaceConnection() API:

http://scn.sap.com/community/crystal-reports-for-visual-studio/blog/2011/09/02/when-to-use-the-repla...

You can now update each report when opened, test if the flag has been set so you don't have to each time and save it back. Next time the report is opened test the flag, if it's been updated then skip the convert routine. The first may introduce a slight delay but once updated it will skip that part.

I do recommend updating once and saving so it' snot done each time, things change.....

The other option is to write a small "Update your Reports" app and do it one time only and save them back overwriting the originals or into a new folder the redirect your app to the new folder or copy the originals to a backup folder....

Then I believe your existing code to set location to the DBF should still work because the DB driver CR uses is lower down and should not affect that part of your code.

Hope that helps?

Thanks again

Don

0 Kudos

Wow, that was a mouth full. 

I did test the manual way and it certainly gives me a path to follow.

Thanks for the different solutions.

If you happen find a xbase solutions let me know.

Answers (4)

Answers (4)

0 Kudos

Don

here is a link to a zip file

http://www.dovenet.com/downloads/windows/Crystal13-Project.zip

in the zip file root folder proposal1.rpt is the original report with xbase files witten by crystal 8.5.

in the converted folder is proposal1.rpt converted with ADO files.

in the code.txt is the code that I am using and it pretty much follows the code that you gave us.

We are using the .saveas to save the file to the converted\proposal1.rpt.  We did not find an export function to save the report.

When we run the bottom part of the code to view the report, it still takes 7 minutes to come up.

If I open the report with crystal reports 2013, and say view, it takes 5 minutes to come up.

When i save the report to converted\proposal2.rpt, and then open the proposal2.rpt and view the report it comes up immediately.

So crystal report must be doing an additional convertion that is saved when we save the report to proposal2.rpt.

Any suggestions?

in the zip file i also included the dbf files.

One note. When I try to create a new report with crystal 2015, and try to load directly a ADO Dbase 5, dbf file. it takes a few minutes to register each dbf.

Any comments?

0 Kudos

Hi Tony,

Thank you for the reports. I see why it's taking so long now... Using the Proposal1.rpt your tables are not linked, CR has always required them to be linked. When converting you should have noticed this if you clicked on the Links tab:

when you click OK you get this message:

You can't see it any more because of the DB type, which is also a problem because DAO is also not supported to DBF but that's a different issue... Use ODBC, it's supported.

If you could you would see multiple SELECT statements, in other words CR doesn't know where to start querying the DB and because there are no links it tries to set them which is where the delay is coming from.

Now the second problem is when using the XBase driver I get a very strange result when connecting to the fildb.dbf:

I think this is due to the DBT file type, It appears to be a memo field and I don't recall if CR ever supported it.

Seems though DAO is able to use it but our Xbase driver is not.

So converting the report back to the Xbase driver in the Set Location looks like this. it can use the Xbase for the Head table but libdb table can use the DAO driver:

Now you see 2 database sources, Head table can use the Xbase driver but the Fildb table due to the Memo table can only connect by manually replacing the location ( to my folder )

So this is a basic report design problem and nothing I or the SDK can do to fix it. You need to either be able to link the 2 tables or remove the Fildb from the main report and use subreports to get the data, you still need to be able to link the subreport to the main report somehow though but you can use Formulae to do the linking.

And because you are using the DBT file I don't believe the XBase can support it. Not sure how it work when you created these reports.

And an FYI, in CR all of the DB drivers were rewritten and DEV removed all of the non-standard DB driver hacks they wrote and stated if the DB client does not support it we can't either.

I also realize this is just one report but you also need to realize these reports were originally written in CR 8 and should have been updated manually with CR 9 or above and "fixed" any issue that arose then.

It's too late now to ask DEV to change the Xbase driver for one customer, it could potentially break everyone elses reports. Not to mention the Xbase driver is used internally for various DB drivers so any change could potentially break all sorts of DB related Calls.

I also still believe using the ReplaceConnection() for some of your reports will work, but you need to fix the multiple data source issues first.

Don

0 Kudos

So we have the converting the xBase connection to ADO and we have the report saving to a new location.

The issue now is speed

when the system is looping through the xbase tables, it is taking 10 minutes per table and sometimes there are 3 - 5 tables in the report to convert.

it does complete just very slow.

then when we execute the code

crViewer.ReportSource = reportDocument;

crViewer.RefreshReport();

the refeshreport takes 15 minutes to execute and then the system presents the report.

see a picture of the machine while the system is doing the refesh...  it finally

0 Kudos

Once it has been converted to ADO then export to RPT format and verify all tables are now using the ADO driver.

Refreshing should use the new info, I suspect something has been missed.

Send me the exported report and I'll have a look at it.

Don

Former Member
0 Kudos

Don,

I am one of Tony's customers and a longtime Crystal user...  We were experiencing the root issue of this thread, which was the second export from Crystal Runtime would crash the engine (printing to a printer multiple times worked fine).  The error cropped up in March, immediately after upgrading from Office 2007 to Office 2016.

The crash would be preceded by a dialog expressing "Access violation at address 5B7317E8 in module 'MSSMAPI32.DLL'. Read of address FFFFFFFF."

Suddenly (within the last 30 days) the problem is no longer present.  Do you know of any MS Office updates that may have associated with the issue?  It irks me that we do not have a clear explanation for the sudden return to functionality.

0 Kudos

Hi Ben,

Ah interesting, this thread has gone off in multiple ways so back the original.

Microsoft updated their MAPI dll in which they deprecated the SimpleMAPI API's to and Extended set of API's. Originally the broke exporting to MAPI so we updated our export routines to use the new Extended Set of API's. But their should not have been any front end app changes required.

So what likely has happened is the Mircosoft dependencies CR uses, one of them being USP10.dll and GDIPlus.dll ( .NET SDK Only ), CR Designer uses GDI.dll.

CR uses a specific version located in our folders, in CR Designer you'll actually see both versions loaded in Help, About... More info, 1.4 (CR) and 1.6 (Office).

If there are others I don't know off hand what they may be or what MS did you break and then fix the issue.

So, Windows is updated often along with MS Office, what they may have "fixed" is hard to say, you could read the notes from every patch you installed and possibly find the root cause but not worth it.

As long as it's all working now that's great.

Going forward it's still better to bring the reports and dependencies up to date, more work to do so but mostly out of our control. CR has hardware and software dependencies so if third party applications update and do not support backward compatibilities it unfortunately shows up in CR.

All we can do is try to keep up as best we can.

That is why there is a PAM ( Product Availablity Matrix ) it shows what our Developers and QA teams are using and testing with. You can find it on help.sap.com

And IE no longer allows me to insert links... another result of updates.

Don

Former Member
0 Kudos

Thank you Don!

0 Kudos

Don

We have been making a little progress.. a few questions:

1. What is the method to store and test for a variable in the report (indicating the data connection has been changed to ADO)?  You suggested something in the summary section of the report.

2. I assume we can copy the report to a new path in visual studio.What is the method to save the new data connections in the report?

3. What is the method to use the new ADO data connection and change the data path to a different location?

Thanks.

0 Kudos

In my test app for parameters it has the drop down list to get various report object info.

Look at this routine: case "Summary Fields":

It lists the info and you can write the info. use that to mark if the reports been updated.

There are other ways as well, write to a database field etc.

Using private void btnSaveReportAs_Click(object sender, System.EventArgs e) you can save the report into a new location or exporting to RPT format will also save the updated info, along with the data.

Search for ReplaceConnection(), there is a KBA/DOC on how to that Ludek wrote using my code.

Don

0 Kudos

Do you have any sample code with VS 2015 and CR 2013 to view a report.

I am in VS 2015 and adding COM items and found "Crystal Active X Report Viewer Control 14.0

What are the other components that I need.

I think the Crystal Visual linking editor host component 14.0 is another one but I am not sure?

Thanks.

0 Kudos

OK, so are you using BOE 4.x and .NET SDK?

And No you cannot use the ActiveX control, it's for use within Visual Studio only. None of our runtime redist packages include it.,

Search for KBA 2163438, it has a printer test app attached and needs CR for VS 13 runtime SP 15 or above to be able to use it.

CR Designer does not install.NET runtime like it used in CR 2008 and previous.

The basics are:

using CrystalDecisions.CrystalReports.Engine;

using CrystalDecisions.Shared;

using CrystalDecisions.ReportSource;

using CrystalDecisions.Windows.Forms;

For Extended API's you need to use RAS:

using CrystalDecisions.ReportAppServer.XmlSerialize;

using CrystalDecisions.ReportAppServer;

using CrystalDecisions.ReportAppServer.ClientDoc;

using CrystalDecisions.ReportAppServer.Controllers;

using CrystalDecisions.ReportAppServer.ReportDefModel;

using CrystalDecisions.ReportAppServer.CommonControls;

using CrystalDecisions.ReportAppServer.CommLayer;

using CrystalDecisions.ReportAppServer.CommonObjectModel;

using CrystalDecisions.ReportAppServer.ObjectFactory;

using CrystalDecisions.ReportAppServer.Prompting;

using CrystalDecisions.ReportAppServer.DataSetConversion;

using CrystalDecisions.ReportAppServer.DataDefModel;

using CrystalDecisions.ReportAppServer.XmlSerialize;

Don

0 Kudos

I am now attempting to use Visual Studio 15 (VS15) and Crystal Report 2013 Active X controls.

Sorry if I am being confusing. I only know these tools from the Delphi world.

Is there any sample data code for active x controls in the VS15 world.

The big thing would be to be able to change the data connections dynamic like I could with dbase files which is where we start from.


Thanks.

0 Kudos

Why are you using version 14 .NET Assemblies?

Use this Parameter test app, it will work if you fill in the info to connect.

Requires SP 16 from this link:

Install the first link into VS, all other are distribution packages only, do not install them on your DEV PC.

Don

0 Kudos

Sorry.  Old dogs using old methods.  (This is what was used in the implementation for Delphi.)

I will look closely at what you have give me.

Thanks.