Solved

Set Crystal Report Data Source to Application Startup Path

Posted on 2006-11-13
2
358 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 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

16 Experts available now in Live!

Get 1:1 Help Now