I need some help from more experienced people to understand how reporting tools work.

I need some help from more experienced people to understand how reporting tools work.

I downloaded FastReports but I suppose the logic is the same with other tools and I created some reports based on clientdatasets.

Say I have two tables in a database T1 and T2. T1 has a one-to-many relationship with T2.

Based on what I read, I create clientdatasets for T1 and T2, link the datasets together and supply them to the report. All works fine up to this point.

At this stage, I've got two questions:

1. If I now have another table T3 which relates to T2, then I need to supply a new instance of clientdataset for T2 because of the relationship with T3, right? So, I end up with multiple datasets for T2 but with different links

2. I want the user to be able to create their own reports. If (1) is true, this means that I need to provide all the multiple instances available. This means that the user needs to have a significant knowledge of the database. Is this how it works? Shouldn't all the table relationships be formed at the database level?

Thanks

Comments

  1. Bilâl SEZER Yes, Queries is a way to go but still there have to be multiple queries for the tables

    ReplyDelete
  2. John Kouraklis only if your report structer needs another section, where T2 would be unrelated to T1

    ReplyDelete
  3. One gotcha when i moved from Crystal to FastReports was the way FR manages "bands". You can think of a "band" as a component where the simplest one is maybe a "child band" and an more functionally complex one the "master band". FR has "Master" band(s), "Detail" band(s) and "Subdetail" ones. Now i normally supply a report with queries where the master-detail hierarchies are defined by their respective SQL clauses. FR will "simply" print the bands and advance (calling Next). If that affects detail bands query they will print with the correct detail(s) until eof for each one! Complete control. Do check out the demos of FR - there are a lot of them. This way to work is extendable even to subreports. So in CR i had to supply the engine with data, but i supply FR with a "model" - hm nomenclature is not my strongest. For user-editable stuff (i avoid letting my users dabble with banded report definitions though) i supply an empty report with a complete working data model. So, yes, the user would have to "select" a model first. Of course, if i would like to build an IDE-like application i could allow users to edit the model.

    ReplyDelete

Post a Comment