Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alternative to report designer
Message
From
17/10/2007 16:49:08
 
 
To
17/10/2007 16:14:58
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
01260825
Message ID:
01261637
Views:
12
>>>>Is there a specific reason why you do most of your reports to Excel nowadays? Is it a demand by your customer(s) or is there another reason?
>>>
>>>I must explain, first of all, that this is for internal use in the company. So, we can safely assume everyone has Excel installed - which is not always a safe assumption for commercial software.
>>>
>>>We found that doing reports in Excel gives users more flexibility, since most users already have some basic knowledge of Excel, and can change data sorting, do autofilters, add formulae, etc. This is much more difficult to achive with the built-in VFP reports. (Another note: I did not compare several other tools that are popular among UT users, for example, Crystal Reports. Specifically in the case of CR, the company is quite reluctant to do any additional expenses. Now don't you explain the advantages of those expenses to me, since I didn't take that decision...)
>>>
>>>Also, Excel provides some options for the programmer that are difficult to achieve with the built-in report designer. For example, try to make a report with a variable number of columns - for example, more or less columns, depending on the number of weeks the user wants to see!
>>
>>Is there any layout in the reports, or is it essentially filling cells A1:X100 with headers and B1:X100 with values? Do you fill template sheets with additional values? Do you ask Excel to print a neat report or need users start up Excel for that job?
>
>I heartily invite you to take a look at the sample!
>
>No templates; no action required by the user. Data is filled up in Excel, but several methods make the Automation task easier. See below.
>
>You subclass the reporting class, and then fill out several methods, the most important of which are:
>
>
  • .Select() - data selection goes here.
    >
  • .Detail() - invoked once for every record.
    >
  • .ReportHeader(), .ReportFooter() - invoked once for the report
    >
  • .PageHeader() - once per page; basically only useful for the text report version.
    >
  • .Init() - Here you define some important properties, including the array that defines the data grouping.
    >
  • .GroupHeader(), .GroupFooter() - run once at the beginning of each data group.
    >
    >Most output is produced with .Print() and .PrintLine() methods; although in the Excel report, the programmer can select any cell. .Print() will advance to the next column, .PrintLine() to the next row.
    >
    >Example:
    >
    >* .Detail() method
    >This.PrintLine(Field1, Field2, Field3)
    >
    >
    >This will advance a row, and fill the first three columns with the values specified.

    Hi Hilmar,
    Then we have done essentially the same thing :))
    *****************
    Srdjan Djordjevic
    Limassol, Cyprus

    Free Reporting Framework for VFP9 ;
    www.Report-Sculptor.Com
  • Previous
    Next
    Reply
    Map
    View

    Click here to load this message in the networking platform