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!

return value reportbuilder

Status
Not open for further replies.

nevin2007

Programmer
Aug 21, 2009
31
IR
hi
I have an application that in part of it user can modify a report.
I use reportbuilder.app from xsource for user editing.
My problems is
1.how determine user save report or discard changes?
2. how pass values from reportbuilder.app to my application?


I can rebuild reportbuilder.app but i dont know how pass values

thanks
 
Since you are using a tool from a 3rd party vendor, and not 'native' VFP, you should contact xsource to get your answers.

Good Luck,
JRB-Bldr
 
Maybe it was my mistake that not explain xsource is part of VFP and you can find source file of VFP tools in it.
You can look vfp folder and find it.
Program Files\Microsoft Visual FoxPro 9\Tools\xsource
 
Reportbuilder.app ships with VFP9 and is part of the new report engine, not a third-party tool at all.

For determining whether the user saved or discarded, I'd think the file's timestamp would tell you. Remember it before the edit, and compare the after-edit value.

Not sure what value you'd want to return, or even why. Can you elaborate a little?
 
The normal way for the report builder to return values to the application is to pass the first parameter by reference. By default, the builder returns one or more flags in this parameter.

The values of the flags are defined in the Help topic, "How to: Extend or Replace the Report Builder".

However, I suspect that this is not what you had in mind. I agree with Dan that you need to clarify what you are trying to achieve.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
hi Mike
thanks for your reply

As i explained before i want to find 2 things
1. user save report or not : if user saved report , he can save some descriptions about his report
2. send parameter to reportbuilder : some user can delete item in report but some must denied.
I can change reportbuilder.app and add some permission control code but cant tells to reportbuilder.app user permission from base application.
 
Nevin,

You've changed the spec. In your original question, you asked "how pass values from reportbuilder.app to my application?". Now you say you want to "send parameter to reportbuilder". That's a big difference.

In general, you can pass parameters to your report builder in the usual way:

Code:
DO (_REPORTBUILDER) WITH <parameter list>

But I wonder if that's what you really want.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Hi mike

You are right.But i googled for any answer and did not find anything.
So i thought pass a value by reference can solve my problem.

This command :
Code:
DO (_REPORTBUILDER) WITH <parameter list>
did not open report designer.
I think my question said that transfer value must be during report designing.
thanks
 
The report designer is opened with MODIFY REPORT, as it always has been. DO (_REPORTBUILDER) is to initialize the report engine.

You need to study the help topic called "Report Protection Flags", I think. It sounds like you're going the hard way round to keep users from modifying some fields.
 
Just to follow up Dan's point ...

If all else fails, you could create two copies of the report. In one of them, set the protection flags to prevent the user deleting the relevant objects. In the other, leave those flags alone.

Then it's just a matter of allowing users into the correct version of the report, according to their permissions. That can be done in your user interface, for example by enabling or disabling the button that launches the report designer.

I'm not saying this is a good solution. It's generally better to avoid having two copies of a component, because it means double the work (and double the risk of error) when you need to make changes.

But at least it's simple, and will save you struggling with modifying the source code of the report builder.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top