Reporting Services working with X# - in-memory object based ...
Posted: Sat Feb 03, 2018 12:12 pm
Hi guys,
I will try to start this thread about 'Reporting Services' and hope it does not 'slide' into a discussion about tabs and spaces in Visual Studio (hate) - like my last Pearls posting !!!
The reason this post is placed in the Product section is simply because I have just coded a simple app in X# which has Report files in it, and which were actually made by a C# Wizard. So this to me is a big step forward for X# use.
Once made, the '.RDLC' type files can then be copied from a C# class library and dropped directly into the X# project, where they work a treat - easy almost. The point of doing things this way is because the 'Reporting Wizard' is a template not yet available in X#, but present and working in C#.
I have based the report on an in-memory collection of Person objects, where the Person class is a simple business class of my making. So this approach could be good for DBF guys too, as DBF data can easily be made into .NET Collections of a single Type.
Here below is the 'SE pane' image showing the copied two Report files :-
The only thing that nearly 'got-me' was that the report .RDLC files must be made 'EmbeddedResources' - this is shown in the above image. When made by the Wizard in the 'ClassLibrary' project this embedding is done automatically for us.
Now we can see the report output/display as well as the X# code with required syntax :-
It may be a good idea to show the X# code in a clearer and large format so here it is :-
Note that lines 32 and 33 show how we can get different report 'sets' by applying a LINQ wrapper to the basic report lines. So we can go from DBFs to .NET and then LINQ while using old fashioned (but FREE) Reporting Services technology (which was based in WinForms and similar).
Yes, a lot of technological integration, old and new, all to make our life easier.
Hope this interests a few.
Now over to 'Dick et al' to turn this thread into something quite different :whistle:
Best regards,
Phil.
Wales, UK.
I will try to start this thread about 'Reporting Services' and hope it does not 'slide' into a discussion about tabs and spaces in Visual Studio (hate) - like my last Pearls posting !!!
The reason this post is placed in the Product section is simply because I have just coded a simple app in X# which has Report files in it, and which were actually made by a C# Wizard. So this to me is a big step forward for X# use.
Once made, the '.RDLC' type files can then be copied from a C# class library and dropped directly into the X# project, where they work a treat - easy almost. The point of doing things this way is because the 'Reporting Wizard' is a template not yet available in X#, but present and working in C#.
I have based the report on an in-memory collection of Person objects, where the Person class is a simple business class of my making. So this approach could be good for DBF guys too, as DBF data can easily be made into .NET Collections of a single Type.
Here below is the 'SE pane' image showing the copied two Report files :-
The only thing that nearly 'got-me' was that the report .RDLC files must be made 'EmbeddedResources' - this is shown in the above image. When made by the Wizard in the 'ClassLibrary' project this embedding is done automatically for us.
Now we can see the report output/display as well as the X# code with required syntax :-
It may be a good idea to show the X# code in a clearer and large format so here it is :-
Note that lines 32 and 33 show how we can get different report 'sets' by applying a LINQ wrapper to the basic report lines. So we can go from DBFs to .NET and then LINQ while using old fashioned (but FREE) Reporting Services technology (which was based in WinForms and similar).
Yes, a lot of technological integration, old and new, all to make our life easier.
Hope this interests a few.
Now over to 'Dick et al' to turn this thread into something quite different :whistle:
Best regards,
Phil.
Wales, UK.