Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A small Data Report prob.

Status
Not open for further replies.

goatsaregreat

Programmer
Mar 21, 2001
82
GB
Is there any way to manually insert data into a Report's label? There is not a function for the procedure I need, so I want to code it on a main form, and send the value to the Data Report. Any help would be appreciated. TIA for your speedy answers.
 
hi..

as much i know... u can only rename a label at run time which are already listed in the list box....

like report title, date etc... and nothing more than that...
coz ive spend around 1 month on data reprots for finding an alternative for this.....

bye.. Good Luck
Varnit
 
Thanks, I guess I could write the data that I want shown to a table in the DB, and access it that way.
 
this is what you are looking for

datareport.section("section_name").controls("label_name").caption = "data you want to put in"

voila, this realy works

greetings

mim
 
Hey VBmim,
Thanks, but I can't seem to get that to work. I works OK up to the .caption part. Where ever I put that, I get an error message, and there is no drop down list like there usually is for the commands that are being recognized. The .section and .control part are in a drop-down, but there is no drop-down for the .caption. I am trying to get a label on this Data Report that uses the caption of a label on one of my main forms. Any further help is apprectiated. :)
 
oopsy, my mistake

it should be:
datareport.sections("section_name").controls("label_name").caption = "data you want to put in"

it is true you don't see the caption property is not in a drop-down list, but this should work

greetings

Mim


 
Thanks for your help. I get no error message now, but there are no results. :-( Nothing seems to happen. I put a break point in the code on that line, and when you hover the mouse over it, there is no info shown to be entering the label. Once again, I've tried everything logical. Sorry to be a bother.
 
Here's my problem... I must make a purchase order on a report and I am not able to do what I want with Data Report. Is there another report generator in Visual BASIC 6 like Access? Thank you in advance.
 
to goatsaregreat:
why don't you post the code, so I can see what is going wrong here...
I used the same code in my projects several times and it still works...
the code must also be put before the report is shown or print...

to joxter:
you could try crystal reports, but I can't help you further with that

greetings

Mim
 
Sorry. My fault. I tried once more, and took out the datareport.refresh that I had BEFORE your code, and it works perfectly. Thanks a million.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top