VB Crystal Report >> dataset question

by Brad » Tue, 19 Apr 2005 01:45:02 GMT

Whenever I have a report with a dataset with one table, this works fine.
When I have a dataset that has a relation with other tables, I get a login
screen pop up. Is there any way around this?

I am using VB .Net.

Thanks for the information.

Brad




VB Crystal Report >> dataset question

by Gio » Tue, 19 Apr 2005 14:51:34 GMT


Brad ha scritto:
Try this:
dim rpt as new yourReport
With rpt
.Database.Tables(0).SetDataSource(yourDataset.firstTable)
.Database.Tables(1).SetDataSource(yourDataset.secondTable)
etc..
end rpt

gio



Similar Threads

1. Visual Studio 2005 Beta - VB dataset question

Hi all,

I'm not sure if this is the right group, but....

Have just got my Beta Version of VS 2005, and have upgraded a small calendar 
project with the upgrade wizard.

I have realised that referring to data sets is completely different, so 
having changed these over, i am now finding problems on a simple EOF 
statement.

Can anyone help me find a way to check for the end of a recordset?? Before i 
just did MySet.EOF, however things don't seem to be this simple anymore :-)

TIA

Andy

2. basic dataadapter/dataset question - VB.Net

3. .Select function in a dataset question

4. Persisting Dataset question - VB.Net

5. Autonumber in Access / Dataset question..pls help!!!!!!

if I have a simple Access table like so:

Customer = (customerNo , firstName, lastName)

and the customerNo field has autonumbering set (i.e. is the primary key 
value in the table and is a number that increments automatically when a new 
record is added).

When I extract all records using a Dataset object. I want to add return the 
value of the customerNo if I were to add a new record. So if I added a new 
customer to the table I want to return a new customer number.

Do you know to do this >>!!? can the following code be adpated to do this 
!?!??!


    Public Function getData() As DataSet
        Const INT_EMPTY As Integer = 0
        Try
            If mblnIsDatabaseOpen Then
                Dim pstrSQL As String
                If sqltext = "" Then Exit Function
                Dim pobjAdtAdaptor As New OleDbDataAdapter
                Dim pobjdstDataset As New DataSet
                Dim sqlText = "SELECT * FOM CUSTOMER;"
                pobjAdtAdaptor.SelectCommand = New OleDbCommand(sqltext,  
                                                mcnnObjConnection)
                pobjdstDataset.Clear()
                If pobjAdtAdaptor.Fill(pobjdstDataset, "Data") = INT_EMPTY 
Then
                    getData = Nothing
                Else
                    getData = pobjdstDataset.Tables("Data").DataSet
                End If
                pobjAdtAdaptor = Nothing
                pobjdstDataset = Nothing
            Else
                MsgBox("Database not open")
            End If
        Catch ex As Exception
            MsgBox("Could not query the database", MsgBoxStyle.Critical)
            If mblnIsDatabaseOpen Then closeDatabase()
            Exit Function
        End Try
    End Function

6. Dataset question: having issues with specific tables - VB.Net

7. Simple Dataset Question

I know datasets have been beaten to death in here, I have what is hopefully
a simple question about the integrity of a dataset when used in an
application.

Scenario:
User A and User B are updating data in a SQL database via an application
that utilizes a dataset, dataadapter and datagrid.

User A retrieves data from data source and sits on the data for some time
User B retrieves SAME data from source, changes data via teh datagrid and
updates the data source using the dataadpter
User A makes changes to the data using the datagrid and then attempts to
update the data source

How smart is the dataset/dataadapter to know that the data was changed by
User B since the last time User A retrieved the data?  Will User B's changes
be overwritten by User A's changes?

If so, how does one prevent this or how can the developer notify User A that
the data is no longer accurate based on what they saw in the datagrid?

TIA!
-Rich


8. filter dataset question - VB.Net