MS Data Report Printing one Record
Hello
I am using Vb6. I am using data report in my program I have it working but when I print it is printing all the records in the database. I am having troubles with it printing a single record. If there is anyone out there that has had this same problem and know how to correct it. I would really appreciate it thank you for your time
Re: MS Data Report Printing one Record
how did you display those records in the report?
i suggest you use ado to display those data and get the data from the database using sql statement
Re: MS Data Report Printing one Record
I am using ado to display for the sql statement SELECT tblAmut.* FROM tblAmut ORDER BY ProductID this is want I have or I am missing a something
thank you for your time
Re: MS Data Report Printing one Record
you should have a where condition in your sql statement so that it will only get a specific record like
SELECT tblAmut.* FROM tblAmut where ProductID = '<ProductIdtobeDisplayed>'
Re: MS Data Report Printing one Record
Thank you for your help I really appreciate you spending the time to help me.
Re: MS Data Report Printing one Record
Hello
when I add the sql statement SELECT tblAmut.* FROM tblAmut where ProductID = '<ProductIdtobeDisplayed>' When I run the program and go to print the record everything shows up blank
Re: MS Data Report Printing one Record
maybe the productid you supplied doensnt exist in the record. make sure it exists or if its a new record, save it before querying it
Re: MS Data Report Printing one Record
I did that and still nothing when I view the data report it shows the header in the report header section but it dont show any of the rptlabels or rpttextboxes in the detail section
Re: MS Data Report Printing one Record
have you set the datafield of the rpttextboxes properly?
Re: MS Data Report Printing one Record
this is what I have for the productid rpttextbox datafield productid, data form general, and data member command 1
Re: MS Data Report Printing one Record
Ok the cmdbutton that would take you to the report screen would I need to add any code into that. this is what i have right now
Load DataReport1
DataReport1.Show vbModal
Re: MS Data Report Printing one Record
Ok this is how i have the sql statement SELECT tblAmut.* FROM tblAmut where ProductID = '1'
when i run the program click the button that takes me to the data report I can see the header that is in the report header section but I cant see any of the rptlabel or rpttextbox's in the detail section. Now if i remove the = '1' i can see everything but i a back to sqaure one printing all the records. thank you for your time