×
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

Made2Manage / Accessing the Data Environment in a Report

Made2Manage / Accessing the Data Environment in a Report

Made2Manage / Accessing the Data Environment in a Report

(OP)
I am supporting Made2Manage 5.6 and was asked to modify the balance sheet report, rpfbsh_l.frx . I do not remember how to access the data environment and would very much appreciate assistance.

Working in VFP 9, I opened the original report, then saved as v2, then tried to open and modify the frx copy with:

MODIFY REPORT m:\m2mdata\reports\template\rpfbsh_l_v2.frx

If I right-click the report and choose data environment, the data environment is empty. Note that it is also missing with the original report.

I think I'm looking for csrSheet; an example of an expression is: DisplayVal('POP','GLREPORT.SECTION',csrSheet.fcsection,'60')

(I've tracked down DisplayVal as a user defined function in SQL.)

Thanks in advance!

Karen

RE: Made2Manage / Accessing the Data Environment in a Report

Karen,
I have absolutely no idea what Made2Manage 5.6 is, googling I noticed this is somekind of ERP software.
I notice you are working with VFP9 and you are asked to modify a report, rpfbsh_l.frx.
Reports in VFP9 are based on a cursor or a table. (DBF) in case of a table you could find that table in the Dataevvironment of the .FRX file, but not ness. In case of a cursor you will not find anything at all in the DE of the .FRX file. The cursor is created by the coding prior to opening a report. So if you want to change something of your rpfbsh_1.frx and it is not data related you dont need the cursor, just change your report. However if it is data related you can change the report but than you should also change the cursor.
Regards,
Koen

RE: Made2Manage / Accessing the Data Environment in a Report

Judging by the name, I would guess that csrSheet is a cursor rather than a physical table. A cursor is similar to a table, but it is created on the fly and disappears once it is closed. For those reasons, you can't add a cursor to the data environment.

However, that doesn't really matter. Provided the cursor is available when you run the report, everything should be OK. If you are just amending existing reports, you should be fine.

The disadvantage is that you can't use the Expression Builder within the report designer to access the names of the fields in the cursor. When adding a field to a report, you will have to manually type the field name rather than using the Expression Builder to do that for you.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Made2Manage / Accessing the Data Environment in a Report

If you do not have access to the coded part of the project...

I would use the init event of the report to copy the cursor to a freetable somewhere you can find it and see what is there …

CODE

select csrSheet
copy to c:\temp\csrSheet
go top 

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: Made2Manage / Accessing the Data Environment in a Report

I would be surprised if DisplayVal() was a SQL user defined function - to used as an expression in your report, it probably need to be a VFP visible function

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: Made2Manage / Accessing the Data Environment in a Report

That you don't find something visual in the data environment of a report doesn't necessarily point out the report is fed from data previously fetched. The data environment also has a code section. If that's empty and no query code fetches the data, and the report properties Data Environment tab has its "Report uses a private data session" option NOT checked, then the data can be prepared before the run and you only can adapt the layout with all the cursors, fields and expressions there will be and all you have at hand what already is used, you can't deduct what other fields might also be in the cursor(s) yet just not used in the report fields. You can add report variables and calculations done on the fly when the report runs. You may come up with additional data via code or the data environment, even restructure the cursor, but it's unfortunate to do, you don't ever have an overview about the data source and queries making up the report.

And Mike, just like the report doesn't run standalone in such designs, you can't design it with some tools relying on the data being present at design time, but if you have the data preparation code you can let that run and use it during design time, you just MODIFY REPORT instead of DO REPORT FORM and the expression builder will work with whatever cursors you have. What you don't have that simple is drag and drop of the visual table representations to the report canvas.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: Made2Manage / Accessing the Data Environment in a Report

(OP)
I really appreciate all the feedback, will look into the suggestions and reply back.

Thanks, Karen

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! Already a Member? Login

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