hemaljoes 0 Newbie Poster

I want to use a crystal report in my application.
When i create crystal report using the standard report wizard I gave the database as the InventoryControl\bin\Debug\InventoryControl.mdb

it works fine when i debug the program.
But if i exe file and the database file and copy it to another machine and run it it does not work.

I tried several methods

1) SetDatabaseLogon("UserName","UserPassword",Application.StartupPath,"InventoryControl.mdb");

2) override the FileName in the CrystalReport.cs as following

public override string FileName
        {
            get
            {
                return Application.StartupPath;
            }
            set
            {
                base.FileName = value;
            }
        }

But from non of these i can not do what i want.
Can anybody please help me.
Thank in advanced.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.