Click to See Complete Forum and Search --> : Data Report programming!!!


jemis7
February 8th, 2000, 11:43 AM
I would like to know if anyone has ever done a data report from code i.e not using essentially the report designer etc...
This is because I would like to generate my reports as per some conditions entered by the user ,like for e.g a date period ,or a number restriction...how do I do it in code ?
Also, does someone know how to access a report label (rptlabel) in the report ???

Johnny101
February 8th, 2000, 12:26 PM
What I have done in the past is set up the command object in the data environment to accept certain parameters, such as a date range or a specific number value. Then when the user is ready to view the report, pass those values to the command object so the report can display the correct data.

As for accessing a label inside the report, the only i have been able to do it is in the code for the report and by going through the entire object model. ie Report1.Sections(3).controls(2).caption. for me, it was more of a guessing game - which control is control 2?, section 3?

Also, I have only been able to modify the captions of the labels in the initalize event of the report, the activate doesn't seem to do it.

good luck,
John

John Pirkey
MCSD
www.ShallowWaterSystems.com