PDA

Click to See Complete Forum and Search --> : Reports using CR9


Simply Me
Jul 13th, 2006, 03:57 AM
I have this code to view my report. Im concerned with the time it takes to load the report when i view it. I have more or less ten pages of report in short bond paper. Is there any solution or alternative to using crystal report?

Private Sub Form_Load()
Call openConnection
Me.Left = 2640
Me.Top = 325

sSQL = "SELECT Code, ProductDescription,Quantity,Reorder FROM Tblstocks"

Set oRsStocks = New ADODB.Recordset
Set oRsStocks = oConn.Execute(sSQL)
Set oApp = New CRAXDRT.Application
Set oReport = oApp.OpenReport(App.Path & "\Inventory.rpt", 1)
oReport.Database.SetDataSource oRsStocks, 3, 1
CRViewer91.ReportSource = oReport
oReport.DiscardSavedData 'to refresh the data
CRViewer91.ViewReport

End Sub

Al42
Jul 13th, 2006, 11:02 AM
Is there any solution or alternative to using crystal report?If you meant "Is there any practical solution or alternative to using crystal report?", it depends on how complex your report is. You can always print line by line with the Printer object.

Simply Me
Jul 13th, 2006, 07:27 PM
If you meant "Is there any practical solution or alternative to using crystal report?", it depends on how complex your report is. You can always print line by line with the Printer object.

I want the user to have a view of what is to be printed before printing. The columns to be printed are Code, Product Description, Quantity, and Reorder. The pages that will be printed mostly like will from 1-15.

I'm already using the printer object except with this problem being posted here.

Simply Me
Jul 13th, 2006, 11:35 PM
bump

Simply Me
Jul 14th, 2006, 02:15 AM
Huh? nothing still

Al42
Jul 14th, 2006, 10:06 AM
You could write your own viewer (there's code for that on various VB sites), but I doubt it would run much faster than Crystal's viewer.

Two things I can suggest:

1) Save the report (in Crystal) without saving the data. Then you don't need oReport.DiscardSavedData. It might make it a little faster.

2) Look into using .ttx files and disconnected recordsets.

Simply Me
Jul 14th, 2006, 07:20 PM
I dont get what you mean in "Save the report without saving the data.

I have no idea yet on using .ttx and disconnected recordsets. Any sample code please?

MartinLiss
Jul 14th, 2006, 09:51 PM
Moved.