INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

editing reports in ms visual foxpro 9.0

editing reports in ms visual foxpro 9.0

(OP)
Hi guys,
I have an accounting software for my business that runs on ms visual FoxPro.
I want to make some minor changes on the report that is for printing invoices.I mean just like changing label text.the great thing is that I am able to make those changes and save the report.but on the hard copy it doesn't make any change.I mean when i open the frx file i see changes saved there but it actually doesn't work on the paper output.
Also that when I deleted that report (frx file), it prints the original invoice without any error and then I go devices and printers in control panel and right click on file that is being printed, it shows that file is located in startup.but actually there is nothing.
(I have vfp 9.0 with sp2)
Any suggestions would be highly appreciated.
thanx in advance.

RE: editing reports in ms visual foxpro 9.0

My guess is that you have two copies of the report, one separate and one included into the exe. If that's the case, the included report will always be used!

RE: editing reports in ms visual foxpro 9.0

(OP)
Yeah it looks so

Can I change the one which is included in exe.

RE: editing reports in ms visual foxpro 9.0

Yes, I agree that you probably have two copies of the report. The copy you are modifying is a free-standing file. You can open it, edit it and save it, just like you can with any other file or document.

But the copy that is actually printing the report is bound into your executable. You have no easy way of accessing that copy, other than through the application. You will not be able to modify it, and it will not be affected by changes you make to the free-standing file.

If this is correct, the only solution is to re-build your executable. When doing so, "exclude" the report from the project. That way, you will end up with a single copy, which will be the free-standing version that you can edit, and that is the version that will be printed.

To re-build the project, you will need to have access to the VFP development environment - plus you will need to know how to use it. If that's not the case, you will have to contact the original developer.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: editing reports in ms visual foxpro 9.0

The way to do this, is to include the report, and use it as a template if people need to change it. To change it, you can copy it out of the exe, but under a different name. If I remember correctly, you can do this by a simple Copy File command. When you need to run a report, you simply check if the external is there, and if so you use that to run the report. If no external report exists, use the internal one. This solution also works as a life line if your user manages to completely ruin the report, he can then start with a fresh report from the exe.

RE: editing reports in ms visual foxpro 9.0

Well, the obvious way to change an included report is rebuilding the exe after editing the report in the source code project in VFP.

Any further discussion about possible mechanisms of keeping a report separate and updateable without also rebuilding the EXE will also require a recompilation of the EXE without that report as embedded part. The VFP project manager has certain usually good defaults differing for types, eg DBC and DBF are by default excluded from embedding them into an EXE ,as you want to be able to store data separate from the EXE and insert/update/delete rows. A report typically is seen as part of the application.

VFP9 introdued features to enable giving endusers protected access to reports and manipulate only some unprotected portions. Beforehand I think you could also still run MODIFY REPORT at runtime, but it was a all-or-nothing enabling report editing by exclusing them or not. You have to exclude them to enable any editing, also protected mode editing and that won't happen with keeping an EXE as is with embedded report.

Bye, Olaf.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close