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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to find out where a field is used?

Status
Not open for further replies.

BarbaraFuhrmann

Programmer
Aug 20, 2002
118
DE
Hi,

in my report I started with two tables I selected data from. Now I found out that the one of those is not longer needed. I removed the two fields of that table used in the detail section and than tryed to delete the table but CR says that it is still in use. In the field explorer it is marked the field that should be still in use.

So that's what I just checked and did not find this field:
- all displayed fields - it is not among those
- all formatting sections of fields and sections - the field ist not used for formatting purposes or as a condition
- all formula fields - the field is not used in a formula
- all group conditions - the field is not used for building a group

When I try to remove the table as well, CR tells me that it is still in use. If I click "continue" than it seems that the table is removed but when I try to save report it results in an abort (DocWatson).

Can someone give me a hint how to figure out where this field is used?

Thank you
Barbara
 
Export the report, and when you get to the export format, choose "report definition". This will create a test file that documents all of your formulas, etc.

Open up this text file with wordpad or notepad, and search for the table name. You will find the formula(s) that are referring to it.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Thank you, that was the first time I heard about the possibility of exporting the report definition and I'm sure that I will use it often from now on.

But when I do it right now on my "problem report" I can not find the table in it. That seems to me that I really removed every occurence of the table but CR thinks that it is still used. Do you have any other idea what I could try?

Barbara
 
email me the report and I can look at it. dgilsdorf@trianglepartners.com

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
I encounter the same problem quite often, and end up just leaving the report as is, which probably not good. So if you find out what causes this, please let me know!

As for the report definition. It is a valuable way of keeping a summary of the whole report design. But I have noticed that it only sometimes show part of the report design (e.g. leaves out certial definitions, etc.) Do you perhaps know why?

Lovely day in the UK,
EO
 
In earlier versions of Crystal (6 for sure, not sure when it changed) you used to be able to use the standard Windows search and look for 'files containing'. For some reason, I think it changed in later versions of Crystal, but it might be worth a try...

Peter Shirley
 
Hi Peter,

I'm not shure if I unterstand what you mean. When I search e.g. using the MS Explorer for files containing the table the report is found. But that is what I just know: The report does contain the table. The problem is that I can't remove the table from the report becaus CR is thinking that there is still a field from the table used by the report. But I cannot find any field of the table that is still used.

Regards,
Barbara
 
the field in question is probably being used in a formula for conditional formatting of another field (eg. Suppress this field if that(now a problem field) is some value) or similar in the section expert to control display of sections.....have you scoured these areas

I haven't had to find a "lost" field before but have often had to find a lost formula....in this case the trick there is to change the variable type in the formula

eg.

@Test

WhilePrintingrecords;
numberVar test;

test := {table.numberfield};


change this to

StringVar test;

Now the formula will crash when the report is run ... so you can easily find it....delete that occurance and hence can delete the formula now. Unfortunately that trick won't work here.

Jim Broadbent
 
Hi Jim,

thank's for your hints. The report is a simple one and so I'm sure that I've checked every formatting, every formula, ...

When exporting the report definition I even do not find a use of the field.

Barbara
 
Did you check to see whether the field is being used for sorting? Or in running totals?

-LB
 
Hi "LB",

I did check
- sort fields
- formulas
- parameters for subreports
- something called "crosstables" in german, I think this may be what you call "running tables"
- fields used for selection
- formatting of sections and fields
- groups
and could not find one single use of a field from the table I want to remove. So now I gave up. I'll leave the report as is and if I ever feel bored perhaps I'll build it new without a use of the table.

Regards,
Barbara
 
Hello Barbara,

Did you ever workt in Almelo at a Call Center?

Greetz,

Ronald



- Ronin71 - R>F>> SNAP!
 
Hi Ronald!

No, I did not.

But I'm curious: Why do you suppose? And what kind of call center is it in Almelo? And (ambarrassing to ask, but I have to) where is Almelo?

Barbara
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top