Results 1 to 10 of 10

Thread: simple question

  1. #1

    Thread Starter
    Addicted Member haihems's Avatar
    Join Date
    Oct 2004
    Posts
    150

    Cool 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

  2. #2

    Thread Starter
    Addicted Member haihems's Avatar
    Join Date
    Oct 2004
    Posts
    150

    Re: simple question

    Any Help??
    Think Before Ink

    Visual Studio .NET 2002/.NET Framework 1.0

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  4. #4

    Thread Starter
    Addicted Member haihems's Avatar
    Join Date
    Oct 2004
    Posts
    150

    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:
    1. Private Sub frmReports_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    2.  
    3. RptName = Directory.GetCurrentDirectory & "\Reports\pnl.rpt"
    4. Viewer1.ReportSource = RptName
    5. Viewer1.RefreshReport()
    6.  
    7. End Sub
    8.   Private Sub frmReports_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
    9.  Viewer1.Dispose()
    10. 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

  5. #5

    Thread Starter
    Addicted Member haihems's Avatar
    Join Date
    Oct 2004
    Posts
    150

    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:
    1. Private Sub frmReports_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    2.  
    3. RptName = Directory.GetCurrentDirectory & "\Reports\pnl.rpt"
    4. Viewer1.ReportSource = RptName
    5. Viewer1.RefreshReport()
    6.  
    7. End Sub
    8.   Private Sub frmReports_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
    9.  Viewer1.Dispose()
    10. 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

  6. #6

    Thread Starter
    Addicted Member haihems's Avatar
    Join Date
    Oct 2004
    Posts
    150

    Re: simple question

    sorry... i posted the same twice...
    Think Before Ink

    Visual Studio .NET 2002/.NET Framework 1.0

  7. #7

    Thread Starter
    Addicted Member haihems's Avatar
    Join Date
    Oct 2004
    Posts
    150

    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

  8. #8

    Thread Starter
    Addicted Member haihems's Avatar
    Join Date
    Oct 2004
    Posts
    150

    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

  9. #9
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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

  10. #10

    Thread Starter
    Addicted Member haihems's Avatar
    Join Date
    Oct 2004
    Posts
    150

    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
  •  



Click Here to Expand Forum to Full Width