cancel
Showing results for 
Search instead for 
Did you mean: 

Set sub report Logon Info without prompting

Former Member
0 Kudos

I have a crystal report that i am displaying using a ReportSource from crystal enterprise server 10.

This report has On Demand Sub Reports in it. When a user clicks on the web viewer to view that sub report it prompts for Database logon information. How do i set this information server side so the user is not prompted?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I wanted to follow up on this question, since it was not properly answered. If you are using the enterprise SDK, and veing a report Stored on the server you must change the properties of the report on the server itself for what I needed to work.

Once the report is saved to crystal enterpise go into the report's properties.

go to Process->Database and set the following setting:

In Crystal 10 - Make sure 'Prompt the user for database logon when viewing' is

NOT checked.

In Crystal XI - under 'When viewing report:' make sure the radio button for

'Use same database logon as when report is run' is checked.

Also, the SDK has a 'Prompt on refresh' optoin when scheduling the report programmatically that you can set to false to make this work without having to change the base report in the crystal enterprise server. (This goes for Crysal XI and Crystal 10)

Former Member
0 Kudos

Hi,

Have you tried using the method

ReportDocumentObjects.SetParameterValues("parameter name as in report", "value");

Does this helps?

Regards,

AG.

Former Member
0 Kudos

No it doesn't help, its not even related. Its prompting for a database login, one option i have found is to use integrated security instead of sql authentication, which I hoped to NOT do.

Former Member
0 Kudos

Hi,

To supress the database credentials you can use:

ReportDocObject.SetdatabaseLogon("uid","pwd");

Place this code before passing the parameter.

Thanks,

AG.

Former Member
0 Kudos

I am using a ReportSource which does not have that parameter. We don't use ReportDocuments either because the report is loaded from a CRYSTAL ENTERPRISE Server, we get Report classes not report DOC classes.

I do this because if i don't large report instances (200MB) are very slow to load due to the fact that the webserver has to load the whole Document to use a method other than report source, which uses the report page server on the CE server to load parts of the report.

Is there some way to get at the report document that is being loaded by a reportSource? (i can't find it and the LogonDatabases method gives me a 'service not found' error which doesn't tell me anything.)

daniel_paulsen
Active Contributor
0 Kudos

in this case, you should be using the LogonInfo property of the viewer.

Create a TableLogonInfos and TableLogonInfo objects and set all of the logoninformation in the connectioninfo of the Tablelogoninfo object. also set the reportname (name of the subreport). Add the tablelogoninfo object to the tablelogoninfos collection and set this to the logoninfo of the viewer

ie

viewer.Reportsource = myReportsource

veiwer.LogonInfo = myTableLogonInfos

Dan