Solved

Set Crystal Report Data Source to Application Startup Path

Posted on 2006-11-13
2
360 Views
Last Modified: 2008-03-06
This seems like it should be a simple thing to do, but I've been wrestling with this for hours.

Just need to set the DataSource for my Crystal Reports to my Application Startup Path.

All of my information for the report is calculated and dropped into a single table for a CR to display.

When I set this up at design time, everything works fine, but need to work when deployed by pointed at application startup path.

Thanks!!
0
Comment
Question by:kerryw60
2 Comments
 
LVL 42

Accepted Solution

by:
frodoman earned 500 total points
ID: 18071426
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Private Sub myFormName_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim rep As New myReportName()
    Dim t As New TableLogOnInfo
    t.ConnectionInfo.DatabaseName = My.Application.Info.DirectoryPath.Replace("C:\OLD DATABASE PATH", Application.StartupPath) & "\myAccess.mdb"
    t.ConnectionInfo.UserID = ""
    t.ConnectionInfo.Password = ""
    rep.Database.Tables(0).ApplyLogOnInfo(t)
    myCrystalReportViewer.ReportSource = rep
End Sub
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
0
 
LVL 6

Author Comment

by:kerryw60
ID: 18071665
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now