Setting the size of a Virtual Dataset at via Code
Gordk,
You have been very helpful in answering my last few questions. I think this is the final question I need answered in order to complete my cross-tab report.
I need to know how to set the Virtual Dataset size at runtime via code, both on the MasterBand and Crossbands. How do I do this?
BTW: Here is my plan for the cross-tab report.
I will open and process my db dataset, do all the grouping and summing etc., storing the results in-memory in a specially constructed data structure. Having done this, and then knowing the dimensions in rows and columns, I set the virtual dataset sizes. Each data item calls my in-memory data structure wrt column and row positions.
This should satisfy my application requirements.
You have been very helpful in answering my last few questions. I think this is the final question I need answered in order to complete my cross-tab report.
I need to know how to set the Virtual Dataset size at runtime via code, both on the MasterBand and Crossbands. How do I do this?
BTW: Here is my plan for the cross-tab report.
I will open and process my db dataset, do all the grouping and summing etc., storing the results in-memory in a specially constructed data structure. Having done this, and then knowing the dimensions in rows and columns, I set the virtual dataset sizes. Each data item calls my in-memory data structure wrt column and row positions.
This should satisfy my application requirements.
Comments
I know how to do this: Attach an OnBeforePrint handler to the band object that calls an onuserfunction that supplies the virtual dataset size, like this:
begin
recordCount := getRecordCount(nil,nil,nil)
end
Gordk,
How do I:
(1) Set the Record Count of a Master Data band with a virtual dataset at runtime?
(2) Set the Record Count of a Cross Data band with a virtual dataset for each crossed band at runtime?
masterdata1.datasource:= [variablename]
or from outside
var
b:tfrbandview;
begin
code to loadreport
b:=frreport1.findobject;
b.datasource := inttostr(someint);
code to show report or prepare or whatever
regards