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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Report form to FRX?

Status
Not open for further replies.

ontsjc

Technical User
May 17, 2000
113
I think I know the answer to this, however, I'll ask anyway. I've been given a project that is currently in MS Acess. I would very much like to port this over to FoxPro, however there are numerious reports already designed that the client likes the way they look. I would really like to make these FRX files and add some more robust code to them. Is there a way to import an Access report form to an FRX?

Thanks for all your help.
 
I applaud your interest in bring an Access application into VFP. There are a LOT of good reasons to do so and we are here to help you as much as we can.

I think I know the answer to this

Unfortunately you must be clairvoyant, because the answer is - Sorry there is no method to 'convert' the Access reports.

Good Luck,
JRB-Bldr
 
Thanks for the response. I thought that would be the answer, but hope springs eternial!
 
It's possible to do this with Automation. It depends how much effort you want to go to.

The following might get you started. It's not meant to be working code. It's just to give you the general idea.

Code:
loAccess = CREATEOBJECT("Access.Application")
loAccess.OpenCurrentDatabase("c:\access\mydatabase.mdb")
loReport = loAccess.Reports(0)

This gives you an object reference to the first report. You can now access its properties. You would then use the information in the properties to programmatically construct an FRX file.

I can't tell you anything more about the properties of the loReport object or the format of the FRX. I'm simply offering the above to indicate what's possible. It's up to you decide if it's worth going to the trouble of doing this, or whether it would be simpler to re-create the reports manually.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Very interesting. I use automation all the time to manipulate excel, but for some reason hadn't thought about doing it with access. Thanks for the memory jog, I'll look into it.
 
If you need help converting the report objects to a Visual FoxPro format, there may be a way to do it programmatically. By creating a simple report with one of each type of item on your other reports, you can learn the definitions required inside the .FRX table records. Then, using some code to iterate through items on the Access reports using the automation above, create the corresponding items in the .FRX tables by appending records.

If you tinker with it enough you may develop a tool others could even use. :) But I would definitely look for a way to do it programmatically if you have more than a dozen or so.

Best regards,
Rick C. Hodgin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top