Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No source code - decompile?

Status
Not open for further replies.

FAC17

Programmer
Jan 24, 2002
26
0
0
US
First of all -- I am NOT familiar with Crystal Reports but I am trying to help a desparate potential client.

She tells me that someone wrote them a piece of software using CR. She tells me that she only has an executable (and I assume data files). Programmer is long gone. She tells me that she and others have made several attempts to track him down to no avail. They have even followed leads such has "I heard he was working at such and such." Calls to such and such reveal no employee by that name. So he doesn't want to be found.

He "did not / would not" give them source code.

She tells me that "the program never did do all it was supposed to and since the beginning of 2002 has had a problem and she is not able to run some of the reports."

Is there a way to extract source code from a Crystal Reports exe?

Any ideas on how I can help her?
 
Is they are using the crystal reports .exe and not a VB.exe, then there must be a .rpt and .crf files around somewhere. Please look for any .rpts and open them up with crystal. Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Does Crystal Reports support a runtime exe or do they have to have CR installed on their computer to run the reports?

This lady mentioned that another tech was able to "copy some stuff off my computer, take it to his computer and run my reports". This sounds to me as though she has only a runtime version and the tech had CR installed on his machine.

Yes no maybe? Thanks for your help!
 
You do not have to have CR installed on the machine to run a compiled crystal report, although starting with CR V8.5 there are limitations, and in CR v9 you cannot do this at all.

Having said that, we still do not know if this is a compiled crystal report or a compiled VB program.

Did you find any .rpt files? you should be able to look at the properties of the shortcut of the crystal report executeable, if there is one, to see where the .rpt is, and then be able to open it up in crystal. Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Thanks for responding! I tried to call the lady to ask her to look at a few things for me. She is not in today but will be tomorrow. I will call then.

I think that this software was probably created with a version of CR that was in use in 2000 or so. The lady said that she had been waiting two years for another tech to get the time to fix her stuff. (No wonder she's frustrated with all this!) So she might well have a standalone exe.

I will call her and go look at what's on her computer and get back to you!

Thanks again!

 
There are 4 configs that she could have:

1) Reports compiled in Crystal's compiler, and run from desktop shortcuts. She would have both an EXE and an RPT for each shortcut. There would be no need for a programmer, so this is not the most likely scenario.

2) Crystal reports compiled into a VB application (from DSR files). If this is it, she is out of luck without the source code.

3) External reports used with a compiled VB application. She wouldn't have the source code for the application, but you would have the RPT files to use and modify.

4) External reports used with a compiled VB application-but fed ADO recordsets. You would have the RPT files, but without access to the programmers source code you wouldn't know how the recordsets are generated. You could change the layout and organization of the reports, but could not add any new fields

Also, I am pretty sure that a clever programmer could have changed the extensiions on the RPTs to disguise them, and still have them run as reports from the code. So looking for RPT files, while a good first step, might not be enough. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
Hi Everyone,

Why are we all hanging around here while the new year beckons?

As always, Ken has agreat summary, and if I could add some comments to his suggestions.

1) Compiled reports: take a rpt file and generate a CRF and an EXE. The three files work together, but if you've got CR then you can take the rpt files and modify them. CR8.5 is the last version that supports compiled reports, and it can save CR7 rpts. If it's older than that then you'll need to talk to someone who has access to the older version.

2) Compiled VB app with DSR file: Ken is correct to say that the DSR file will be compiled into the EXE, but incorrect to say you can't touch it. If the EXE previews a rpt file and allows export then you can export to Crystal Report (rpt) file and the use CR to modify that. You can't put the rpt back into the EXE, but sounds like that isn't required.

3) External RPT files: the easiest solution. At least you can modify the rpt files?

4) ADO Record Sets: A complex approach, and from the sound of the skills of the original developer unlikely to have used this method. Rebuild is the only solution here.

5) If you find a bunch of files in a \Report folder all with the same extension,try renaming one to rpt and see is CR can open it.

6) Also look for a *.DC5 or *.QRY file(s) in case the original devleoper based everything around a Crystal Dictionary or Query. Again a method you can find a way around.

7) Once you have the reports you can use either CR itself of any of the report viewers/schedulers available on the market. I think it is important to seperate the report delivery from the report design.

Good luck Editor and Publisher of Crystal Clear
 
Soory to be so long getting back to you all. I had a chance to look around on this computer. There is an exe file and a bunch of rpt files. In plain non-cr-user words, my assumption is that the exe file contains code for the screens and code to groom the data for delivery to the rpt files. Yes? No? If this is correct, is there anyway to decompile that exe?

Thanks for answering my dumb questions!

 
Possibly. You would have to look at the reports to see if they get their own data from the database (after they are launched), or if the reports are fed by the application (exe). The programmer could have done it either way.

You won't be able to modify the screens or app without the source code, but you might be able to modify the reports. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
First choice would be to take a machine with CR onto the network, grabb the rpt files and see if they run. Use "Set Location" to see what Data source the reports use.

If you can't do that what could be worth trying is to download the CRViewer from my web site. It is a 30 day eval and has the Cr8.5 run time files included. That should give you enough time to check a few things out.

Install on a test PC and see if it can run the rpts against the DB. If it can then you can use CR to redesign the rpts for your client. Editor and Publisher of Crystal Clear
 
Thanks all for your help! I think that I will download the evaluation version of CR onto my laptop and see if I can run a copy of the reports with a copy of her data. I may be back with questions, if I can't get that going! Your help is immensely appreciated!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top