|
Home > Archive > FoxPro Help and Support > January 2006 > Reports without tables
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Reports without tables
|
|
| simast@gmail.com 2006-01-23, 11:25 am |
| Can you use reports without tables? I just want to print a page with
data from some global variables. It keeps asking me for a table...
| |
| Cindy Winegarden 2006-01-23, 11:25 am |
| Hi,
Reports won't print without having a row in a table. What you can do is
create a cursor with one row and then run your report from that.
--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@msn
.com www.cindywinegarden.com
<simast@gmail.com> wrote in message
news:1138030812.834660.321120@g44g2000cwa.googlegroups.com...
> Can you use reports without tables? I just want to print a page with
> data from some global variables. It keeps asking me for a table...
>
| |
| Lee Mitchell 2006-01-23, 1:24 pm |
| Hi simast:
Cindy is correct.
Here is a technique for using an array in a report, but it still needs a
cursor.
1. Create the single or multi dimensional array. I used the AFIELDS()
function for testing purposes.
2. Define a public variable, such as X, used to reference the array
elements.
3. Create a UDF in the detail band of the report to increment the public
variable:
x=x+1.
4. Reference each element in the array that you want to print in a field in
the report. For example
atest(1,x) && this is field1 expression.
atest(2,x) && this is field1 expression.
Etc
5. Create a "dummy?table (or cursor) that has the same number of records as
your array has rows and place this in the data environment of the report.
(The report must have a table or cursor to run even if you don't actually
print anything from it.)
I hope this helps.
This posting is provided "AS IS" with no warranties, and confers no rights.
Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell
*-- VFP9 HAS ARRIVED!! --*
Read about all the new features of VFP9 here:
http://msdn.microsoft.com/vfoxpro/
*--Purchase VFP 9.0 here:
http://www.microsoft.com/PRODUCTS/i...cid=54787e64-52
69-4500-8bf2-3f06689f4ab3&type=ovr
Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/gp/lifeselectindex
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003
>Hi,
>Reports won't print without having a row in a table. What you can do is
>create a cursor with one row and then run your report from that.
--
>Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
> cindy_winegarden@msn
.com www.cindywinegarden.com
<simast@gmail.com> wrote in message
news:1138030812.834660.321120@g44g2000cwa.googlegroups.com...
> Can you use reports without tables? I just want to print a page with
> data from some global variables. It keeps asking me for a table...
|
|
|
|
|