cancel
Showing results for 
Search instead for 
Did you mean: 

cann't connect to database

05-20-2016 11:30 AM
495 views 6 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

we are developing a report in .net 2012 with crystal reports. But when hosting from IIS, the next page in the report is not working, it is giving an error saying 'cann't connect to database'. We are able to see the first page, from next page onwards, getting error. please help.

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi Ramana,

Is it happening for all reports or only with this report.  I know you are trying to view a single report, but have tried to inserting any other existing reports and view the second page.

I think the second page would be displayed by a sub report which is connecting to a different database.

Can you try to check this report through crystal reports designer and see you are able to see all pages.

Thanks,

Sastry.

Former Member
0 Likes

Hi Sastry,

I can view all pages from Designer. only after hosting, it is not displaying properly.

Former Member
0 Likes

Hi Ramana,

We need to move this thread to .NET team to address this, because if you are able to refresh and see all pages from designer, then your report is working fine.  It could be some issue with binding connections to this report in .NET.

Please close this thread and open a new thread in .NET (SDK) forums.

Thanks,

Sastry

DellSC
Active Contributor
0 Likes

Do you know which version of the SDK is being used to view the report in the website?  Do you have code for keeping the report in session?  If not that is your problem.  In some versions of the .NET SDK the code for this goes into the Page_Load event handler and in others it goes into the Page_Init event handler.

-Dell

Former Member
0 Likes

Hi,

we are using 13.0.13 version. can you please let us know which is supported version. we have the code for keeping the report in the session.

we are able to see all pages in designer. only after publishing in iis, we could not see the next pages throwing an error 'cann't connect to database'

Former Member
0 Likes

If your session code is correctly implemented, I have a hard time understanding why the report would need a logon after going to page two. So two things to do:

1) Check the code suggested in this KBA:

1985571 -  How to use sessions in web applications using the Crystal Reports viewer (the complete code)

2) Add the special function Page n of M to your report. This forces the report to get data for all pages at once.

- Ludek

Senior Support Engineer Product Support, Global Support Center Canada

Follow me on Twitter

Got Enhancement ideas? Use the SAP Idea Place

Answers (0)