Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating cool reports as Excel sheets
Message
From
03/04/2010 12:57:07
 
 
To
03/04/2010 05:18:54
General information
Forum:
Visual FoxPro
Category:
Third party products
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01458478
Message ID:
01458606
Views:
94
>>This is the coolest technique since sliced bread.
>>
>>I have been creating very useful reports of accounting data as Excel sheets that use the Excel autofilter feature to present and total ad-hoc filtered views of data. Importing the accouning data and creating the spreadsheets is done directly from VFP in a straightforward, totally automatic and relatively fast way. When viewing the ad-hoc filtered views Excel runs super fast as usual. Seeing different cuts of the data one right after the other lets you get a good feel for the data.
>>
>>For the next step, I want to add the capability to drill-down into the data. The records are going to be there, just not visible until the user requests to see them. I think the Excel outline of rows feature will be the right tool, with calculated subtotals of hidden rows and then grand totals tha only sum detail data and not the intermediate subtotals. Cool.
>>
>>Suggestions are welcome.
>
>Hi Alejandro
>
>I am great fan of creating repots in excel as well. However over the period of years I abandoned idea of converting FRX reports to
>excel output, because except for looking the same as original frx report, there is not much value added to it.
>Instead I opted for doing it 'hard way' with coding all my crucial reports into Excel via class. (See rep2excel / Coderep )
>
>What I found really cool with excel, is usage of excel templates, where basically you prepare layout of report with all formulas
>font formatting etc and then simply poke values into predefined sections of those templates. It does take little bit more time due to
>OLE slugishness but results are really great.
>What my users like the most are templates with (sub) totals on the top which when combined with autofiltering produce whole
>bunch of other usefull subtotal figures. Then there are multisheet excels wich are filled up from application
>with various app data which is brought together into meaningfull cross company results by excel formulas.
>It is just amasing. Nothing beats excel when it comes to really usefull data presentations.
>
>BTW what do you use for writing excel ? OLE or something else ? I know that Christof W has some alternative way of writing excel
>in his 'Excelporting' but don't know excatly how does it work. Did you by any chance try that one ?

Hello Sergio,

I use two methods. To present frx reports in excel I wrote a listener. It works, but I agree that to really take advantage of Excel that is not the best way. Not to mention it runs slowly. On the other hand, it provides an extra format option for existing reports.

The other method is the one that has me excited. First create a cursor just as you want to appear in Excel, with right column names. As you know this executes very quickly. Then export it to an Excel worksheet using cursor2excel routine that I customized based on code from Cetin (export to recordset and then import to Excel). That runs very fast also. Lastly beautify it, in a similar manner to how you do it: add autofilter, add subtotal line at the top etc., coloring, lines. The best results come by using a multi worksheet reports on a single subject. Very useful format.

Next step is to include drilldown lines that remain hidden until user requests them.

I looked at your report sculptor. It is a clever approach to use forms as report designer, but I haven't had enough time to learn and use it yet.

Best regards,

Alex
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform