|
-
Jul 13th, 2006, 03:57 AM
#1
Thread Starter
PowerPoster
Reports using CR9
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?
VB Code:
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
Last edited by Simply Me; Jul 13th, 2006 at 04:01 AM.
-
Jul 13th, 2006, 11:02 AM
#2
Re: Reports using CR9
 Originally Posted by Simply Me
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.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Jul 13th, 2006, 07:27 PM
#3
Thread Starter
PowerPoster
Re: Reports using CR9
 Originally Posted by Al42
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.
-
Jul 13th, 2006, 11:35 PM
#4
Thread Starter
PowerPoster
-
Jul 14th, 2006, 02:15 AM
#5
Thread Starter
PowerPoster
-
Jul 14th, 2006, 10:06 AM
#6
Re: Reports using CR9
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.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Jul 14th, 2006, 07:20 PM
#7
Thread Starter
PowerPoster
Re: Reports using CR9
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?
-
Jul 14th, 2006, 09:51 PM
#8
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|