Access 12 beta1 and 2007 Final

Not that I've followed the thread closely, but have you tried the (hidden) methods SaveAsText/LoadFromText?

In a copy of the db

SaveAsText acReport, "NameOfReport", "c:\rpt.txt"
LoadFromText acReport, "NameOfReport", "c:\rpt.txt"

Where should I do this exacly? I tried the External Data -> Export Text File, selected UTF-8, then tried to Import it and got error:Invalid procedure call or argument.
 
In code. Either in a sub, then run it, or just use the immediate pane (ctrl+g), and hit enter first while the cursor is within the first line, to dump the report to a text file, then on the next line, to load it into the project again. Remember to substitute with the name of your report.
 
In code. Either in a sub, then run it, or just use the immediate pane (ctrl+g), and hit enter first while the cursor is within the first line, to dump the report to a text file, then on the next line, to load it into the project again. Remember to substitute with the name of your report.

OK,I did like you said.

First I opened same database in 2007 final and in 2007 beta1 in 2 separate virtual computers. Then I created simple report from 1 table in the database.
I set up the wizard options the same in both cases.

Exported same table from the database then compared it with file comparision software side by side. There are some major differences. Some code is missing from beta 1 version - there are empty lines where there is code in final version.

If you import it back it does not fix the problem, the reports work like they should only with access verion under they were originaly created :(

Can anyone with knowledge of access code help me, perhaps there is some variable incorrect or missing?

I attach both files here:

faktura2007final.txt - Final access 2007
faktura2007beta1.txt - beta 1 2007
 

Attachments

Interesting.

I don't know what to say. Perhaps you can tweak it by creating a new report with a bit of automation? Just to demonstrate, here's a short snippet creating all the controls from the detail section of report A in report b's detail section, bringing a couple of properties with them.
Code:
Sub TestRptChanges()

    Dim a                   As Access.Report
    Dim ctl                 As Access.Control
    Dim ctlNew              As Access.Control
    
    DoCmd.OpenReport "a", acViewDesign
    Set a = Reports("a")
    
    DoCmd.OpenReport "b", acViewDesign
    
    For Each ctl In a.Section(acDetail).Controls
        Set ctlNew = CreateReportControl("b", ctl.ControlType, _
            acDetail, , , ctl.Left, ctl.Top, ctl.Width, ctl.Height)
        With ctlNew
            .Visible = ctl.Visible
            Select Case ctl.ControlType
                Case acTextBox
                    .ControlSource = ctl.ControlSource
                    .BackColor = ctl.BackColor
                    .BackStyle = ctl.BackStyle
                    .FontBold = ctl.FontBold
                    .FontItalic = ctl.FontItalic
                    .FontName = ctl.FontName
                    .FontSize = ctl.FontSize
                    .ForeColor = ctl.ForeColor
                    .Format = ctl.Format
                Case acCheckBox
                    .ControlSource = ctl.ControlSource
                Case acLabel
                    .Caption = ctl.Caption
                    .BackColor = ctl.BackColor
                    .BackStyle = ctl.BackStyle
                    .FontBold = ctl.FontBold
                    .FontItalic = ctl.FontItalic
                    .FontName = ctl.FontName
                    .FontSize = ctl.FontSize
                    .ForeColor = ctl.ForeColor
            End Select
        End With
    Next ctl
    DoCmd.Restore
    DoCmd.Close acReport, "a"
    DoCmd.Close acReport, "b", acSaveYes
End Sub
Try it out, check if it works, and if so, determine if it's worthwhile vs manually creating the reports, build it to transfer all relevant properties for all relevant controls, and all relevant sections).
 

Users who are viewing this thread

Back
Top Bottom