Why data report don't refresh the data

Why data report don't refresh the data

Post by Gustav » Sat, 20 Oct 2001 04:27:24

Hi, I have a report made with the data report, when I run
the application the report is ok but when I change the
parameters without stoping the program the report appear with the first
If I stop the program and run it again with the second
parameters the report go ok.
What I have to do?

Why data report don't refresh the data

Post by chri » Wed, 24 Oct 2001 17:10:05

Hi Gustavo,

First, after you change the parameter, the changes are not applied. You
need to:
1. Update the datasource so that the data is updated using the new
2. Recreate the Data Report to display the new data.

In the following example, the data report is based on a data environment,
which has a command object based on a parameter query of a database. When
the program is running, I change the parameter and update the
dataenvironment and then recreate the data report:

Note: txtParameter is a textbox used to change the parameter.
           cmdRunQuery is a button that I click after specifying a new
parameter in the above textbox.
           GetAnAuthor is a command object under the DataeEnvironment1

Private Sub cmdRunQuery_Click()
With DataEnvironment1
    If .rsGetAnAuthor.State = adStateOpen Then
    End If
    .GetAnAuthor txtParameter.Text    'This line refreshes the
DataEnvironment using the text in the textbox txtParameter.
    If .rsGetAnAuthor.RecordCount > 0 Then
        MsgBox "Found " & .rsGetAnAuthor.Fields("Au_LName").Value
        MsgBox "No author found"
    End If
End With
DataReport1.Show   'This line recreates the DataReport.
End Sub

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. Copy right, 2001 Microsoft Corporation.
All rights reserved.

Microsoft Support


1. why the identity values don't enter while importing data from Excel

I am trying to import an Excel file filled with data to a
table in SQL Server. The 1st column of my table in the DB
is an identity, so I don't include this column in my Excel
file and assume that when the import happens, it will
trigger the addition of the idetity values and insert the
right values automatically, like what happens when we
use "insert" statement manually. But it does not work this
way! The import utility is smart enough to figure out the
one-to-one mapping for all columns, and "ignore" the first
column. But when the import starts, it fails and complains
the 1st column in the db can't be inserted NULL.

HOw can I work around this?

Thank you in advance.

2. Unable to browse the cube 'Sales'. Unspecified error

3. Data Report async show don't know how

4. Indexing Memo Fields

5. why i can browse cube's data and dimension's data

6. Are WebDB 3.0 and OAS 4.x integrated together?

7. Crystal Reports won't Refresh data each opening

8. criticel error with service pack 5a

9. How to refresh data on a VB 6.0 Data Report

10. Data Report Refresh (not refreshing)

11. Why doesn't refresh always refresh?


13. How to AUTO refresh OLAP CUBE data after DATA WAREHOUSE data is changed