ACC: Subreport Based on Table or Query Does Not Show DDE Data

ID: Q95441


The information in this article applies to:


SYMPTOMS

Advanced: Requires expert coding, interoperability, and multiuser skills.

When you view a report in Print Preview or print the report, the result of a dynamic data exchange (DDE) expression in a subreport is not displayed.


CAUSE

If the subreport is based on a table or query, there must be at least one row of data in the underlying table or recordset before the subreport's DDE data will be displayed.


RESOLUTION

There are three possible resolutions:


MORE INFORMATION

Steps to Reproduce Behavior


  1. Start Microsoft Excel and create a new worksheet. Place the text "This is a test" (without the quotation marks) in row 1, column 1. Save this worksheet as Ddetest.xls, and leave this worksheet open.


  2. In Microsoft Access, create the following new table:
    
          Table: Table1
          ---------------
          Field Name: TXT
          Data Type: Text 


  3. Create a new report based on the Table1 table.


  4. Add a text box bound to the TXT field by dragging TXT from the field list to the report.


  5. Add an unbound text box to the report and set the text box's ControlSource property to the following expression:
    
          =DDE("Excel","DDEtest.xls","R1C1") 


  6. Save the report as SubRep, and then view the SubRep report in Print Preview. Note that "This is a test" is displayed correctly.


  7. Close the SubRep report and create a new report. Drag the Subrep report from the Database window to this new report. Save this report as MainRep.


  8. View the MainRep report in Print Preview. Note that "This is a test" is not visible on the report. Close the MainRep report.


  9. Open the Table1 table and add some data to it. View the MainRep report in Print Preview. Note that "This is a test" is now visible.



Keywords          : kbinterop RptSub 
Version           : 1.0 1.1 2.0 7.0
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: March 19, 1999