Click here to Skip to main content
15,891,749 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying to show a report using crystal report and for that i am using report.mdb file in which data is stored and fetched into report file.But when i run the application in local then its run smoothly and showing the report but when i run this in web i got an error "Database logon failed."
can anyone help me???

ASPX
XML
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
    AutoDataBind="True" EnableDatabaseLogonPrompt="False"
        GroupTreeImagesFolderUrl="" Height="1202px"
        ReportSourceID="CrystalReportSource1" ToolbarImagesFolderUrl=""
        ToolPanelWidth="200px" Width="1104px" />
    <CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
        <Report FileName="reportfiles\PTax.rpt">
        </Report>
    </CR:CrystalReportSource>


Web.config
XML
<add name="ReportConnection" connectionstring="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\AReport.mdb;" providername="System.Data.Oledb" />
Posted

You need to set logon details for reports at runtime
C# Crystal Reports Dynamic Logon parameters[^]
 
Share this answer
 
I hope reports are connected to your local system,so on web server try to open report and connect that report to web system and update the database to hosting machine
 
Share this answer
 
Comments
Sandip Paul 491984 17-Mar-14 10:19am    
i did the same method with sql server i put web server ip address,user name and password but it showing me the same error.
vsrikanth87 17-Mar-14 10:32am    
not with sql credentials,may be ur reports are connected to local system so check that

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900