×
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!
  • Students Click Here

*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.

Students Click Here

Jobs

FRX objtype=8 and objtype=5 relationship
2

FRX objtype=8 and objtype=5 relationship

FRX objtype=8 and objtype=5 relationship

(OP)
Hi guys,

Has anybody figured out how to relate values in expr fields for FRX field name (objtype 8) and it's appropriate label (objtype 5).
For example objtype 8 expr='inv_no' and objtype 5 expr='Invoice Number'.
This can be helpful when exporting to Excel to show labels rather than field names.
My walk-around is to populate FRX field comment with "Invoice Number" for objtype 8 expr='inv_no'.
Any more elegant solution please?


RE: FRX objtype=8 and objtype=5 relationship

You can achieve something similar by using the Caption property within your table (the table must be part of a database for this to work; not a free table). Open the table exclusively, do MODIFY STRUCTURE, and set the Caption of the relevant field. For example, if the field is inv_no, you would set the caption to Invoice Number.

Now go to the Report Designer. Either add the table to the report's Data Environment, or open a project or database design window that contains the table. Either way, drag the field from the table and drop it on the repot.

You should now see two objects in the report: the label, which is set to Invoice Number; and the expression, which is inv_no,

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: FRX objtype=8 and objtype=5 relationship

(OP)
Thanks Mike, but I have to stay on free tables bulk created on fly.

RE: FRX objtype=8 and objtype=5 relationship

No reason why you can't create a free table that isn't really free, create it and attach it to a database by the same name, then modify the database properties in code.

You could easily encapsulate the adding to a dbc, with a simple udf, and do something readable for the database properties...

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

RE: FRX objtype=8 and objtype=5 relationship

You don't need to create anything on the fly. You only need the database at design-time. It's not relevant when running your report.

Do this:

1. Create a new database in a temp folder.

2. Copy your table (and any indexes and memo files) to that folder. Be sure not to change its name. It doesn't matter what data is in the table.

3. Add the table to the database.

4. Add the captions to the table.

5. Open the report designer. Drag your fields from the table to the report. Save the report and close the report designer.

6. Delete the database and the copy of the table.

Remember, the whole point of this exercise is to save you time when laying out the report. Once you've done that, you don't need the database any more. You don't need it at run time, and it doesn't matter what data is in the table when you create the report.

Of course, whether this procedure will actually save you time or not is another matter.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: FRX objtype=8 and objtype=5 relationship

Of course Mike, you are right, you only need the database and the caption to create the report, the database doesn't need to exist to run it - just a suitable cursor.

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

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!

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