1
votes

I have two reports I'm redoing. The first has basic info, and the second has the exact same thing plus some more information.

Both are made using FastReport and master/detail with TSqlQuery and TClientDataset.

The first has 3 details and the second has 5.

Is there a way to make only one report document and disable the details dynamically?

Obs: I can't load the TClientDataset and then hide the elements on the first report because the query takes a long time to run: about 30 seconds to load the first report and about 10 minutes for the second one.

1
Have you tris disabling the TDataSources which connect the Master to the Details? - MartynA
@MartynA there is only one TDataSouce for all the 5 TSqlQuery, if I disable it all go down. - Lucas Steffen
Unles I can make multiple TDataSource, dang, that may do it. Thanks - Lucas Steffen
In case you are not aware, there is no restriction on the number of datasources that can connect to a Master dataset. - MartynA
@MartynA happiness was short lived, it didn't work. It is automatically reactivated or is not the option that does the trick. - Lucas Steffen

1 Answers

0
votes

Thank you @MartynA for the help.

I manage to do it but it took more work than I think it should.

  1. Clear the DataSource property on your TSqlQuery;
  2. Clear the DataSetField property on your TClientDataSet (detail);
  3. Remove the field used on DataSetField from your TClientDataSet (master);
  4. And if you're using FastReport, the ClientDataSet must be active so you use the method CreateDataSet.