Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Crystal Reports Master Detail Record Problem...any Solution For His Problem?

Hi All,

I'm trying to create a master detail report in CR, but couldn't get it properly. To make things easy to understand, its like that, suppose my first table is master table containing profile info of employees, then I've another table that contains the telephone no.s of the employess and is linked with the master table, now similarly I've another table for e-mails, that is also linked with the master table. Now, what I'm suppose to do is, create a report which print the record of a particular employee with all its information, all his phone nos. & email ids as well.

Now the problem is that, when I show the report it shows the record from the master table properly and the records from the telephone no. tables as well (I'm using group here, by grouping the records of the telephone no table). Now comes the main problem, the records from the the 3rd table, like emails don't get displayed properly, it appears that they r related to telephones, but they r related to profile table.

Its like one master & 2 detail tables. Does anyone have any idea how to that with crystal reports 9 or any other version.

Any help in this matter will be highly appriciated and thanx in advance.

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Datareport Master/detail Solution? {Solved It!}
Hi - OK, it vas the f... manual!

Sub-commands of course - that vas the trick!


Hi, after strugglig for to long with Crystal Reports 8.5 and depoyment issues I'm testing the DataReport that ships with VB6.

I need to create a report with a master/detail setup:

I have a batch of products where the batch will be detailed first in the report. Then all batch items will be listet in the detail part of the report.

In CR8.5 I had 1 single view as a datasource, but I'm not sure if DataReport can handle master/detail information?

How can I place a datafield in the Report Header for instance?


Edited by - bentl on 6/16/2004 7:33:36 AM

Master-Detail Record
Hello Vb experts,

I have SQL server. I have defined the ADO1 as Master Record & ADO2 as
Detail record. Please let me know how I can Bound the filed "CUNO".

A quick help is appreciated very much.


Master-detail Delete Record
Hello people

Question is:
What is the best way to code the delete function in a way to delete the related detail records first and then delete the master record?

I have a pretty little form with which shows records from 2 tables in MS ACCESS in master detail fashion (Master table -STUDENTS- is related to details -COURSES- as it is customary in ACEESS relationships).
On that form, I have a set of buttons which navigate and manipulate the records in master (MOVENEXT,MOVEPREVIOUS, NEW, DELETE,...).
Problem is in deleting a master record!

Question is:
What is the best way to code the delete function in a way to delete the related detail records first and then delete the master record?

Thanks a bunch

Adding Record In Master Detail Form
Whenever I try to save a record in Master Table it gives me this error message:

(You cannot add or change a record because a related record is required in table 'TableName'.)

Why I am getting this error? I am able to insert the records in database without using forms. The structure of the tables are like:

Master = RecNo(PK), FormID, Description, Qty, Unit, Rate, Amount
Detail = RecID(PK), MaterialID, Material, Qty, Unit, Rate, Amount

RecNo in Master and MaterialID in Detail have One-to-Many relationship.

The code which I am using for adding a record is:

VB Code:
Dim con As ADODB.ConnectionDim rst As ADODB.Recordset Set con = New ADODB.ConnectionWith con    .Provider = "Microsoft.Jet.OLEDB.4.0"    .ConnectionString = "Data Source=" & App.Path & "Database.mdb;Persist Security Info=False"    .OpenEnd With     Set rst = New ADODB.Recordset    With rst        .ActiveConnection = con        .CursorType = adOpenDynamic        .LockType = adLockOptimistic        .Open ("SELECT * FROM Master where FormID = " & frmFormList.ListView1.SelectedItem)    End With         With rst            .AddNew            !Description = Me.txtDescription.Text            !Qty = Me.txtQty.Text            !Unit = Me.txtUnit.Text            !Rate = Me.txtRate.Text            !Amount = Me.txtAmount.Text            .Update        End With        MsgBox ("The new record is added to the database!"), vbOKOnly + vbInformation, "Added"

Can anyone help me that why I am not able to add a record in Master Table. The database is attached....

Thanks in advance.

Adding A Record In Master Detail Relationship

I want to use a master child relation ship . I m using ADO coding for this and my all text boxex are data bound . But when i start to enter a child record i gives me the error

"Multiple Step opertaion generated errors . Check each status value. " can n e body tell me how and what is teh best way to display and add a record in a master child relation ,preferabbly in ADO Coding..

I willl be very great ful.
Thanks in Advance

Master/Detail/Detail ADO Query Displayed In Grid.
Is there a way to write a single query that will select master/detail records as well as populate a combobox in a grid from any related tables?

I have a photography database. The rolls of film table is the Master, the photography table has the details, but several of the fields in the photography table are indexes to related tables (lens, flash, filters, etc).

I know how to do this if I just display one photo record at a time, but I want to have all the child records in a grid.

Creating A DETAIL In Crystal Reports
I have an Access 2000 database that is used to populate a Crystal Report. I am using a SQL statement that queries the correct data from the main table, but I would like to include some data from other tables that are included within my Access 2000 database by relationships.

For instance, in Access reports, I can make a Header Section that includes the data from the main table, then I can include related data from other tables by means of a detail... ie I can show account information, then detail such info as payments history from a related payments table.




Bottom line, is I have a crystal report that is functioning correctly with data from one table. The data designer is too slow and cannot do columns, so crystal reports is a must. How can I include a undefined amount of records from a table that is related (via SQL or something)?

Two Detail Sections In Crystal Reports?
I am using crystal reports in an application. I am supposed to show the data on the report in such a way a part of the data will be displayed (i.e. any no. of rows) after which a heading will be displayed and the data follows.
just an attempt to demonstrate the report will look as shown below. The data in the first table is different from the data of second table and same for the table headings.

| col1 | col 2 | col3 | col 4 |
| data | data | data | data |
| data | data | data | data |
| data | data | data | data |
| data | data | data | data |
| head1 | head2 | head3 | head4 |
| data | data | data | data |
| data | data | data | data |
| data | data | data | data |
| data | data | data | data |



....... (DETAILS)


....... (DETAILS)


Crystal Reports - I Need Totals In My Detail Section
email me
I am trying to create a somewhat complicated report in Crystal Reports. I have several levels of grouping. Once the report is sorted and grouped the way I need it to be, I need totals of the detail information. However, I need these totals to appear side by side. I had orignally thought of using a cross-tab, but can't because if there are more records than what can fit across the page, the cross tab does not wrap and ends up printing on a blank page. (My user will not accept totals running up and down on the page, must be side to side). Therefore I moved into using multiple columns. However this is only available in the details section. Since this is the case, I can't get the totals of the detail records, I can only get the detail themselves.

Any suggestions would be GREATLY appreciated. If you don't have any ideas on how to fix it, and suggestions on where I could look would be appreciated as well.


Number Of Rows To Set In Detail Section Of Crystal Reports

In Crystal Reports, in detail section, I would like to set the number of records as 10. Whether the records are less than 10, I have to maintain the space of 10 records in detail section. Kindly guide me what to do for this option.

Crystal Reports Solution! And Question
VB6, Crystal Reports 7, MS SQL Server 200 SP3

DSN "taik" connected to a database in the server

stored procedure "sp_employees" with 2 input parameters "@startID', "@endID"

text box control "txtStartID", "txtEndID" on a VB form

Question: How do I pass those two parameters to crystal report with codes? The following codes works O.K. but end up with asking manual input of the parameters.

Dim cn As New Adodb.Connection
Dim rs As New Adodb.Recordset
Dim cmd As New Adodb.Command

If cn.State = adClose Then
cn.Open "DSN=taik"
End If

rs.ActiveConnection = cn
rs.CursorType = adOpenStatic
rs.LockType = adLockBatchOptimistic
rs.CursorLocation = adUseClient

Dim intStartID As Integer
Dim intEndID As Integer
intStartID = txtStartID.Text
intEndID = txtEndID.Text

If rs.State = adClose Then
rs.Open "sp_employees " & intStartID & ", " & intEndID
End If

rs.ActiveConnection = Nothing

Dim crystal As New CRAXDRt.Application
Dim Report As CRAXDRt.Report

Set Report = crystal.OpenReport(App.Path & "CRreport.rpt")
Report.Database.SetDataSource rs
frmCR1.CRViewer1.ReportSource = Report

Set rs = Nothing
Set cn = Nothing
Set crystal = Nothing
Set Report = Nothing
I tried to start with

Dim prmStartID As CRAXDRT.ParameterFieldDefinition
Report.ParameterFields("prmStartID") = "@startID"

But this generate "Type mismatch" error.


Is There Any Solution To This Problem In Crystal Reports?
Dear All,

I'm trying to create a report in Crystal Reports 9. The report is a little complex, including many tables. I'm having the problem to interlink multiple tables data in the report.

Like to accomodate a master table with multiple detail tables, I've used sub-reports, but now the situation is like that, I've have master table, which have a detail table, and that detail table in trun is a master table for another detail table. Its like that...

[Original Master Table] ---> [Detail Table (Alost Master for other table)] ---> [Master/Detail Table] --> [Last Detail Table]

Now, the problem is, how to manage all this data, like I don't think that sub-reports inside subreports are allowed (I tried, but failed), beside that. Is there any solution to this kind of problem.

Any help will be highly appriciated and thanx in advace.



To Thinker/all Members: A Crystal Reports Solution
To Thinker/all other posters/members:

I posted earlier in the week about a "physical database error" I was getting with my integrated Crystal Reports in VB 6.0. I could get the VB application to connect via the ODBC and ADO, but I could not get my Crystal Reports to open, I continueously got the "physical database not found error". Here is a solution for all of you to use if Crystal is giving you problems. Thinker requested a post a solution if I found one:

-Remember to load your appropriate MDAC files in order to get your VB exe to work on the workstation.

-In a standard "Package and Deployment" setup.exe or INNO setup.exe you DO NOT get the necessary .dlls to run your Crystal report .rpts or .dsns. For an ODBC/ADO connection, include within your setup.exe two Crystal .dlls: P2smon.dll and P2sodbc.dll. For an OLE connection, you only need the P2smon.dll.

-Once you add these two files to your package and delievery option, install the .exe on the CPU. The crystal reports should run effectively with no errors. This works on NT and 2000. Let me know if you have any questions about this me, I know Crystal is pain. Everyone has helped me, so I wanted to return the favor.

PS - - you can find these two dlls in the C:/Program Files/Seagate folder. These are included when you install Crystal on the host or development CPU. You also can download these exes off the Crystal Decisions website(I believe). Regards


Solution Required To Fix Error In Crystal Reports
error 20545 'Request cancelled by the user.'
I get the above error message when trying to print a report. The rest of the reports in the procedure (about 8) are printed properly.
This is the code. Opstats is a view with a join query in it.

.SQLQuery = "SELECT * From OpStats Where StartDate = '" & strDate & "'' order by Name"
.ReportFileName = "I:NovusReportsopstats.rpt"
.PrintFileName = "I:NovusReportsEOD Reprint Reports opstats.rpt"
.destination = crpttoprinter
.action = 1

I am using ADO 2.5 and data shaping to create a master/detail form. Everything works fine except... When I move my parent recordset, my child recordsets update to sync with the new parent record. This is fine and works good but if I edit/add a new child record and there is an error with the child record, my parent recordset will move but leave my child recordset at the old parent record and give me a validation error? I can't figure out how to stop my parent recordset from moving if there is an error with a child update. It seems that the parent always moves first then the children? How do you all handle this?

Master Detail
I have two table in access master and tran(datagrid) Could anyone tell me how to make master detail by using adodc 6.wht is the way of making master detail besides datashape


Master Detail Help
m creating invoice software . Let me explain what is exact way m using.
e.g. Master Table structure
MId ClientId Mno Mdate Amount

One datacombo for clients name and no with record set.
one record set bounded to textboxs of master table.

Detail table structru
ItSrno RefInId ItId Rate qty Unit

as Itid is refrrenced by Item table m firing join qury to get name of item etc. information and store into Flex grid to display with primary key of master RefInId ( MID) .

My problem is that how to track with updation of details table i.e. detail table also effect the stock table to each items.

plz , need proper better guidance . If available ?
Is there any other solutions for same ????????

It May seem Impossible, But Possibly We don't know the way how to reach there ????

Master Detail Detail
Dear Sir!
i have a following sitution and makes me crazy
and i ask you kindly to help me with this one

master has
- detail has
- - detail

2 or more cars has got
1 engine serial number each
1 gearbox serial number each

You enter quantitiy : 2
You enter engine serial number 1: 8512
You enter gearbox serial number 1: 5601

You enter engine serial number 2: 8513
You enter gearbox serial number 2: 5602

In the report (using crytsal report 7) it is supposed To stay like this

code name quantity price total
2091 car bmw 2 50 100
serial number engine: 8512 8513
serial number gearbox: 5601 5602
serial number engine: 8512
serial number gearbox: 5601

serial number engine: 8513
serial number gearbox: 5602

but i can't get any of this.

I hope you can advise me how to solve the problem

Best regards

Validating Master-Detail Changes
I have a master -detail module , where the details are being displayed in a datagrid. While editing the records , I cannot validate the changes made to the Detail part because the edited values are stored into the detail tables(MS ACCESS) as soon as the "current cell" (in the datagrid) changes. Any idea how I can get around this?
Note: I'm using the AdodDB "Shape" command to get the master -detail recordset.

Master Detail Form
Please tell me.

I want to make a master detail form
Which will open blank recordset at first time so that we can add the record to record set.

To (edit or delete) the record retrive the record pressing find button besides editing and deleting the record we can add the record since the record set is open.

I have done it for single record set but i need it for master detail record using ado

Master / Detail Datagrid
I woukd like to know how can I populate a datagrid within the details of a relational database without using data control. I need y to fill the master records into text boxes and and put the detail records into a datagrid in VB code. I am using VB 6.0 and MSAccess database. I do not need that someone write the code for me I just need a little clue to polupate the datagrid, Thank you.

Master/detail Form
I wonder if someone could help. I have created a VB6 Master/detail form that contains data from 2 sources (tblTable1 & tblTable2), however, there is no field that relates the two tables. The actual link is provided from a 3rd table, tblTable3. So the relationship should be as follows:

tbl1_ID1 to tbl2_ID1
tbl2_ID2 to tbl3_ID2

Makes sense(?)

The code I have would work if I could find a way of relating tblTable1 and tblTable2 via tblTable3

Current Code:
Recordset.Open "SHAPE {select * from tblTable1} AS ParentCMD APPEND ({select * from tblTable2} AS ChildCMD RELATE tbl1_ID1 TO tbl2_ID1) AS ChildCMD", db, adOpenStatic, adLockOptimistic

Hope someone can help me with this one

Master Detail Report
I want to display the record of Master and Detail tables together in Visual Basic DataReport. I wrote the sql statement on command button click. But the master record is repeating along with detail record. Can anyone tell me that what is wrong? sql statement or report design and how can I solve this problem?

Now the structure of the report is coming like this:



But I would like to see something like:



The code which I am writing is:

VB Code:
Dim Rs As New ADODB.RecordsetSet Rs = conServer.Execute("SELECT * FROM MASTER, DETAIL WHERE MASTER.RecNo = DETAIL.MaterialID") With DataReport1    .DataMember = vbNullString    Set .DataSource = Rs    .Caption = "DataReport Window"     With .Sections("Section1").Controls        .Item("txtDescription").DataField = Rs.Fields(2).Name        .Item("txtQty").DataField = Rs.Fields(3).Name        .Item("txtUnit").DataField = Rs.Fields(4).Name        .Item("txtRate").DataField = Rs.Fields(5).Name        .Item("txtAmount").DataField = Rs.Fields(6).Name        '.Item("txtMaterial").DataField = Rs.Fields(7).Name    End With    .ShowEnd With

I have tried to give the Master fields in Group Header and Detail in Detail Section then I get this error:

(You cannot add or change a record because a related record is required in table 'TableName')

Please have a look at the design and database of report, it is attached...

Master Detail Module
'm developing an inventory program using VB6 and Access2000. I have some problems creating the invoice module. Currently i'm using a Flex grid to let the user enter the details (i.e. the repeating items in an invoice). But i have difficulty validating the data entered. (for eg. whether he has left any blank lines in between, getting the sum of the "amount" of each item.Editing the invoice after it has been saved,no limits to the number of items the user enters etc...)
Do u have any idea whether i can use any other technique in accepting the invoice details. (i.e other than using a flex grid.) Do u have any such module made ? Would love to have it.

Thanks for ur time

Master Detail Program
Hi All ,

Can someone tell me How to build a "Master-Detail" program ? , I intend to
use Dbgrid to hold the detail information, and textbox for the master.
I'd some problem if using datacontrol that bound to dbgrid (to validate the
entered data , but its OK just to display the data that was already
entered ), if not using Datacontrol how should I do ? ( If i should make a
temporary table please tell how to do that ).



Master/Detail Forms In VB6
I am trying to make a master/detail form in vb6, but whe navigating through my master records, i am noticing that th same details are reflected in my detail grid. I also only hav one control to navigate with.

The second question i have is how do I create reports in vb6? can't find the report wizard anywhere!

And the last problem I'm having is with check boxes. In my Acces database, I have a field that needs a check box in my v program. But when i insert a record into the database in Acces with this field (deposit) = "yes", the same record isn' reflected in VB's check box. Does that make any sense? What i wrong?

Thank you


Master Detail Form
Hello Friends,

How to develop a master-detail form in VB,suppose i've
have two tables and their primary key is proc_id.My backend is
oracle 8i.Please suggest or send the code.

Thanks in advance.


Master Detail Form
Hi Friends,

Any one has developed Master/detail form in VB,Pl. can u
share the code.


Master Detail Form
Hi All,
Im a new user of this site. Im facing a small problem while developing a form. Actually, I want to make a master detailed form for Supply Prosess.
How can i make a sub form for supply detail within the supply master form.
Currently im using DataGrid for supply detail section, but its not working as per require ment or its not userfriendly.
On the other hand, how can i user the ActiveX control called "Data Reapeter".
Can any one of u please help me out.
You can also contact me through : email@removed

Thankx 'n' Regards,

Koushik C.
InfoTech Enterprises,
MIS Analyst,
Noida, India,

Master/Detail Datagrid

I'm new to VB and have just used the Data Form Wizard to create a Master/Detail view of my Access DB.

Using the wizard I choose to include a button to add new records, however this only seems to allow records to be add to the master datagrid and not the detail/child datagrid.

I could not even click on the detail datagrid but I added the line grdDataGrid.AllowAddNew in the cmdAdd_click()procedure. As a result I can now click on the datagrid and select a field but I'm not allowed to enter any data into it. I think this has something to do with the AddNewMode property which returns 0, however I don't know how to alter this setting (assuming that is my problem).

Can anyone help ?


Master Detail Form
i can code a master detail form departing from a datacombo and then see the details in a datagrid, using the datacombo.boundtext; what i dont know how to do is a master detail form departing from a datagrid: how do i get the bound info to put into the dynamic sql?

Master/detail Form
I wonder if someone could help.  I have created a VB6 Master/detail form that contains data from 2 sources (tblTable1 & tblTable2), however, there is no field that relates the two tables.  The actual link is provided from a 3rd table, tblTable3.  So the relationship should be as follows:

tbl1_ID1 to tbl2_ID1
tbl2_ID2 to tbl3_ID2

Makes sense(?)

The code I have would work if I could find a way of relating tblTable1 and tblTable2 via tblTable3

Current Code:
Recordset.Open "SHAPE {select * from tblTable1} AS ParentCMD APPEND ({select * from tblTable2} AS ChildCMD RELATE tbl1_ID1 TO tbl2_ID1) AS ChildCMD", db, adOpenStatic, adLockOptimistic

Hope someone can help me with this one

How To: Get The Master/detail Subtotal

Master table fields:
RefID  RefType  RefNum  RefDate  Branch_Code, Particulars

Detail table fields:
RefID  EmpID  ReasonCode  Debit  Credit

In my report (using DED/DRD), i want to achieve the format like:
RefDate   RefType   RefNum   Amount

Where Amount is the total amount computed from the Detail table.

How do i build my SQL statement in my command object?

Master/detail Report
hi, I'm trying to create a master / detail report. SHOULD not be to complicated, but it is...

I use DataEnvironment and DataReport, create a hierarcical dataset with my cmdMaster and the underlying cmdDetail oand a appropriate relationship.

Then, In SubMain of the application, I set the connectionproperties for the dataenvironment.

When the report is Initialized - i set the correct CommandText for the master-query and open the recordset...

For the detail-part, i get error messages saying "datafield 'cmdDetail.Myfield' not found"

Any suggestions?

regards, Bent

Master Detail Grid
How To Create Master Detail Grid....!!!?

DataGrid Master/detail
Does anyone know how I can create a DataGrid in VB 6.0 that allows me to show parent rows with a (+) sign if there are associated child records? The user should be able to click the (+) to see the child rows. I have seen apps where a datalist and datagrid were used but I'd rather use one DataGrid. I know you can use DataSet() in the VB.NET but I couldn't use it in VB 6. Any Ideas ????

Master/detail Grid

Could someone help me please?

I try to do form where is two grids (MSHFlexgrid).
I want then to work together so when I click record in first grid another grid shows records related to first grid record.
I have database where is connection between these two tables.
I use ADODB.connection and recordset.
Here's part of my code.
I think this is not even close... Hope someone tell me what is right way to do this.

public Cn as new ADODB.Connection
public Productgroup as new ADODB.Recordset
public Product as new ADODB.Recordset

Cn.ConnectionString = "uid=sa;pwd=;DSN=Empire"

Productgroup.Source = "Select * from Productgroup"
set Productgroup.ActiveConnection = Cn

set MSHFlexGrid1.DataSource = Productgroup

'this should hapen when RowColChange

Product.Source = "Select * from Product where Productgroup_key = " & Productgroup.Fields("Productgroup_key").Value
set Tuote.ActiveConnection = Cn

set MSHFlexGrid2.DataSource = Product



It shows always only first record.

I thoug that grids are one of the most common object in used, but it's really difficult find good instruction from grids.

Best regards

Master Detail Forms
Hi all,

I'm new here. Let me throw a question to all of you : - "what is the best way to implment a master detail form , what all active - x control will be needed ( the best ones) and how to go about the coding. Is there any industry wide standards for master detail forms ???


thankx in advance


Master-Detail Screen In VB
Hi Friends,

I need to create a Master-Detail screen (form) in VB and I need to know which control do I use to display the detailed records.

Here in this screen I should be able to ADD, DELETE, MODIFY and move between the Records.

I know in D2K this is pretty simple and it works perfect.
But I am sure there should be some control in VB and by using this I can design a master-detailed screen.

Friends I am sure many of you would had done many a screens like this, can you please share you experience and help me to solve my problem.

Thanks & Regards

Master/Detail Relationship
Hi All VB Guru's
What is the best solution in VB for writting Master/Detail relationship programs.Presently i am using 3rd party control , but for that huge code i have to write.
In MS-Access or D2k,it itself creates a code.
Anything like that available in VB.
Please let me know.

Master/Detail Sample
I'm looking for a sample of Master/Detail form, which should use 2 separate classes (for example Customer and Order), each of which in turn uses Store Procedures to get data from SQL Server 7. I created a sample, but it works much slower that that which can be created by Data Form Wizard (used 1 class modules). Why do I need to divide class on 2? There is going to be pretty deep structure of relations.
Thank you.

I want to use Master-Detail form in my application.My detail form will have columns (for e.g QTY * PRICE as Extended Price )
which are not database-columns(,instead calculated-column);at the same time i want to enter the records directly in the detail form
displaying multiple records.Is it possible to use datagrid for this purpose?. Or is any other controls or techniques avilabe for the same purpose.
Thank U.

Creating Master Detail Report In VB
Please help me to create master detail report in vb. i am using access as database.

I want the report to be as shown below.


Service_Code Service_Descr Amount Remarks
1 xyz 100
2 kjkj 200
and so on.

I have created a command in the dataenvironment and for that command i have added a child command. but in the report properties, we can assign only one command.. how to assign both command1 and command2 for the report.

Pl help


Viewing Master Detail Records
Hi eveyone,
I have a shape command that returns master detail records. I have 2 datagrids on my form. Datagrid1 is looking at the recordset `adoPrimaryRS`
and datagrid2 is looking at the recordset ` adoPrimaryRS("Child").value.
When I click in datagrid1 all the corresponding details appear in datagrid2.
Ok now for the hard part!. I have 2 textboxes on my form Text1 and Text2.
Text1.Datasource = adoPrimaryRS
Text1.Datafield = "MasterId"
When I scroll through my master records the container field is shown in Text box1 and shows the field name ok.
- Text2.Datasource = adoPrimaryRS("Child").value
Text2.Datafield = "DetailId"

When I run the form and click on a record in my master datagrid the Text1 shows the field name ok, if i scroll through the records the Text1 field also updates. Whay I am findig though is if there are more than 2 detail records, even if I click the relevant records in my detail datagrid2 only the first record from my detail shows in the Text2 field "detail" and this field will not update when I scroll through datagrid2.
This is driving me mad as I am sure there is a very simple explination to my problem.
I would really appreciate some help.
Thanks in advance.

Master && Detail Records In DataReport
How can I display the same Master and Detail records in DataReport, using SQL statement?

As detail recrords can be more than one, so how can I display it on report along with master record?

The result of the code is that the master record is also repeating along with detail records. Database is also attached....

VB Code:
Dim Rs As New ADODB.RecordsetSet Rs = conServer.Execute("SELECT * FROM MASTER, DETAIL WHERE MASTER.RecNo = DETAIL.MaterialID") With DataReport1    .DataMember = vbNullString    Set .DataSource = Rs    .Caption = "DataReport Window"     With .Sections("Section1").Controls        .Item("txtDescription").DataField = Rs.Fields(2).Name        .Item("txtQty").DataField = Rs.Fields(3).Name        .Item("txtUnit").DataField = Rs.Fields(4).Name        .Item("txtRate").DataField = Rs.Fields(5).Name        .Item("txtAmount").DataField = Rs.Fields(6).Name        '.Item("txtMaterial").DataField = Rs.Fields(7).Name    End With    .ShowEnd With


How To Create Master Detail Form
I need any one help in this regard.
i want to create master detail structured data entry form.
for one master entry no.of detail entries.Details entries count are unlimited. it can vary for different master entries.
(in oracle we have tabular type details list in that we can attach LOV also) i wanted to get same type in vb .
please any one help in this regard is it possible to achieve this and how?.
thanks in advance.

Master Detail Page Using Dreamweaver

I have a few questions that I hope someone can answer....

Where I am at:
I created a connection, recordset and master detail page using dreamweaver.
When I go to preview the page, I get an error:
"Data source name not found and no default driver specified"
Which tells me that there is not a DSN on the server. I defined the DSN locally, under System DSN. So, does that mean it is only on my system? Do I have to create the DSN on the server?

Here is the code for where I am getting the error:
<!--#include file="../../Connections/BookConnection.asp" -->
Dim RecordsetBooks
Dim RecordsetBooks_numRows

Set RecordsetBooks = Server.CreateObject("ADODB.Recordset")
RecordsetBooks.ActiveConnection = MM_BookConnection_STRING
RecordsetBooks.Source = "SELECT * FROM Books ORDER BY Title ASC"
RecordsetBooks.CursorType = 0
RecordsetBooks.CursorLocation = 2
RecordsetBooks.LockType = 1

RecordsetBooks_numRows = 0

RecordsetBooks.ActiveConnection = MM_BookConnection_STRING
is giving me the error. I tried to change the ActiveConnection to RecordsetBooks.Connection="Microsoft.Jet.OLEDB.4.0" (location of file - url) but recieved an error.


Can someone help? Do you need more info?

Thanks, Sarah

DataGrid Master/Detail Question
Does anyone know if it's possible to create a DataGrid in VB 6.0 that allows me to show parent rows with a (+) sign if there are associated child records? The user should be able to click the (+) to see the child rows. I have seen apps where a datalist and datagrid were used but I'd rather use one DataGrid. I know you can use DataSet() in VB.NET and I was wondering if you could do it in VB 6 too. Any Ideas ????


Copyright 2005-08, All rights reserved