What approach to generate the datasource for reporting

Posts   
 
    
Ceres
User
Posts: 20
Joined: 31-Jan-2007
# Posted on: 12-May-2008 10:33:03   

Hi,

I'm looking for advice on the approach that I should use to source data for a comprehensive report created via Adapter and DevExpress.

The main table has many relations, some with lookup tables or with link tables. So table Country has FKs to Region and other lookups and table CountryOrganisation links countries to organisations. There are many, many of these.

In the non LLBLGen world its really straightforward to create the query with the necessary joins to retrieve names of related FK items for the datasource of my report. How would one do this in LLBLGen?

I'm using Adapter 2.5, SQL Server 2005 to create a WinForm app with VB.

Really could do with your advice urgently. smile

Walaa avatar
Walaa
Support Team
Posts: 14994
Joined: 21-Aug-2005
# Posted on: 12-May-2008 11:23:43   

Well if you want a flat result set of fields from more than one table/entity for reporting (read-only). Then you should use a TypedList (created in the LLBLGen Pro Designer) or a DynamicList (Created in code).

Please check the LLBLGen Pro manual's section "Using the generated code -> Adapter/SelfServicing -> Using the TypedViews, TypedLists and Dynamic Lists"

Ceres
User
Posts: 20
Joined: 31-Jan-2007
# Posted on: 12-May-2008 17:38:38   

Yes, a flat set of read-only fields would do, so TypedList or DynamicList it is.

but ..

As I'm reporting what is in a data entry form which is still visible on screen, how can I source the data for the TypedList/DynamicList from the same BindingSource as used by the form. not the db?

The reason is that I want to report whats shown in the form, not whats in the database, because that could be different, so no db fetch.

Hope I'm explaining myself simple_smile

Thanks

Posts: 1263
Joined: 10-Mar-2006
# Posted on: 12-May-2008 20:02:58   

Above, you talk about the 'non llblgen world' and linking foreign keys and such - then you reference using on-screen data. How would you achieve what you are looking for 'easily in non-llblgen world'?

If you want to report on what is on the screen - and you want to report what is in the database - you could still use the typedlist. Just before you run the report add some row(s) to the typed list to show what is 'on screen' before you run it....

Ceres
User
Posts: 20
Joined: 31-Jan-2007
# Posted on: 12-May-2008 20:50:35   

WayneBrantley wrote:

Above, you talk about the 'non llblgen world' and linking foreign keys and such - then you reference using on-screen data. How would you achieve what you are looking for 'easily in non-llblgen world'?

Touche - shows how confused my thinking is ...

If you want to report on what is on the screen - and you want to report what is in the database - you could still use the typedlist. Just before you run the report add some row(s) to the typed list to show what is 'on screen' before you run it....

I only want to report whats on the screen and because we're talking 50+ fields on many tabs of a form, I'm wondering :-

  1. Whether one can populate a DynamicList to be used by the report from the BindingSource of the form?

  2. If I can't then is there any alternative to populating the report controls 'a statement at a time'? It would be nice to just point the BindingSource of the form to the report and set the report controls at design time?

Reason I'm trying to find a smarter solution is that there are 4 of these multi-tabbed forms and I'm begining to appreciate that there may be no smart way. Ohh tedium cry

Thanks for any other ideas!

Posts: 1263
Joined: 10-Mar-2006
# Posted on: 12-May-2008 22:14:14   

Why can you not use the binding source of the forms for the XtraReport?