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!

Modifying An Existing Report

Status
Not open for further replies.

FoxEgg

Programmer
Mar 24, 2002
749
AU
Thanks for the assist...

I have an existing Report (say Report A)
I need another similar Report

So, I thought that I would create a new Report (Report B) by opening Report A and save it as Report B then modify Report B....

BUT I don't seem to be able to be able to edit the TEXT fields....in Report B
I can delete them and re create them... but not EDIT them

Is there a simple way that I can do the usual.... namely <right click> then select the text box properties and edit it.

But I cant seem to do it. If I have to delete and re-write.. no problems


ALSO (maybe a related issue) in a new Text Box I don't seem to be able to copy and paste...

Appreciate advice

FoxEgg

FPD2.6 Legacy Human
Sydney, Australia
 
Readonly?


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
What exactly do you see when you try to edit the field?

Are you unable to open the Properties window? Is the text greyed out? Does the insertion piont fail to appear? Do you get an error message? Or what?

If, as Mike G suggests, the report is read-only, you would still be allowed to edit the field, but you'd see an error message when you try to save the report.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
FoxEgg,
Hey Doc, long time no see. Are you still using the same FPD2.6 code that you were running back in 2002?
Do you have any variable to determine M.EDITING or M.ADDING (or something similar which determines the state of your field/screen you're working on?
If so, can you check the state of that value while you're trying to edit?
Cheers,
Scott

Best Regards,
Scott
ATS, CDCE, CTIA, CTDC

"Everything should be made as simple as possible, and no simpler."[hammer]
 
Can protecte mode be a report property? I think you have to start the report designer with MODIFY REPORT PROTECTED to go into protected mode, it never happens automatically or by a report configuration.

Either it's the file readonly state (look on attributes in the Windows Explorer, they are copied from original file to copy), or you have the idea to edit a label control. A report label control is just a label, it has no data source you could edit.

Bye, Olaf.
 
Check the file attributes on the file system -- looks like it may be set to read only. Have to set both the FRX and FRT file settings.
 
Hi Canada Mike, (any of that Oz Wine left ?)
Readonly?
I looked at that...
I found this reference... not for Labels it seems...
From: Visual FoxPro 9.0 SP2
ReadOnly Property

Specifies whether the user can edit a control, specifies whether a table or view associated with a Cursor object allows updates, or contains a value that indicates if a file in a project can be edited. Available at design time; read/write at run time.

Applies To: CheckBox | Column | ComboBox | Cursor | EditBox | File Object | Grid | Spinner | TextBox

Mike 2
What exactly do you see when you try to edit the field?

See picture.... When I right click and then click properties... I always get Float etc

Report_Detail_bedqj4.jpg




Are you unable to open the Properties window? YES (see picture, but I have no ability to edit text) Is the text greyed out? (Nope)
Does the insertion point fail to appear? Do you get an error message? Or what? (all as per on picture; nothing else)

If, as Mike G suggests, the report is read-only, you would still be allowed to edit the field, but you'd see an error message when you try to save the report.
(No error message)

Another possibility ....

Is the report in "protected mode"? Check the Protection tab in Report Properties. Is there a tick against any of the options?

I changed all the properties of the report... No change (even after a re-boot)



Scott24x7
Hi Scott....Good to speak; ? still on Oz?.
FPD26 sadly yes... I am guilty... I got rapt over the knuckles for my backward ways in my last little post... But I have just finished another hospital and that sort of consumed all my spare time... No time for VFP... (and I also believe in the 'if it ain't broke don't fix it' principle. It is the emergence of these darn 64 bit machines (and they are all though the new hospital) that has forced me to fiddle a few things....

Nope, no variables stopping the process...


OlafDoschke

Can protected mode be a report property? I think you have to start the report designer with MODIFY REPORT PROTECTED to go into protected mode, it never happens automatically or by a report configuration.

Either it's the file readonly state (look on attributes in the Windows Explorer, they are copied from original file to copy), or you have the idea to edit a label control. A report label control is just a label, it has no data source you could edit.

Thanks Olaf
Tried that too... no avail

Dr Green

I did check the file attributes on the file system -- and set both the FRX and FRT file settings.

Lets not worry about this post any more... there are only a few Labels that I have to change

THANKS AGAIN TO ALL FOR SUGGESTIONS



FPD2.6 Legacy Human
Sydney, Australia
 
I was not talking about the property Readonly of several Foxpro classes/objects, but the readonly file attribute of your FRX/FRT files on the one side and I was talking about a Label report control on the other side, I was not talking about a Label.Readonly property at all.

From your screenshot you have a report label here.

Normally the property Window of a report Label shows like this:
labelproperties_epeay9.png


Forget about the readonly file attribute, I just made a test FRX and the properties window still show the full dialog. Also your Report Designer caption does not show "[Read Only]".

I remember I have seen such a restricted property window somehow and that was even before the PROTECTED mode was introduced. I don't remember what the reason was.

Bye, Olaf.
 
What is [tt]? _reportbuilder[/tt] telling? Which APP is set for report editing?

What puzzles me is the caption of the "properties" window in your screenshot. It says "Text". The overview of all Foxpro dialogs does not talk of a Text dialog.

The command window part of your screenshot shows you did MODIFY REPORT additems, so you're not editing in protected mode. But where is additems.frx? Try the explicit file name, please, eg MODIFY REPORT "C:\vfp projects\reports\additems.frx"

Bye, Olaf.
 
I think we can forget about the FRX being read-only. As both myself and Olaf have said, that wouldn't prevent you editing the text. It would prevent you saving the modified report, but that's not what's happening.

By the way, in your original question, you talked about being unable to edit a field. But your screen shot shows your attempted editing of a label. There is a difference. So I repeated my test to try to reproduce the problem, but this time with a label, and it still works exactly as you would expect.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
>exactly as you would expect
Which means as my screenshot shows, right? The dialog popping up is Label Properties, not "Text".

I think the problem you have results from the FRX being a legacy report. If you edit it in VFP9 the first step is to accept the conversion dialog and convert the FRX, the structure has changed even since VFP6, so we don't need to blam 2.6 here.

I'd try copying the report contents. As a first try, what happens, if you create a new report in VFP9 (CREATE REPORT newadditem.frx) and copy over just the "Letter from Ann" label really by copy&past of the control from the old report into the new report (you can have both of them open in parallel or first open the old one, copy, then open the new one and paste.

That way the copy of the label should become editable. If that work the simplest approach would be STRG+A and STRG+C to copy ALL controls and then STRG+P in the new report. Full copy & paste of all the report controls.

The compatibility doesn't seem to go as far as editing the report, so simply recreate it that way.

Bye, Olaf.
 
Thanks again...

Sorry, Mike, you are right...in error, I did write "to edit a field." but I meant "I attempted to edit a label."


Also.. just to correct one misconception: Olaf wrote "I think the problem you have results from the FRX being a legacy report"

This form was ABSOLUTELY not a conversion from FPD2.6.. It is not a legacy report... I recently created this form de-novo in VFP8...
It is not a 'legacy' anything

((All my very old and inappropriate prior reports in FPD2.6 were hard coded with PCL5 escape codes.. These have been deleted.
Also I never used the old DOS FPD Report generator... all my old stuff was hard coded))

Olaf vielen Dank for your screen shot... but mine does not look like the normal the property Window of a report Label; as you showed.

CONCLUSION:

I'll play with it a bit longer, and I really appreciate everyone's thoughts... but paying respects to the laws of diminishing returns...(and because unlike Dr Who, I do not have infinite time) I will simply delete the LABELS that I don't want
And make new ones...

Result: MY PROBLEM SOLVED

Or Start I'll a new report all over

AGAIN MY PROBLEM SOLVED


Thanks again to all

JF (unlike Scott I am NOT 24/7 awake)

FPD2.6 Legacy Human
Sydney, Australia
 
May what you had there was no VFP Report Label but some OLE class!? The properties dialog of that also differs, though. I don't really have an idea, though there are not much more report controls and all visuals point out this is a report label.

Deleting and adding a new one is a very pragmatic solution, I'd also not care what really happened here and just fix it.

Bye, Olaf.

 
A seemingly unrelated question: Where do you put your sources while developing on them? I ask because a universal reason of course is any bitflip anywhere causing such things. I don't think so, why would that cause such a properties dialog, it doesn't change coincidentally. Nevertheless it's woth a thought to where you store your sources while working on them.

Some have their project folders in network shares / NAS.
Some have their project folders in folders synced with cloud drives (Dropbox,Google Drive,One Drive,etc)
Some have their project folders in RAM drives with autosave to some HDD folder mapped.

While the last one is an option with very fast responses and short latency, all these are bad ideas if you ask me, as any access from elsewhere to copy files or backup files or any network outages can mean errors or corruptions in concurrent write situations. Another thing to avoid is antivir scans on files you work on in development.

Any local drive is okay, have some kind of backup of source version control where you decide, when it stores a copy to versioning or shelf your current state as backup.
I also have a project hook making a copy of files right before you edit them. Any such thing avoiding access while you work on files helps preventing file corruptions.
RAM discs are tempting, but mean a loss when you don't ever save RAM contents to a persistent storage device and autosave can unfortunately happen at the wrong time.

Even a local drive of course can fail with bad sectors, but is the safest storage place in these alternatives. Besides a local raid with at least some striping or mirroring. Anyway raid is no safety against deletion, infection or corruption, as that simply happens in all raid copies, too. But raid saves the day in case of single sector failures.

I'd also consider a NAS with single user access at the time of development as OK, in the end the straight simple network setup is as good if not better than an external USB or thunderbolt attached drive and these also are very close to internal drives especially with todays bus or LAN speeds, as long as the NAS is not attached to a backbone all LAN devices use.

Bye, Olaf.
 
FoxEgg said:
Hi Canada Mike, (any of that Oz Wine left ?)

Lol, no, but that gift was really unexpected, and welcome, thank you.



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top