CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2008
    Posts
    42

    loading the reports fom reports folder instead of debug..

    i am developing an application in vb.net having crystal reports
    i have stored all my reports in a folder called report in my application
    but initally when i executed i got a error msg like the report doesnot exixts in debug folder

    so i copied all the reports from report folder to debug folder & its working
    any changes that i mke in report folder needs to be copied into the debug folder also

    is it possible that the reports be executed from reports folder only & not from debug folder as everytime i need to make changes in the debug folder
    how can i chnage the path to reports folder

    ve a crystal report(named invoice.rpt) in my windows application,in order to get the crystal report in my code

    when I use Application.StartupPath it return me the path till 'bin' directory, but this 'Report' folder is one level above it.
    Last edited by svibuk; April 28th, 2011 at 05:35 AM.

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: loading the reports fom reports folder instead of debug..

    Take a look at this:

    Code:
    Private Sub btnDirPath_Click(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles btnDirPath.Click
    dlg1.Title = "Set Report Folder"
    dlg1.Filter = "Crystal Reports (*.rpt)|*.rpt|All Files (*.*)|*.*"
    dlg1.InitialDirectory = "M:\MIS\Programming\Reports\"
    If dlg1.ShowDialog() = DialogResult.OK Then
    lblDirPath.Text = UCase(Path.GetDirectoryName(dlg1.FileName))
    End If
    End Sub
    http://www.pcreview.co.uk/forums/exe...-t1408716.html
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

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

Featured