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 display a list of available fields in a report

Status
Not open for further replies.

finglem

Technical User
Nov 14, 2003
66
GB
Hi folks
Hope you all have had a good christmas.

Now back to work......zzzz

Is it possible to display a list of available fields that a user can display in their reports if the report is based on a cursor?

The problem I have is that our customers always phone up and say what is the expression i need to display blah blah blah on my Invoice, delivery note etc.
The truth is that I often do not know as I didn't write the software and I have no access to the source code.
What would be ideal is something like when you right click the report and look at the data environment it gives you the ability to drag and drop the fields straight onto the report but as the reports are based on cursors rather than the tables themselves this is not possible.
Any ideas would be most grateful.

All the best and happy new year to you all.
 
I take you just create / support custom reports that the application allows the users to build. Unfortunately, much of the developer IDE support isn't available in the runtime, and especially not with cursor (vs. tables).

While you may not have access to the source code, you should have some documentation as to the fields available in the cursor(s). Unless the cursor fields are computed or renamed, they should be the same as the underlying tables.

Rick
 
If the cursor name is csrTemp then:

FCOUNT("csrTemp") gives you the number of fields
FIELD(n, "csrTemp") gives you the name of the nth field.

You could loop through the fields and list all the names but I don't know how to integrate that information into the Report Designer so as you could drag and drop.

Geoff Franklin
 
rgbean

That's the problem there is no documentation as such, the programmer's lock themselves away for days on end and we are under strict instruction not to disturb and even when we do get to speak to them, they can't be sure what they pulled into the cursors way back when it was first created.

As for me personally. I have got to stop what I am doing every time the phone rings and one of our customers says I want to be able to show such and such on my Invoice or whatever and have then got to test any possibilities.

As I am sure you are aware this can take ages and I was just hoping that I could point the customers to a way of testing things for themselves rather than me having to drop everything only to find out after half a day messing about that the cursor doesn't hold the required info.
 
If the users don't have Fox then there's not much they can do.

If all you want is a list of the fields in a cursor then the DISPLAY STUCTURE command will give you that and DISPLAY STUCTURE TO PRINTER will give you a hard copy.

Geoff Franklin
 
Thanks geoff,and rick


As I said I have no access to the source code so it looks like a bit of begging to the programmers to get a list.
The problem I'll end up with just supplying a list of fields to an end user is the amount of support calls we are going to get cause of typo's in the expression boxes!!

Oh well, thanks anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top