Like Naomi, I also prefer to program my reports separate from any existing form. I have a separate form with options for the report; in the simplest case, the user only sees "preview vs. print"; for other reports, the user may have additional options for sorting, filtering, etc. Of course, the report form might be called up from the data form, with the idea of showing the currently selected record.
Then, when the user presses the button to produce the report, data is selected selected into a cursor (usually combining data from several tables), and this is used by the report.
Important: The report's DataEnvironment should be empty.
>i wrote some set relation coding shown in below
>results are fine in my browse windows
>but when i output to report designer with data grouping : code
>it gives funny result.....
>the first group has all the detail data, why? and how to solve that problem ?
>
>USE code ORDER code
>USE detail ORDER code IN 0
>SET rela to code into detail
>SET SKIP TO detail
>BROWSE FIELDS code,desc nowait
>SELECT detail
>BROWSE FIELDS date,code,ref_no,qty,amount nowait && these ok
>
>*****output with data grouping result
>
>code : FNT/N
>desc : FINE WOOD LOCK WITHOUT HANDLE
>
>DATE CODE REF QTY AMOUNT
>03/19/09 FNT/N 12345 10 20.50
>03/10/09 FNT/N1 12042 5 15.70
>02/06/09 FNT/N2 12040 1 19.00
>------------------------------------------------------------
>code : FNT/N1
>desc : FINE WOOD LOCK WITH HANDLE
>
>DATE CODE REF QTY AMOUNT
>03/10/09 FNT/N1 12042 5 15.70
>------------------------------------------------------------
>code : FNT/N2
>desc : FINE WOOD LOCK WITH DOUBLE HANDLE
>
>DATE CODE REF QTY AMOUNT
>02/06/09 FNT/N2 12040 1 19.00
>------------------------------------------------------------
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)