PDA

Click to See Complete Forum and Search --> : display report to windows using vb


linda117
Jun 24th, 1999, 12:41 PM
to anybody...

i would like to know... how can i display report form ms Access using vb?

bashfirst
Jun 24th, 1999, 03:25 PM
To display an Access report from a VB executable, you will have to use automation and instantiate Access. Then you would use the DoCmd.OpenReport "report name" method call. There was an article about doing this in VB Programmers Journal a while back. If you go to their site you can search for it.

bash

Big Dog
Jun 24th, 1999, 09:57 PM
I had a pretty good experience with VS Reports. The idea was pretty simple. Create your report in Access. After that you run the VSReports migration utility on it and it creates a seperate file for that report with the SQL Statement and other needed info. Included with the package was a control that helped you create your own viewing form...

BD

Spawny
Jun 25th, 1999, 05:07 PM
Well you could use Crystal reports in vb5. You create the report how you would like to see it protrayed on the screen first then you would save it. Then in Vb you would goto the components in projects menu and click on 'Crystal Report Control 4.6' and apply that. Then you just add the crystal report property (here i have called it RptReport)anywhere on your form and under where ever you want it to pop up you put code to this effect in:

RptReport.WindowState = crptMaximized
RptReport.ReportFileName = App.Path & "\NameofReport.rpt"
RptReport.DataFiles(0) = pDatabase.Name
RptReport.Destination = crptToWindow
RptReport.Action = 1

I hope this has helped you


[This message has been edited by Spawny (edited 06-26-1999).]