Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Yousfi Benameur
  Where is Yousfi Benameur?
 El Bayadh
 Algeria
 Yousfi Benameur
 To: Syed Imran Ulhaq
  Where is Syed Imran Ulhaq?
 Jeddah
 Saudi Arabia
 Syed Imran Ulhaq
 Tags
Subject: RE: Columns in Report
Thread ID: 209395 Message ID: 209868 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: Reports and Printers
Date: Wednesday, December 31, 2008 7:55:21 PM         
   


> >
> > Yes, That can be done.
> >
> > See my download file, it contain an example of how you will be to create report on the fly (rotf) in addition the ability to expand field width on the report.
> >
> > things you should make.
> >
> > #1 in your report, double click on the the first field in detail line, in the print when expression you put xfield1 and in the comment section you put "something1"
> > do the above for every field in the detail line in your report just for second field put xfield2 different name in the comment
> >
> > #2 selecting fields in the cursor should be >= from the fields on the report
> > suppose you have table with 5 fields, and there is 7 fields on the report in the detail line, your query should be select * from mytable,"","" I add 2 "" "" just to make the fields number = 7
> >
> > #3 double click on each object in the report in my download and check the print when and the comment for each one to understand how this class work
> >
> > http://www.foxite.com/uploads/b00c3a4b-cdf6-417e-b15c-67f09b825c05.zip
> >
> > Samir R. Ibrahim
> > Good things Take time, Great things happend all at once. My WebLog My Website: www.cdcity.org
>
> Samir
> thanks for your reply and example.In your example you fixed 4 columns and then prining them on different conditions.
> In my report, columns are not fixed, only 3 columns are fixed and amount column will split into 1 or 12 months depending on user's selection of date.
> I have solved this problem by using array -thanks to one of my senior colleague.
>
> thanks for help.
> regards,
> Imran

I see my Html solution dont liked,but it is very performant and on the fly.

Then,you can do that with a small prg and report templates.

the programm create an array with 12 elements (.t. if the field exists,.f. if the field dont exists).
The three templates are made for 6(portrait),8,12(landscape) fields (can extend if change small font for a whole landscape page).

All the tests are made in the template(value,print when).
You can do it with any table/cursor (max fields=12)
Below is the zip i include prg+template.
(You can more decorate the template and adapt it).
Yousfi Benameur

http://www.foxite.com/uploads/662aacca-c12e-42b9-a8ec-527bee341096.zip

Happy new year !

ENTIRE THREAD

Columns in Report Posted by Syed Imran Ulhaq @ 12/28/2008 10:23:44 AM
RE: Columns in Report Posted by tushar @ 12/28/2008 10:25:48 AM
RE: Columns in Report Posted by Srdjan Djordjevic @ 12/30/2008 3:31:56 PM
RE: Columns in Report Posted by Samir Ibrahim @ 12/31/2008 12:16:37 AM
RE: Columns in Report Posted by Syed Imran Ulhaq @ 12/31/2008 2:38:50 PM
RE: Columns in Report Posted by Yousfi Benameur @ 12/31/2008 7:55:21 PM
RE: Columns in Report Posted by Syed Imran Ulhaq @ 1/1/2009 6:45:49 AM
RE: Columns in Report Posted by Yousfi Benameur @ 1/1/2009 2:45:49 PM
RE: Columns in Report Posted by Yousfi Benameur @ 12/31/2008 10:47:02 AM