How to set Database Logon Info, if allowDatabaseLogonPrompting="false"
Hey,
Here is the Version Details -
Crystal report X1 R1
Sql Server 2005
Tomcat 5.5.27
Question -
I am using jsf viewer to dispaly report in my web project. We don't want to prompt for database logon information before showing the report to teh front user. I have seen few sample jsp code which creates the crystalreportviewer object and set the connectioninfo details and calls the processhttprequest method to render the report. I have tried the same approach and it works for us.
But our requirement is to just use the jsf tags. Is there a way to pass the database credentials to the jsp without prompting for Logon Information or using the java code to populate the connectioninfo in crystalreportviewer instance.
Here is the jsp file -
<%@ taglib uri="/crystal-tags-reportviewer.tld" prefix="crviewer" %>
<crviewer:viewer displayGroupTree="false" viewerName="CrystalViewer"
reportSourceType="reportingComponent"
displayGroupTree="false"
displayToolbarExportButton="true"
displayToolbarPrintButton="true"
displayToolbarRefreshButton="true"
displayToolbarToggleTreeButton="false"
displayToolbarCrystalLogo="true"
top="100"
left="200"
reportSourceVar="#{Report.reportSource}"
isOwnPage="true"
displayGroupTree="false"
allowDatabaseLogonPrompting="false">
<crviewer:report reportName="Report.rpt">
<crviewer:partsViewer viewerName="CrystalViewer"
reportSourceType="reportingComponent"
title="Fill to Fill Report"
numberOfRecords="10"
showHeadings="true"
showPageNavigationLinks="true"
allowParameterPrompting="false"
reportSourceVar="#{Report.reportSource}"/>
</crviewer:report>
</crviewer:viewer>
I am trying to run this and it shows an error page with information Database Login Error.
I have created the report using JDBC/JNDI database connection with trusted authentication = false.
The Sql Server 2005 error log shows -
Error: 18456, Severity: 14, State: 5.
Logon Login failed for user ''. [CLIENT: <named pipe>]
Any help will really be appreciated.
Thanks
Bonyshree
Yes within the report designer i am able to refresh the report and open and close the report without getting prompted. I am not changing any database properties at runtime and using the jar files which come with CR Release 2.
All i am doing is to export the report in pdf format. Here is the code :
ReportExportControl exportControl = new ReportExportControl();
ExportOptions exportOptions = new ExportOptions();
PDFExportFormatOptions pdfOptions = new PDFExportFormatOptions();
exportOptions.setExportFormatType(ReportExportFormat.PDF);
exportOptions.setFormatOptions(pdfOptions);
exportControl.setExportOptions(exportOptions);
exportControl.setExportAsAttachment(false);
exportControl.setReportSource(this.wrapper.getReportSource());
exportControl.setName(this.wrapper.getReportName());
exportControl.setEnableLogonPrompt(false);
//Pass Fields object to ReportExportControl
exportControl.setParameterFields(this.wrapper.getFields());
//Export only works if i pass the connections object with connectioninfo object populated with username and password.
//We want to run the report using trusted authentication i.e. we don't want to pass username and password.
exportControl.setDatabaseLogonInfos(connections);
if(to_refresh)
exportControl.refresh();
If i don't provide the connectioninfo object with proper username and password to run the report inside the java class, it try's to logon to database using username = 'userid'. I think it picks it from the JDBC Connection String created while creating database connection for the report in the designer.
Here is the jdbc connection string for the JDBC/JNDI connection created inside the report designer:
!net.sourceforge.jtds.jdbc.Driver!jdbc:jtds:sqlserver://localhost:1433/customer;namedPipe=true!user=!password=.
Is there a way to get pass this problem??? Is there a way to force the connection from the java class to use trusted authetication??? Can we change the connection string to replace the userid with empty string to force trusted authetication???
Any help will be really appreciated.
Regards
Bonyshree
Similar Messages
-
Post Author: fabu1971
CA Forum: .NET
I could pass the database logon in Reports with subreports but the reports with subreports with different server name I can not pass the logon information . Do you have any idea how I can do that to pass the database logon with different database or server name ?Post Author: quafto
CA Forum: .NET
You can use the Subreports collection of the ReportDocument object to access all the subreports in your main report. These are returned as ReportDocument objects. Once you have your subreport as a ReportDocument you can loop through your Tables collection and set the ConnectionProperties to your appropriate Server/Database. For example here is some pseudo code: ConnectionInfo boConnectionInfo = new ConnectionInfo();boConnectionInfo.ServerName = "serverName";boConnectionInfo.DatabaseName = "databaseName";boConnectionInfo.UserID = "username";boConnectionInfo.Password = "yourpassword"; foreach(ReportDocument boSubreport in mainReport.Subreports){ foreach(Table boTable in boSubreport.Database.Tables) { TableLogOnInfo boTableLogOnInfo = boTable.LogOnInfo; boTableLogOnInfo.ConnectionInfo = boConnectionInfo; boTable.ApplyLogOnInfo(boTableLogOnInfo); boTable.Location = "newtablelocation"; }} -
How to set database session info
Jdev 9.0.3.3
My app manages user logins via a custom jaas implementation, but it connects to the db using a shared username/password. I capture the real username password of the logged in user in my app and want to add that info to some audit columns on my tables like Created_By, Updated_By, etc.
How do I pass in a value stored in my Java code to the db session so I can use that data in a trigger or whatever.
I understand there is a way to access the db session from the app mod, but I am unclear on how to do this.
TIAJdev 9.0.3.3
My app manages user logins via a custom jaas implementation, but it connects to the db using a shared username/password. I capture the real username password of the logged in user in my app and want to add that info to some audit columns on my tables like Created_By, Updated_By, etc.
How do I pass in a value stored in my Java code to the db session so I can use that data in a trigger or whatever.
I understand there is a way to access the db session from the app mod, but I am unclear on how to do this.
TIA -
How to avoid database logon dialog on every action of refreshing reports
I am using Crystal reports 208 SP2 and has a database connection to oracle database. Connection is esablished and report retrieves desired data, The problem is when ever i open this report ( which has this connection set) and do a refresh, the report the LogOn dialog pops up.
How to avoid or save this log on info such that it does not pops up the LogOn dialog when i open the report and do a refresh(F5).?Hi Don,
Thanks for the reply. To try your suggested approach, i need some clarifications .
_Problem summary:for refrence, _
I am following the steps mentioned below to establish a database connection, and fetch the data.
1) I am using Oracle drivers for configuring the ODBC data source. As part of configuration i will specify the Oracle server name
2) In crystal reports, Using "Database" menu, i open "Database Expert" dialog and "Make New connection" by specifing the data source mentioned in step 1). During this process, (ODBC)logon information will be filled in. The user ID and password used has all the rights to access the tables in the database. Logon will be successful and connection is established.
3) Further i use the database table from the "Database Expert" on to the report and refresh(F5) to fetch the data.
After step 3, I close the report and reopen it. Now trying to refresh the database logon dialog pops up. I need to avoid this pop up
Requesting Clarification:;
1) You have specified "When you connect you have the option to use Trusted Authentication, check this option on". Where is this option. Is it in the crystal reports or is it available during data source configuration. Kindly specify.
2) Here "Enterprise logon info that has been configured on the Oracle server." implies the oracle database login information right? If yes, this login details are available and i am using this logon information(i.e. UseriD and Password) during database connection.
If No, Is "Enterprise logon info " is something which should be specifically enabled by DBA in oracle11g configuraion.
Kindly suggest.
Edited by: R Guru on Oct 17, 2009 7:32 PM -
How to set database location in the crystal report X1 from the Source code.
Dear All,
I am using Crystal report X1 for report generation.Now I am setting the database location manually in the crystal report. How can I Set the database location from the Source code.
Awaiting for your reply.
Thanks in advance.
Regards,
Rahaneef THere's a routine that also searches for subreports to set the log on info. Simply remove that aprt to set the main report logon info:
IDatabaseTablePtr pTable;
//get first table
pTable = m_Report->Database->Tables->GetItem(1) ;
long lTableCount = m_Report->Database->Tables->Count;
for( long lTable=1; lTable<=lTableCount; lTable++ )
pTable = m_Report->Database->Tables->GetItem(lTable);
pTable->ConnectionProperties->DeleteAll();
pTable->ConnectionProperties->Add("DSN", "Name of your DSN");
pTable->ConnectionProperties->Add("Database", "Demo");
pTable->ConnectionProperties->Add("Password", "sa");
pTable->ConnectionProperties->Add("User ID", "1Oem2000");
// Log on the tables of the subreports.
long lSectionCount = m_Report->Sections->Count;
for( long lSection=1; lSection<=lSectionCount; lSection++ )
ISectionPtr pSection = m_Report->Sections->Item[lSection];
long lSubreportCount = pSection->ReportObjects->Count;
for( long lSubreport=1; lSubreport<=lSubreportCount; lSubreport++ )
IReportObjectPtr pSubreportObject = pSection->ReportObjects->Item[lSubreport];
CRObjectKind crObjectKind;
pSubreportObject->get_Kind(&crObjectKind);
if( crObjectKind == crSubreportObject )
ISubreportObjectPtr SubReportPtr = pSubreportObject;
IReportPtr pSubReport = SubReportPtr->OpenSubreport();
long lTableCount = pSubReport->Database->Tables->Count;
for( long lTable=1; lTable<=lTableCount; lTable++ )
pTable = m_Report->Database->Tables->GetItem(lTable);
pTable->ConnectionProperties->DeleteAll();
//pTable->ConnectionProperties->Add("DSN", "dwcb12003");
pTable->ConnectionProperties->Add("Database", "CrystalEport_DB");
pTable->ConnectionProperties->Add("Password", "sa");
pTable->ConnectionProperties->Add("User ID", "1Oem2000");
If that doesn't work you need to tell us what is the error you are getting and paste in the code you are using. -
How to hide Database Logon option when scheduling Crystal Report in BOE?
Hi All,
For security reason, we are try to hide the Database Logon option in Crystal Report Schedule page in InfoView.
There is option in CMC which we can configure the default Database logon option so that users do not have to enter the logon everytime they view or schedule the report. However, we are looking to hide this option completely.
Does anyone know if there is a security setting which can hide the option from specific users?
Thanks,
BobbyHi Bobby,
As Jorge informed that there is no method available within CMC to hide database logon option when scheduling or viewing a Crystal Report in the Info view. This is very much true.
But as you also mentioned that you don't want your users to enter the database logon credentials evertime they view or schedule a crystal report, there is one setting in CMC which we can do to avoid prompt for database logon credentials.
CMC - Home - Go to that specific crystal report - Click Process tab - Click the sub-tab 'Database' and at the bottom of the page there is an option "Use same database logon as when report is run". Check this option after providing the database credentials and click UPDATE.
Now whenever users try to view or schedule this specifc crystal report they won't be prompted for the database logon credentials.
Regards,
Venkat -
How to set database credentials to form?
Hi All,
I'm newbie em Forms. I'm facing a situation and I don't know how to solve it. I run a forms application in a giver browser and I'm always asked to type database credentials in order to connect to this database. In development time there's no problem, however, general users cannot have database user and password to be able to access the form.
Is there any way to set database credentials (user, password, database) in order to user not being asked to provide these info ?
thanks a lotHi,
Plz configure formsweb.cfg file in order to achieve this. Set the parameter 'userid=<YourDatabaseCredential>'.
e.g. userid=scott/tiger@orcl
thanks & best regards,
Qasim Javaid Malik -
How to set database location for stored procedure
Post Author: Pavel
CA Forum: Data Connectivity and SQL
I've already found out that setting location is not only my problem, but I can't understand the correct decision. We using CR to create reports, accessing the data in MSSQL by ODBC.
Previously (up to version 8) I set location directly, editing the "Table" field in "Set Location" form. Command after report creation was:
Proc(DBNAME.dbo.PROCEDURE_NAME;1)
I erased "DBNAME.dbo.", so the correct command was
Proc(PROCEDURE_NAME;1)
After that, the report can run on any database name, any ODBC datasource with any owner name of procedure.
Now we had to upgdate to CR 11 Developer Edition.
Here I can't erase database location. But when I change database location to ODBC datasource for another database, the properties of stored procedure "Catalog" and "Owner" remain the same as they initiated when report was created! So, when report runs, it call
exec OLD_DB_NAME.dbo.PROCEURE_NAME;1 ....
So, the report doesn't work on customer database, because it has different name.
How can I erase any database location in the report?We run reports using API from Gupta Team Developer applications, may be it is possible to set database location by API before running report?
Plese help, any tips are usefull.Post Author: Pavel
CA Forum: Data Connectivity and SQL
When I set location to another database (i.e. another ODBC datasource) by clicking Update button, "Catalog" property is not changing! It remains unaltered. I had to remove procedure from report and then add procedure from another database, so there was a lot of formatting fileds after that.
This is not a right decision. I didn't solved current problem, I only temporary patched it.
The correct desision is to set location programmatically from application.But function PEGetNthTableLocation returns empty strings in CR11, or I incorectly declared this function (from CR8.5):
BOOL CRPE_API PEGetNthTableLocation ( short printJob, //handle to print job short tableN, //number of table struct PETableLocation FAR *location //structure pointer);typedef struct PETableLocation { WORD StructSize; char Location [PE_TABLE_LOCATION_LEN]; //256 char SubLocation[PE_TABLE_LOCATION_LEN]; //256 char ConnectBuffer[PE_CONNECTION_BUFFER_LEN]; //512} PETableLocation; -
How to set database information runtime with delphi 2007 vcl11
hi
i'm trying to set database information runtime. I'm using mssql express 2005 and doing the following to set database information at runtime.
for x := 1 to crpe1.Tables.Count do
begin
crpe1.LogOnInfo.Items[x].ServerName := server.text;
crpe1.logoninfo.items[x].DatabaseName := database.text;
crpe1.logoninfo.items[x].UserID:=username.text;
crpe1.logoninfo.items[x].Password := pass.text;
end;
is above code correct to set the database information?
Thanks in advance,
Parvhi all,
i resolved it somehow. thanks.
Parv -
Web Dynpro - How to set and get info from Component Controller
Hi Gurus!!!
Im having some problems getting and setting info in component controller of my Web Dynpro.
I can't see the difference between View Context and Global Context.
How can i create a Global Context Between two views?
Thanks!
Regards.
Polakinho.-hii
difference between view context and global context is we can use the same component controller for all the views in the same application.but when when we create node in view context then it will be available for that view only not for any other view...so if we want to use the same node for all the views we need to create that view in the component controller.so it will become global for that application.
for using global node you need to map that context in view controller.for that you need to go to that view then click on context tab and drag and drop node from component controller.so it will be available for that view.i hope it helps you.
regards
twinkal -
How to set default logon domain RD Gateway and/or RD Web
I'm using Win2k8 R2 servers with WinXP clients. When I logon to the RD Web page, and again to RD Gateway, I -have- to enter domain\username to authenticate. Anyone know how I can set the default logon domain? My users don't even know how to spell their username most of the time, let alone what domain they're in, and I only have one domain.
Thanks
MarkHello Mark,
Thanks for your feedback.
Based on your reply, I understand that you want to add a default domain name into Remote Desktop Web Access page, which helps the clients to know the domain their accounts are in.
You can finish this task by customizing the default login page shipped with Remote Desktop Web Access services role. However, we don’t recommend you to do that in general, because:
· The customization of the system-shipped page may cause unexpected risk or instability.
· The future updates or service packs for related products may overwrite the modified version you customized.
Based on the factors above, if you really need to do this customization, please note to backup both the original version and modified version of the login page, during the following customization steps:
1. Login to the Remote Desktop Web Access role-based server with local administrative permissions.
2. Navigate to the following location:
%windir%\Web\RDWeb\Pages\<The Language of Your Location>\
3. Backup the login.aspx file to another location.
4. Right click the login.aspx file, and select Edit. The file will be opened with Edit status in your default HTML editor.
5. Change the original code section:
<input id=”DomainUserName” name=”DomainUserName” type=”text” class=”textInputField” runat=”server” size=”25” autocomplete=”off” />
to be:
<input id=”DomainUserName” name=”DomainUserName” type=”text” class=”textInputField” runat=”server” size=”25” autocomplete=”off” value=”domainname\” />
6. Save the modification. Backup the modified version.
Please test the issue again after the steps above. Let us know the result if possible. Thanks for your cooperation again.
Lionel Chen
TechNet Subscriber Support in forum
If you have any feedback on our support, please contact [email protected] -
How to set database name default for oracle discoverer 10g
Hi
Do you have idea of setting the database name default for oracle discoverer 10gI mean to say while login to discoverer 10g, it will ask for following options. In this Database should select the database name by default instead of any value
User Name
Password
Database
End User Layer -
How to set database default temporary tablespace in 8i?
SQL> alter database default temporary tablespace temp3;
alter database default temporary tablespace temp3
ERROR at line 1:
ORA-02231: missing or invalid option to ALTER DATABASEAs far as I know, in Oracle 8i, you can not set the temporary tablespace as default at the database level; rather you can set it at the user level.
SQL> alter user scott default temporary tablespace temp3;
In Oracle 8i, the created users without specifying the default temporary tablespace, those users will by default assign to SYSTEM as default temporary tablespace.
You may need to assign the temp3 temporary tablespace to all the users.
Regards,
Sabdar Syed. -
How to set configure path info in 6.0 for developing a app
For example:
I install weblogic6.0 in c:\,so the path is c:\bea\
and my working forlder is d:,I develop a new app named 'test'
The path info is as follow:(root is d:\test\)
\meta-info\application.xml
\web\
..\web-info\
\ejb\
..\ejb-info\
So,when I look the document in the bea web site,they tell me how to deploy it
with archive app a .war file.But that only for deploying.How to run it in developing
stage?
Help me,Please!Another question regarding the name of the JWS file:
Found the following on one of WL 10.3 example server's help documentation pages:
"The wsdlc task generates this JWS implementation file in the directory specified by the destImplDir attribute. The subdirectory hierarchy corresponds either to the packageName attribute or to the targetNamespace URL of the WSDL if the packageName attribute is not specified. The name of the JWS file is ServiceName_PortTypeNameImpl.java, where ServiceName and PortTypeName refer to the value of the name attribute of the appropriate <service> and its inner <port> element, respectively, in the WSDL file. The names of the methods and parameters in the JWS file are the same as the names of the operations and input parmeters in the WSDL file."
Does this mean that the wsdlc task creates this file, with the name format specified above, by default. beccause, I dont see such a file created for me. What it creates for me is just the service_port_type_nameImpl file.
Which one is correct? -
How to set database user password to never expire
Hello all,
I have a linux server with Oracle 11g installed which is used primarily for testing by a few developers and QA folks. I want to set the DB user password to never expire. I have run the following (which works on a windows machine) but the password still states that it will expire in 7 days. Is there something else I can do to 'force' the pw to infinity? I've tried stopping shutting down the DB, stopping / restarting listener...
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
select * from dba_profiles where profile = 'DEFAULT' and resource_name LIKE 'PASSWORD_LIFE_TIME';
"PROFILE" "RESOURCE_NAME" "RESOURCE_TYPE" "LIMIT"
"DEFAULT" "PASSWORD_LIFE_TIME" "PASSWORD" "UNLIMITED"
select profile from dba_users where username='TEST';
"PROFILE"
"DEFAULT"
select username, account_status, to_char(expiry_date, 'DD-MM-YYYY') EXP_DATE from dba_users where username = 'TEST';
"USERNAME" "ACCOUNT_STATUS" "EXP_DATE"
"TEST" "OPEN" ""
Help appreciated.With 11g, Password_life_time in DEFAULT profile is set to 180days.
Default profile values in 11g.
SQL> SELECT * FROM dba_profiles WHERE profile = 'DEFAULT' AND resource_type = 'PASSWORD';
PROFILE RESOURCE_NAME RESOURCE
LIMIT
DEFAULT FAILED_LOGIN_ATTEMPTS PASSWORD
10
DEFAULT PASSWORD_LIFE_TIME PASSWORD
180
DEFAULT PASSWORD_REUSE_TIME PASSWORD
UNLIMITED
PROFILE RESOURCE_NAME RESOURCE
LIMIT
DEFAULT PASSWORD_REUSE_MAX PASSWORD
UNLIMITED
DEFAULT PASSWORD_VERIFY_FUNCTION PASSWORD
NULL
DEFAULT PASSWORD_LOCK_TIME PASSWORD
1
PROFILE RESOURCE_NAME RESOURCE
LIMIT
DEFAULT PASSWORD_GRACE_TIME PASSWORD
7
7 rows selected.Change the password_grace_time to unlimited.
HTH
-Anantha
Maybe you are looking for
-
Pointing Adobe 9 Pro to Shared Network Folder to Add Comments
We currently use Pro7 as a standard in our company and put PDF's into SharePoint 2003 for review. All Adobe Acrobat 7 Pro.'s in our company point to a Z: drive for reviewing. When a PDF is posted into SP and opened via a link all comments can be seen
-
Dear all, Iu2019m trying to use transaction RERAALCN, but when I execute this t-code the system is giving back an error: -> Contracts without any items relevant for accrual/deferral How can I display the open items to post the correct accruals? Thank
-
Withholding tax-certificate prinitng
Dear all, while printing certificate for withholding tax, 194C, 194I getting printed. But all the other sections are not getting printed. I assigned forms also. But forms are not appearing and getting printed. What would be the reason? I will award p
-
iTunes will not recognise my iPhone any more, i have removed , re-installed, configured, tried different USB cables and ports, if i try to run the diagnostic for iTunes the program goes into meltdown and has to be closed? i have tied several of the f
-
I have a macbook pro from 2007 and the display memory slows do the screen so much it is almost unuseable Any help fixing this problem?