|
-
Jun 20th, 2005, 04:06 AM
#1
Thread Starter
Addicted Member
simple question
Hi,
I've two doubts:
1) During the creation of the report, i connected my database (which is in the project's bin directory) through the wizard..If my user install the product in "D:\" or different path then how the report get value from my database?? Is there any ways to pass the database path from vb.net??Any idea?
2) I dont know how to dispose a crystal report..
Last edited by haihems; Jun 20th, 2005 at 10:56 PM.
Think Before Ink
Visual Studio .NET 2002/.NET Framework 1.0
-
Jun 20th, 2005, 11:03 PM
#2
Thread Starter
Addicted Member
Re: simple question
Any Help??
Think Before Ink
Visual Studio .NET 2002/.NET Framework 1.0
-
Jun 21st, 2005, 02:08 AM
#3
Re: simple question
1. Do you mean the path to the database? I'm assuming it's an MDB. User Server.MapPath("bin/abc.mdb") to get the path, no matter where it's installed.
-
Jun 21st, 2005, 02:47 AM
#4
Thread Starter
Addicted Member
Re: simple question
ok.thanks mendhak...anyway i'm using "Directory.GetCurrentDirectory" to get the application's path..is it?
And anybody know how to close(dispose) a crystal report?? In my project I'm using as follows:
VB Code:
Private Sub frmReports_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
RptName = Directory.GetCurrentDirectory & "\Reports\pnl.rpt"
Viewer1.ReportSource = RptName
Viewer1.RefreshReport()
End Sub
Private Sub frmReports_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Viewer1.Dispose()
End Sub
But it is not releasing the database object(Excel.EXE)..it still running in the background...I dont know how t get rid of this??
And when I click the First report it takes 30 seconds to load
But the second report takes 50 sec, then
again if i click the first report it takes 1 min & above.. its really confusing me
I'm really tired, bcos of this problem.. can anybody help me on these problems..I'm greatly apreciate the quickest reply...
Think Before Ink
Visual Studio .NET 2002/.NET Framework 1.0
-
Jun 21st, 2005, 02:47 AM
#5
Thread Starter
Addicted Member
Re: simple question
ok.thanks mendhak...anyway i'm using "Directory.GetCurrentDirectory" to get the application's path..is it correct?
And anybody know how to close(dispose) a crystal report?? In my project I'm using as follows:
VB Code:
Private Sub frmReports_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
RptName = Directory.GetCurrentDirectory & "\Reports\pnl.rpt"
Viewer1.ReportSource = RptName
Viewer1.RefreshReport()
End Sub
Private Sub frmReports_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Viewer1.Dispose()
End Sub
But it is not releasing the database object(Excel.EXE)..it still running in the background...I dont know how t get rid of this??
And when I click the First report it takes 30 seconds to load
But the second report takes 50 sec, then
again if i click the first report it takes 1 min & above.. its really confusing me
I'm really tired, bcos of this problem.. can anybody help me on these problems..I'm greatly apreciate the quickest reply...
Think Before Ink
Visual Studio .NET 2002/.NET Framework 1.0
-
Jun 21st, 2005, 02:49 AM
#6
Thread Starter
Addicted Member
Re: simple question
sorry... i posted the same twice...
Think Before Ink
Visual Studio .NET 2002/.NET Framework 1.0
-
Jun 21st, 2005, 03:32 AM
#7
Thread Starter
Addicted Member
Re: simple question
I'm urgently need the solution...
Can anybody tell me how to show & close a report from vb.net?
Think Before Ink
Visual Studio .NET 2002/.NET Framework 1.0
-
Jun 22nd, 2005, 03:45 AM
#8
Thread Starter
Addicted Member
Re: simple question
I'm wondering why there is no reply for my question??? Help me pls...
Think Before Ink
Visual Studio .NET 2002/.NET Framework 1.0
-
Jun 22nd, 2005, 04:20 AM
#9
Re: simple question
I guess it's because not a lot of people work with CR. At least I don't so I can only hazard guesses. Does the viewer object have a .Close() method? I also suggest you look at documentation on Crystal reports for this. ANy examples similar to yours would help
-
Jun 22nd, 2005, 04:23 AM
#10
Thread Starter
Addicted Member
Re: simple question
i posted it here bcos, i'm calling the report from vb.net...so i thought somebody can tell me any methods to close or dispose the object...
Think Before Ink
Visual Studio .NET 2002/.NET Framework 1.0
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
|