Reporting Services working with X# - in-memory object based ...

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
Phil Hepburn
Posts: 743
Joined: Sun Sep 11, 2016 2:16 pm

Reporting Services working with X# - in-memory object based ...

Post by Phil Hepburn »

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 :-
XS_forumRSworkOK_02.jpg
XS_forumRSworkOK_02.jpg (76.64 KiB) Viewed 132 times
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 :-
XS_forumRSworkOK_01.jpg
XS_forumRSworkOK_01.jpg (108.29 KiB) Viewed 132 times
It may be a good idea to show the X# code in a clearer and large format so here it is :-
XS_forumRSworkOK_03.jpg
XS_forumRSworkOK_03.jpg (98.67 KiB) Viewed 132 times
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: :kiss:

Best regards,
Phil.
Wales, UK.
User avatar
Phil Hepburn
Posts: 743
Joined: Sun Sep 11, 2016 2:16 pm

Reporting Services working with X# - in-memory object based ...

Post by Phil Hepburn »

Hi guys,

Just an update on my previous 'working' post.

Here is the sort of thing we can get displayed using the free Reporting Services 'old' technology built into Visual Studio from Microsoft.
XS_forumRSworkOK_04.jpg
XS_forumRSworkOK_04.jpg (62.37 KiB) Viewed 132 times
Okay, I know, I have summed up peoples ages - BUT - when we have limited data we must then make the most of it in our exercise in 'Exploration' of what can be achieved.

Here we are grouped on City. And the City parts are collapsible / expandable.
XS_forumRSworkOK_05.jpg
XS_forumRSworkOK_05.jpg (47.09 KiB) Viewed 132 times
Time for viewing some sport I feel.

Cheers,
Phil.
Post Reply