Export to .rdf problem


07-16-2003, 12:00 AM
Originally Posted By: R. Gibson<rgibson@summitimaging.net>

I am trying to save an active report as a .rdf file.
When i create the report and the save it, the .rdf has a file size of 30kb
and is empty.
But when I put the report in a activereport viewer control it will save the
.rdf correctly. What am I doing wrong????

My code for creating and saving the file

Private Sub Command1_Click()
ActiveReport1.Run True
ActiveReport1.Pages.Save FilePath & ".rdf"
end sub

--

Thank You,

Reed Gibson



Re: Export to .rdf problem


07-30-2003, 12:00 AM
Originally Posted By: Jennifer-DD<activebar.support@datadynamics.com>

Hi,

The problem is the code is moving on to your save code before the report is
finished running. By setting the Run to False instead of True it will stop
the code until the report is finished so that the pages and all are finished
before it attempts to save it. Please try like the following code instead:

Private Sub Command1_Click()
ActiveReport1.Run False
ActiveReport1.Pages.Save "C:\my2.rdf"
End Sub

I apologize for the wait on a reply.

"R. Gibson" wrote in message
news:MRvusX8SDHA.1508@dynaweb.datadynamics.com...
> I am trying to save an active report as a .rdf file.
> When i create the report and the save it, the .rdf has a file size of 30kb
> and is empty.
> But when I put the report in a activereport viewer control it will save
the
> .rdf correctly. What am I doing wrong????
>
> My code for creating and saving the file
>
> Private Sub Command1_Click()
> ActiveReport1.Run True
> ActiveReport1.Pages.Save FilePath & ".rdf"
> end sub
>
> --
>
> Thank You,
>
> Reed Gibson
>
>
>