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!

Report withoute any tabel

Status
Not open for further replies.

Finnfors

Programmer
May 4, 2002
5
SE
Is it possible to create a report withoute connection
to the selected table?

I need a one page report, with info from variables only.
I workaround it with a one record "dummy.dbf"

It feels like a lousy solution.

Any ideas?
Lasse
 
HI,
You dont need the table to hold the varioables contained in a report. What you can do is to create the report with all variables only fielded suitably. In the REport set the data environment as default only. However, just BEFORE issuing the REPORT FORM myReport ... etc command.., add the code..

SELECT * FROM SYS(2005) INTO CURSOR myCursor
then proceed to issue the command..
REPORT FORM .... commands.

Remember to make the variables used in your report as PUBLIC and suitably release them if nbeeded after the report.

Another way is to craete a custom object holding the variables as its properties. Example..

myo=CREATEOBJECT("custom")
myo.AddProperty("myVar1",0) && numeric variable with Zero
myo.AddProperty("myVar2","") && text variable
*** etc.. variables added to this object.. myo
Initialise the values of this object in your code or by user interface, by binding it to the various text boxes you use and accept user inputs.

REPORT FORM myReport .... etc..

In the report you can refer these variables as myO.myVar1 etc.

After the report is output, along with the forms release, release the myO object also.

Hope this helps you :)
ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Thank you ramani,
but your "SELECT * FROM SYS(2005) INTO CURSOR myCursor"
generate 123 records, = copies of the report.
Of course, I can make a "SELECT" that always returns only one record.
It seems that a report need som sort of "records"
in the selected area to run.
 
after
"SELECT * FROM SYS(2005) INTO CURSOR myCursor"
write
REPORT FORM myReport next 1

Good luck Cristian
 
Thank's csimion,

"NEXT 1" solve my problem.

Now it does't matter wich tabel selected when
I print my 1 page report, with array-info.

Lasse
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top