Allow users to change database connection at runtime
Folks,
CR 12.2.0.290
BOE 12.1.0
I develop CR on desktop and then save to the BOE repository. Users need the ability to point the report to a different Oracle schema. Tables and elements are the same, just the data is stored via streams so that each location has its own reporting schema. So one (16 total) report needs to run against multiple schemas based on which origin the user is trying to report against; one at a time. Other than having a set of reports for each site, how can I allow the users to select the schema to run against at runtime?
Thanx
Mike
When you schedule a report with InfoView, there is a Database option where an ODBC connection, user and password can be specified. Can this be used? (I'm not familiar enough with Oracle to know for sure... Also, this option doesn't show if the report uses Business Views.)
HTH,
Carl
Similar Messages
-
Changing Database connection at runtime in CR2008
Hi,
I have a VS2008 application which is using CR2008 to generate pdf reports for the user. Problem is I am not able to change the database connection to any server other than the one that was used to create the report template.
My environment has CR2008 SP2. I have tried reports with no paramter as well as the ones with parameters both dont seem to work.
I have already tried a couple of things:
a) report document refresh after loading it
b) setting the database connection as
this._crReport.DataSourceConnections[0].SetConnection(dbServerName, dbName, dbUserId, dbPwd);
c) setting the database connection as
tbls = this._crReport.Database.Tables;
bool test = false;
foreach (Table tbl in tbls)
tblLogonInfo = tbl.LogOnInfo;
tblLogonInfo.ConnectionInfo = connInfo;
tbl.ApplyLogOnInfo(tblLogonInfo);
test = tbl.TestConnectivity(); ** note this alwys return a true for the changed database server
I have read a couple of thread but none has worked for me...Is this a known issue with CR2008?
Thanks
KajalHi Kajal,
I am assuming that you are not changing the schema of the report at any point of time. I would suggest you to try pointing to the other database through designer to make sure that you can hit the database and the schema is correct. You can also create a udl file to check the database connectivity.
Then just for testing purpose you can try the following code:
ReportDocument reportDoc = new ReportDocument();
reportDoc.Load("path of the report");
reportDoc.SetDatbaseLocation("uid","pwd","Servername","tablename");
reportDoc.SetParameterValues("Parameter-Name","values");
CrystalReportViewer.ReportSoure=reportDoc;
Does that help?
Thanks. -
Changing database connection at runtime
Hi All,
I have multiple screens based from different database instances. How can I make a single menu screen which will allow log in for another database connection? I tried using the LOGIN_SCREEN built in but it does not change the connection once you are already connected to one database.If you want to change connections, you first have to logout. Besides the logon_screen builtin does not change the connection, but it only sets several application properties.
In the Forms Help there is an example how to use the logon_screen. It basically comes to the next pl/sql code:
declare
MyUsername VARCHAR2(40);
MyPassword VARCHAR2(40);
MyConnect VARCHAR2(40);
begin
logon_screen;
MyUsername := Get_Application_Property(USERNAME);
MyPassword := Get_Application_Property(PASSWORD);
MyConnect := Get_Application_Property(CONNECT_STRING);
logout;
if MyConnect is not null then
logon(MyUsername,MyPassword| |'@'| |MyConnect);
else
logon(MyUsername,MyPassword);
end if;
end;
null -
Set password for database connection at runtime
Hi there,
is it possible to set the password and/or the user for the database connection at runtime.
The use case is to read the values from a file and decrypt them, and the to establish the conenction. So that i don't habe to redeploy everything if there is a change.
Thanks in advance.How exactly do i set these values for the datasource?
Edited by: Alex on 15.02.2012 09:50
€: JDeveloper 11.1.1.5.0
The use case is, that there is a file with an encrypted password. This should be decrypted and then be used for the connection. So when this encrypted passowrd changes, i don't want to edit and deploay the app once again. Instead the new encrypted password should be decrypted via code an then be used.
Edited by: Alex on 15.02.2012 10:00 -
Issue with changing database location at runtime
I am having a similar issue to:
Re: Issue with changing database location at runtime
where I am using Crystal Reports 2008 SP 3 fix pack 3.3 and a OLE DB connection to a SQL 2008 R2 server. Running on a computer on the network where the report can see the original development server is fast, other computers where that server is not available are hanging 20 seconds before coming up.
I am using the same code from the Crystal Sample app to change the connection on each table. I found that the slowness comes the first time the ReportDocument object is accessed to get the collection of database tables, before the connection info is set.
Fix pack 3.4 was mentioned in that post. Does fix pack 3.4 fix that issue? I don't see fix pack 3.4 on the downloads page (https://websmp130.sap-ag.de/sap%28bD1lbiZjPTAwMQ==%29/bc/bsp/spn/bobj_download/main.htm)I just found on the reports that were having the issue there was a SQL Expression. Per this thread:
Re: Report load is slow after changing database servers
There was an issue with that and the fix is not out til the end of Feb so I found a way not to use the SQL Expression and the speed is much better.
However, your information provided led me to this post:
Cannot Change Table Location, but Only for One Report
And I am also experiencing an issue where the table location is not changing on one subreport and I will look into that as a possible solution.
Thanks so much for your help. -
Different database connections at runtime
How can I change different database connections at runtime on the same Application Module ?
I use BC4J as business layer and uiXml as presentation layer.Does anyone know how to do this?
I need the same, but i couldn't find any documentation about it.
Looking forward to hearing good news..... -
How to allow user to change SAP Portal password by themselves
We would like to allow user to change SAP Portal password by themselves. However, I added role Manage_My_Password and Manage_My_Profile to a user account. After logoned with this user account and opened the option 'Personalize'. I only find the page allow me to customize the page layout. But I haven't find tab for changing profile and password.
Pls advise.
Thanks.
EdwardHi Edwar,
You can hide the pages from portal personalization workset. copy the workset and select the page and click on property -> select Invisible in Navigation Areas ->yes
You can find the workset under
Portal content->End user content->Standard Portal Users>Workset->Portal Personalization
If you want a custom developed application fro change password see the below blog
A Change Password Application
Hope it helps
Regards
Santosh -
Change database connection for FRS Report
currently we are using ASO BSO model and all FRS reports are retrieve against BSO Database.Now we are converting to ASO only model. can i use the same report against ASO database .
There is a option of chang database connection under tool in workspace . will this work or do i have to make all reports again
can you please help me with this
thank youIN some cases even if the report has additional dimensions it will work. After you change the connection. Open the report in designer. The new dimensions will automatically update. Save the report and you should be good to go. If dimensionality is exactly the same you don't even have to do that, just change the connection, point ot the new database and run the report.
-
902: Allowing user to change profile like phone-nr. in self-service
Hi all
An existing Portal user can see his profile using "Account info/My_profile", but he cannot change it (a least by default).
Is there a way to allow users to change their personal profile in self-service?
Thanks
TinoIt may be that the transaction is being routed by default for approval. Check with workflow administrator to see where the transaction has gone. I think you will find it is waiting for an approver!
Many SSHR transactions use a default AME (Dynamic approval) rule which will route the transaction up the supervisor hierarchy for approval. Your transaction data will be stroed in staging tables (HR_API_TRANSACTIONS, STEPS and VALUES) until the approval is made. Only then will it be applied to the underlying tables.
Let me know if this solves the problem.
Regards
Tim -
Dynamically Changing Database Connections Information
Post Author: Robert Flaherty
CA Forum: .NET
USing Crystal 2008 and Visual Studio 2008 in C#:
Below is the code that I am using to set the database connection at runtime. This does not work when the Server/Database is different from the Server/Database that was used when the report was generated. What happens is a dialog box appears with the original connection information, The textbox for the server and the database are disabled.
public partial class ViewOrder : Form
string sqlStmt;
public ViewOrder(string SqlStmt)
InitializeComponent();
GlobalVaribles gv = GlobalVaribles.Instance;
sqlStmt=SqlStmt;
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.ServerName = gv.Server;
connectionInfo.DatabaseName = gv.Database;
connectionInfo.UserID = gv.UserID;
connectionInfo.Password = gv.Password;
crystalReportViewer1.SelectionFormula = sqlStmt;
string reportPath = Util.BuildFileName(gv.ReportPath, "Order001.Rpt");
crystalReportViewer1.ReportSource = reportPath;
crystalReportViewer1.ShowGroupTreeButton = true;
crystalReportViewer1.EnableDrillDown = false;
SetDBLogonForReport(connectionInfo);
private void SetDBLogonForReport(ConnectionInfo connectionInfo)
TableLogOnInfos tableLogOnInfos = crystalReportViewer1.LogOnInfo;
foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos)
tableLogOnInfo.ConnectionInfo = connectionInfo;Post Author: Robert Flaherty
CA Forum: .NET
USing Crystal 2008 and Visual Studio 2008 in C#:
Below is the code that I am using to set the database connection at runtime. This does not work when the Server/Database is different from the Server/Database that was used when the report was generated. What happens is a dialog box appears with the original connection information, The textbox for the server and the database are disabled.
public partial class ViewOrder : Form
string sqlStmt;
public ViewOrder(string SqlStmt)
InitializeComponent();
GlobalVaribles gv = GlobalVaribles.Instance;
sqlStmt=SqlStmt;
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.ServerName = gv.Server;
connectionInfo.DatabaseName = gv.Database;
connectionInfo.UserID = gv.UserID;
connectionInfo.Password = gv.Password;
crystalReportViewer1.SelectionFormula = sqlStmt;
string reportPath = Util.BuildFileName(gv.ReportPath, "Order001.Rpt");
crystalReportViewer1.ReportSource = reportPath;
crystalReportViewer1.ShowGroupTreeButton = true;
crystalReportViewer1.EnableDrillDown = false;
SetDBLogonForReport(connectionInfo);
private void SetDBLogonForReport(ConnectionInfo connectionInfo)
TableLogOnInfos tableLogOnInfos = crystalReportViewer1.LogOnInfo;
foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos)
tableLogOnInfo.ConnectionInfo = connectionInfo; -
Does changing report connection at runtime require the same user/pwd used at design time?
I've recently integrated Crystal 13 into a web service to provide HTML reports served up within our web application. Sometimes reports would work and other times they would fail when attempting to connect to the database. The ConnectionInfo associated with the tables referenced in the reports bore the account info used at design time (in the Crystal IDE), what ever connection was set as the Datasource Location, this would include the server name, database name, and other attributes of the connection.
I found that any changes I make to table, sub-report connection info have no affect unless the UserID and Password match the UserID and Password saved with the report during design time. While generally searching online, I came across several references to this being and issue or suggestion when database connection problems dynamically running reports.
If this is by design?
How would I support customers who want to use my reports, but also require that they manage the db access accounts?
Thanks,
JeffHi Brian, thanks for the response.
It does make sense that subreports would not necessarily be constrained to the same connection as the container report, and the designer would not persist a password for any stored connection.
I'm on Windows 7 and up, Crystal 13 runtime, C# web service, sql 2008 r2 and up (native client).
After loading the report source, I call ReportDocument.SetDatabaseLogon to set userId, password, serverName, and databaseName pulled from web.config. I then pass the connection info and the ReportDocument to a recursive call that applies the connection info to each table in the report and each table in any subreport.
Based on your description, it sounds like I may be missing, and require, the SetDatabaseLogon call on each subreport (ReportDocument).
This seems to ring true and I think coincides with your description. Would you agree?
Thanks,
Jeff -
Dynamic database connections at Runtime dbAdapter
Hi
I need to connect to a database defined a runtime in a BPEL process using the dbadapter. All the configuration parameters for making the connection are provided at runtime (connectionURL, User, Password) and i need a way to configure them in the dbAdapter make the connection and execute some SQLStatements.
Until now we were testing with some bpelx Properties changing dynamically the name of the jndi (jca.jndi) that works fine, but we cant define a datasource for every database. We also tried with another set of properties for setting the connection at runtime (jca.mcf.ConnectionString, jca.mcf.Password,jca.mcf.UserName) unsuccessfully.
Do you know a way to define connections parameters at runtime in dbAdapter? Is that possible with SOA version 11.1.1.6 ?
If this is not possible what alternative do you suggest for making dynamic connections to a database.?
Regards
SergioYou can try using the function query-database and formulate the 4th parameter which is JDBC connect string at runtime.
oraext:query-database()
Returns a node-set by executing the sql-query against the specified database. The second parameter rowset indicates if the rows should be enclosed in a element. The third parameter row indicates if each row should be enclosed in a element. The fourth parameter datasource is either a JDBC connect string (jdbc:oracle:thin:USER-NAME/PASSWORD@HOST:PORT:SID) or a JNDI name for the database. Only Oracle Thin Driver is supported if JDBC connect string is used. Usage: oraext:query-database(sqlquery as string, rowset as boolean, row as boolean, datasource as string). Example: oraext:query-database('select last_name from employee where id=1234',false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL'.
This does not require a database adapter . -
How do i allow users to change their oracle password?
Please help.
I need a procedure/module in my forms6 to allow users change their oracle database passwords. I am using Oracle 8.0.6.
thanks for a replySEND YOUR EMAIL SO I CAN SEND YOU A COMPLETE
FORM HOW TO CHANGE THE USER PASSWORD
MARK -
ADF Database Connection at Runtime
Hi,
I have developed a ADF based Web Application, deploy the code into different appServers [connecting to Different Databases] but unable to connect to the Required Database at Runtime.
I have the following in my dataSources.xml & web.xml which looks like this.
dataSources.xml
<managed-data-source connection-pool-name="AIAQueryConnectionPool" jndi-name="jdbc/AIAQueryDataSource" name="AIAQueryDataSource"/>
<connection-pool name="AIAQueryConnectionPool">
<connection-factory factory-class="oracle.jdbc.pool.OracleDataSource" user="aia" password="aia" url="jdbc:oracle:thin:@//occf09.techmahindra.com:1521/ftsit"/>
</connection-pool>
web.xml
<resource-ref>
<description>AIA data source connection for FastTelco</description>
<res-ref-name>jdbc/AIAQueryDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
deployed the web Application "TestTransaction" and created ConnectionPool & DataSources for this Application "TestTransaction"
when i run the Application i am unable to connect to the required Database/(s)
Is that correct what i was doing ?
BUT If i have the entry of that specific Database in ./model/common/bc4j.xcfg file i am able to Connect to the Database
and if i remove the entry from ./model/common/bc4j.xcfg file, I am unable to Connect to the Database.
Why is it so ??
Can anybody give me the process / code to Connect to the Database in web based ADF Application at Runtime.
or
Pick up the Database Configuration Values from a Properties file and establish a Database Connection ??
thanks in Advance...
regards,
anvv sharmaHi,
I got it working today and not yes'day to the modifications suggested by arun...the only difference being i have stop / start the Application then it started with the working what i have done yes'day
also thanks for shay....... it was useful link
regards,
anvv sharma -
Not allow user to change Vendor in MB1B(541 mov) in subcontracting process
Hi all
Im doing 541 mov type in mb1b wrt PO number, the vendor number is automatically fetching from PO but user can change the vendor there,
I have to set display field as vendor,not allow to change vendor in MB1B..how can i set??? plz help me
thanks
ramesh reddyHi,
I would like to remeber you there is no direct connection between the purchase order and the
subcontractor stock. When you enter the purchase order in the MB1B
transaction, the data defaults from the purchase order only as an aid to
entry.
Please review the following notes for further explanations:
70739 - No order-related stock of material provided in R/3
50540 - Quantity proposal for movement type 541 for the
The transaction is designed to be a way to simplify the input of the
data. It allows you to change the data and overship or undership if you
would like. As there is no vendor stock specifically related to a
purchase order, there is no quantity check, and if you want, you can
post it several times or change the quantity.
In standard procedure we normally use ME2O instead of MB1B
BR
Nadia Orlandi
Maybe you are looking for
-
I was able to download and install Photoshop CC 2014 on my Mac Laptop. I am not being offered the new version on my iMac desktop. Why? I am a member of Adobe Creative Cloud.
-
Even as I try and submit this question, I have to keep restarting the iMac. Wifi is not the problem, and all other applications such as iPhoto, WP, PS, etc work. It's only Safari that cannot hold the connection. I want the downlevel version back so I
-
Hello all there, I am developing application like a mail application in iphone. Now i want to make same UI like mail application. All other things are clear. But i am not able to understabd that how to implement recipient field. I think that can be d
-
When support raw for sony nex 6?
-
Problems downloading a business package from Portal Content Portfolio
I had problem downloading the following business package from Portal Content Portfolio: Business Package for mySAP CRM Business Productivity Pack (60.1). Thanks,