
.gif)
So you need to have unbound controls on the AR at design (no datafield set) and bind those controls via code at runtime after you pass the recordset, but before running/showing the report. Now in your case you are taking this a step further and have a generic report setup that you want to send a dynamic recordset to with a variable number of fields. A decent solution if you have a need to generate the recordset before hand for some reason and just need a quick way to dump it out to paper. So instead of passing a query string and letting AR regenerate it's own recordset or doing a full unbound sample, we shortcut and pass the recordset to the AR engine. not set = nothing), I am not aware of the reason why or why not to disconnect.īascially what you have here is a pre-designed report layout and a recordset that has already been generated. I have run the sample with the Activeconnection still 'on' (i.e. Ok based on what we have so far I think the simplist method to get your report running would be to use something similar to the disconnected recordset example found here, , I have attached a variation that has removed the DataField references in the report and instead placed them in the form's code.

Im getting data from a database say nwind.mdb and the report is to be used to display information about employees, customers and will also be used to show data from a recordset constituting the same number of fields as those of customers which means if i have controls on the report, only the captions and the data they contain changes otherwise create the reports on the fly from a template (not this option) or create a report for each and every type of information i want to print (not recommended). Something else is that the report should not have any code in it so as to ensure that the information is all dynamic. NB: All manupilation of the report should be done from a vb6 form with relevant code. The information provided seems to work with controls being added and positioned but my problem is adding data to the fields(text boxes and labels) at runtime without having to add them i.e the report alredy has controls on it which are already formatted rather positioned on the report and only need data to be added to them or get connected to their respective recordset fields. Thanx for the information already provided.
