![]() |
Problem In DataReport in Visual Basic 6
Hi,
I am making a clinic Management. I have to generate a report of test to be conducted for a particular patient. Problem I am facing is, I am able to display the tests name and costs, But i want to display Patient Name and Doctor Name only ONCE!! i.e. Code:
Doctor Name Patient Name Test Cost of TestBut it is being displayed as Code:
Doctor Name Patient Name Test Cost of TestAlso I thought of a little cheat way out of this. I thought i'll create a new table of the values required i.e table (doc name, patient name, test name, test cost) in which my first row will have doc name, patient name, null, null and subsequent rows will have null, null, test name(i), test cost(i) So it is expected that the values are inserted like this Code:
DNAME PNAME TESTNAME COSTCode:
DNAME PNAME TESTNAME COSTIf the table is created the first time the values get inserted properly, but if i insert values after deleting all values it goes random... Here's the code... Code:
Private Sub cmdGivePresc_Click() |
Re: Problem In DataReport in Visual Basic 6
Mj: Any specific reason that you want the output this way?
|
Re: Problem In DataReport in Visual Basic 6
Instead of delete from for2mins check if you could use truncate table for2mins
|
Re: Problem In DataReport in Visual Basic 6
Quote:
|
Re: Problem In DataReport in Visual Basic 6
no truncate didn't help....
I found a cheat in it, I added another coloumn id, in which i add 1...2....3...as coloumn number and i use order by id....which sorts the problem out. But this isn't a right way to do it, someone told me to use grouping i tried that but that too didnt help ...I don't want to create another table and all....if thats possible ..? |
Re: Problem In DataReport in Visual Basic 6
group by won't help
I don't think this can be done using sql it should be done after the record is feteched, while adding the output to the report I don't think this should be a problem as long as you are just displaying and not storing them in that way. |
| All times are GMT +5.5. The time now is 03:32. |