Printing & Report Progress for Cologne Conference ...
Posted: Thu Mar 22, 2018 10:34 am
Hi guys,
Sorry I have been so quiet for a while, its because I have been working on the session material for the Cologne 'xBase.Live' presentation on "Printing and Reporting".
Over the last ten days or so I have given third party products / frameworks a rest (a break) and have been focusing on using my own X# class library called 'BESTdocument' - in order to make reports and printed output.
Unfortunately, I seem to have lost previous work I did for "DevFest 2009", so I have had to re-code the 'Report Generation' tools I had been using previously. Anyone got a CD from back then ?
However, this gave me the opportunity to base any reporting software tools on Collections, 'in-Memory' collections like 'List<T>'. The following image is based on the 'Person' class, just a simple test class of mine. So I am processing a List<Person> object in order to create the single page report - check this out :-
Sorry, yes, I know the colours are a bit yucky / garish, but it is test code and test data. The point is that we have complete freedom to apply logical conditions - to ignore a column item detail, or to change its color or font attributes, like applying strike-through, italic etc. We can even apply functions to make a calculated field - since STATIC methods are really functions.
For those of you who may be a bit new to Printing (and Reports) it is most important to have a Preview feature / function with which to work. Otherwise we are working 'blind'. We need to view before printing hard copy. This was a big issue with my VO based class.
The Preview tools in .NET seem to be of the WinForms generation of technology so even the following image shows a WPF main form which is using a floating dialog Preview WinForm :-
This output was generated by clicking the "UK guys" putton at the bottom right of WPF form.
Now then, two other issues to be sorted out were the 'Multiple Page' issue, and showing a Control for print previewing on a WPF form. Take a look at this then :-
Okay then, I know the page content is NOT startling (or particularly interesting) but we need to keep thing simple when dealing with 'tricky' issues like multiple paging.
What we see are four pages from a document, and the detail is showing in the 'Hosted' control on a WPF form. Yes, we are using a WinForm control for Previewing, in a 'hosted' manner on a WPF Window.
Finally for now, we see below just the Control output of the four pages, BUT, the data available behind each one is in fact that for a full columned report, I just need to add the extra code required, to make it similar to that one page output previously show here.
I will add all of the details on how to do this to my growing eNotes volume called 'ClickStartXSharp' which will be eventually available to the full Forum guys.
I recommend however to attend the Conference and visit the Presentation on this topic - there is no way any written material can compare with live session presentations. I know, I have sat through enough of them over the years ;-0) Many benefits from attending conferences, I have learned a LOT over the years.
Hope this interests a few.
Oh! - buy the way, if you copy and adapt my code, its not difficult to get your own reports to work nicely for you - AND - they can be created from DBF data if needs be, as well as my class library and the library tools all available to XIDE applications.
One of the possible draw-backs of nice modern Third Party reporting frameworks is that they are designed to be used with Visual Studio, and some even seem as if they may be limited to C# / VB because they have Wizard templates installed, which are not currently available to us using X# and VS.
So at least we can print just about anything with our own X# classes, using WinForm previewing - GREAT news !!! And its free.
Best Regards,
Phil.
Wales, UK.
Sorry I have been so quiet for a while, its because I have been working on the session material for the Cologne 'xBase.Live' presentation on "Printing and Reporting".
Over the last ten days or so I have given third party products / frameworks a rest (a break) and have been focusing on using my own X# class library called 'BESTdocument' - in order to make reports and printed output.
Unfortunately, I seem to have lost previous work I did for "DevFest 2009", so I have had to re-code the 'Report Generation' tools I had been using previously. Anyone got a CD from back then ?
However, this gave me the opportunity to base any reporting software tools on Collections, 'in-Memory' collections like 'List<T>'. The following image is based on the 'Person' class, just a simple test class of mine. So I am processing a List<Person> object in order to create the single page report - check this out :-
Sorry, yes, I know the colours are a bit yucky / garish, but it is test code and test data. The point is that we have complete freedom to apply logical conditions - to ignore a column item detail, or to change its color or font attributes, like applying strike-through, italic etc. We can even apply functions to make a calculated field - since STATIC methods are really functions.
For those of you who may be a bit new to Printing (and Reports) it is most important to have a Preview feature / function with which to work. Otherwise we are working 'blind'. We need to view before printing hard copy. This was a big issue with my VO based class.
The Preview tools in .NET seem to be of the WinForms generation of technology so even the following image shows a WPF main form which is using a floating dialog Preview WinForm :-
This output was generated by clicking the "UK guys" putton at the bottom right of WPF form.
Now then, two other issues to be sorted out were the 'Multiple Page' issue, and showing a Control for print previewing on a WPF form. Take a look at this then :-
Okay then, I know the page content is NOT startling (or particularly interesting) but we need to keep thing simple when dealing with 'tricky' issues like multiple paging.
What we see are four pages from a document, and the detail is showing in the 'Hosted' control on a WPF form. Yes, we are using a WinForm control for Previewing, in a 'hosted' manner on a WPF Window.
Finally for now, we see below just the Control output of the four pages, BUT, the data available behind each one is in fact that for a full columned report, I just need to add the extra code required, to make it similar to that one page output previously show here.
I will add all of the details on how to do this to my growing eNotes volume called 'ClickStartXSharp' which will be eventually available to the full Forum guys.
I recommend however to attend the Conference and visit the Presentation on this topic - there is no way any written material can compare with live session presentations. I know, I have sat through enough of them over the years ;-0) Many benefits from attending conferences, I have learned a LOT over the years.
Hope this interests a few.
Oh! - buy the way, if you copy and adapt my code, its not difficult to get your own reports to work nicely for you - AND - they can be created from DBF data if needs be, as well as my class library and the library tools all available to XIDE applications.
One of the possible draw-backs of nice modern Third Party reporting frameworks is that they are designed to be used with Visual Studio, and some even seem as if they may be limited to C# / VB because they have Wizard templates installed, which are not currently available to us using X# and VS.
So at least we can print just about anything with our own X# classes, using WinForm previewing - GREAT news !!! And its free.
Best Regards,
Phil.
Wales, UK.