Can ODBC configuration data be stored in a Crystal Report?
Post Author: Gary W
CA Forum: Crystal Reports
We've been running some SQL statements in Access pulling data from a server/database. I decided to see if I could do the same thing in a Crystal Report with the intention of scheduling the report to run in our scheduler. I set up the ODBC on my workstation. I connected to it for my new report and used Add Command to enter the SQL statements. I added the command to my report and it ran fine. However, whenever I open the report to run it again I have to enter the password (which was initially entered when I set up the ODBC) to get it to run. I'm guessing this has something to do with the security on the server and, that said, I'm not going to be able to change it. Is there any way I can store the ODBC connection data including the user id and password in my report so it's there when needed? I can do this in Access, but can't figure out how to do it in Crystal Reports.
I use Crystal Reports XI.
In Access the line I use is:
ODBC;Description=Employee Badge system;DRIVER=SQL Server;SERVER=pmc-rfd-ap19;UID=userID;PWD=password;DATABASE=OF_SiteData
where userID and password are replaced with the actual values.
Thank you.
Post Author: V361
CA Forum: Crystal Reports
When you setup the connection in ODBC, Select the "Enter connection string and add the following (Substitute your connection information of course)
DSN=RPTPROD;Server=RPTPROD;User ID=USER;PWD=USERPASS
This should work.
Similar Messages
-
Using stored procedures within Crystal Reports
Hello all,
Background Information:
I am trying to teach myself how to execute a stored procedure within Crystal Reports. This is an aspect of Crystal that my work group has not utilized before and we're trying to gather information on the subject. We use Oracle to create and execute functions and procedures all the time, but I've never tried this within Crystal.
I use the "Add Command" functionality within Crystal on most of my reports so that I can taylor the sql to the report. I find this easier to do versus using the ODBC connection to the tables and writing the code through the Crystal Reports wizard. I also frequently use functions within these sql statements that are inserted in the Add Command.
What I'm trying to achieve:
I have a report that needs to run as a "trial", and then later as a committed "run". This is for a monthly billing system. Essentially, the user will run the report as the "trial", preview the data, make any necessay corrections, and then later, run the actual billing run. Within my application, the bills are not actually marked as "billed" until they are actually "billed', if that makes sense. As a result, the "trial" report will need to mark the bills as "billed", generate the report, and then rollback the data (so that the bills are not "billed". Once the actual billing reports are ran, the same report will run, but with a "commit" at the end of the report so that the bills are now "billed".
I'm trying simple tests and failing (i.e. taking baby steps to learn what capabilities Crystal has):
I created as simple of a procedure as I can envision. This procedure inserts the word "test" in one of my fields for a provided account number. When I try to run this procedure via Crystal (via New Report ->History->My ODBC Database link->Stored Procedures), Crystal asks for the account number parameter, as it should. But I then receive the error message:
Database Connector Error: '42000:[Microsoft][ODBC driver for Oracle]Syntax error or access violation'
The existing ODBC connection has work great for years and years to retrieve data from tables, but this is the first time I've tried to utilize procedures. Can anybody help? And can anybody explain what the Stored Procedures link is supposed to do? Am I going down the right path?
thanks,
NoelHello,
Make sure the Oracle client install path is in the PATH statement. And also make sure you are using an IN/OUT cursor. CR only reads the last SELECT statement. Search the Documents area on how to create a Stored Procedure.
Also, if you are using CR XI ( 11.0 ) then upgrade to CR XI R2 and apply all service packs ( SP 6 ). Go to this link: http://www.sdn.sap.com/irj/boc and download the trial version of CR XI R2 and use your XI keycode, then apply the patches which you can get to by clicking on the BusinessObjects tab above, then Downloads.
Direct link to the Trial version: http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx
It may fix your issue also.
Thanks again
Don -
Stored Procedure for Crystal Reports
Hi All,
I developed this test stored procedure to see wheather we could a stored procedure for crystal reports. It compiled without any problem, but when I run it, it gives me error message. Here is the stored Procedure..
CREATE OR REPLACE PROCEDURE WOLD1SIM.TEST_PROCEDURE(
TEST_CURSOR IN OUT TEST_PACKAGE.TEST_TYPE,
TEST_PARAMETER IN TEST_TABLE.ID%TYPE)
AS
BEGIN
OPEN TEST_CURSOR FOR
SELECT *
FROM TEST_TABLE
WHERE TEST_TABLE.ID = TEST_PARAMETER;
END TEST_PROCEDURE;
And
This is the error message..
ERROR at line 2:
ORA-06550: line 2, column 1:
PLS-00201: identifier 'TEST_PROC' must be declared
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored
I have created the package sucessfully.
I was wondering If any one of you can advice me where I am making the mistake.
Thank youCREATE OR REPLACE PROCEDURE WOLD1SIM.TEST_PROCEDURE(TEST_CURSOR IN OUT TEST_PACKAGE.TEST_TYPE,
TEST_PARAMETER IN TEST_TABLE.ID%TYPE)
...you have 2 parameters in your procedure WOLD1SIM.TEST_PROCEDURE(). you should also use two parameters when you execute the procedure. -
Error connecting to stored procedure in crystal report
Hello
I'm using crystal reports 2008 with the latest service pack.
i'm trying to access stored procedure using the mysql jdbc driver 5.17. The crystal report has been designed which works fine with a login that created the stored procedure but when i try to run with another login that will used to run the crystal reports
The login has access to execute the stored procedure but entered in the crystal report it complains about
"User does not have access to metadata required to determine stored procedure parameter types. If rights cannot be granted, configure with {noAccessToProcedureBodies=true} to have driver generate parameters that represent INOUT strings irregardless of actual paramter types"Hi Sharon
Thanks for response.
I have checked that the user has permission to read and write. When i try and execute the stored procedure in the database by login with the user, it runs fine.
When i try and call the stored procedure from crystal reports it throws that error message.
regards
Naresh -
How to get data from function module in crystal report
Hi,
I installed Crystal Reports 2008 and BO SAP Integration kit for CR.
I connected successfully to SAP system from CR but unable to get the data into Report ...
But data is present in function module.
Could you please tell me what may be the reason ...!!
Thanks
RaghavendraHi,
I connected successfully to SAP system from CR but unable to get the data into Report with all the Input parameters and data is present in function module.
Note: - If we take Start date as input parameter in Crystal report data is coming for single parameter, whereas we take input parameters like Partner function, Region and Customer - we are not getting data. (These fields we created parameters in Crystal report)
In Function Module IMPORT Parameters are below mentioned and Export parameter is Blank
Start Date (Mandatory field)
Partner Function (Mandatory)
Region
Customer
Please let us know if required any information.
Regards,
Raghavendra -
Calling a stored procedure in crystal report
I am using crystal reports 11 on the front end connected to mssql server in the back end and i have a stored procedure written in mssql and has a view created. i want to know how do i call a stored procedure from crystal report when i run my report and how to pass the values from my prompt to the stored procedure
As long as the stored procedure returns a result set, the procedure should look and act just like table and the report will know what parameters are need to execute the procedure. If this does not answer your question, please provide more specifics.
-
Can't configure date/Time Change by command in W7
Hello,
I need to synchronize all my computers, we got a program who does that (and it works), but not on Windows 7.
Doing a research I found that is for the administrator privileges. I assume there are two ways for solving my issue.
1) Launch the command as administrator.
2) Change the privileges of who can change the date/time.
About 1), I haven't found nothing of how I can launch it as administrator by program. I know I can do right click and "Launch as administrator" but I need to do it without a mouse and keyboard.
About 2), I already did this: Edit Group Policy/Local Policy/User Rights Assignment/Change the system Time. And I set it to "All Users". But it doesn't work.Yes, I reboot after changes.
Any help will be appreciated.
Thank you.Hi Gustavo,
If you mean to synchronize time in Windows 7 and assume we are in a domain environment, the first blog shared by britishdhez is a good reference.
For more information, see:
Configure a client computer for automatic domain time synchronization
http://technet.microsoft.com/en-us/library/cc758905(WS.10).aspx
I am not sure which software you are using, if it won't work, please consider contact the vendor support. About running command with admin rights, you may have insterests in the following blog:
Creating a Self-Elevating Script
http://blogs.technet.com/b/elevationpowertoys/archive/2010/06/20/creating-a-self-elevating-script.aspx
If any further help needed, please feel free to post back.
Best regards
Michael Shao
TechNet Community Support -
Unable to get the data from ms sql stored procedures using crystal report 10
Dear,
I am using the crystal report 10 and MS SQL 2000. I created stored procedures and after making the connection, i am unbale the data from that procedure. When i run stored procedure on MS SQL server it works fine.
Please help me.
Best Regards
Pankaj
[email protected]Dear,
I am using the crystal report 10 and MS SQL 2000. I created stored procedures and after making the connection, i am unbale the data from that procedure. When i run stored procedure on MS SQL server it works fine.
Please help me.
Best Regards
Pankaj
[email protected] -
Stored Procedure in Crystal Report
Dear Experts,
I have created one Stored Procedure where Baseentry of invoice is the parameter. Now want to design a crystal report based on that. How to proceed? Please guide stpwise. I am using ODBC connection. And in Crystal report also the parameter should be the baseentry. How to integrate?
Regards,
Akash A.Hi Akash,
Using a Stored Procedure in Crystal
And with that little introduction, we finally get to the point of this articleu2014using stored procedures to simplify data queries for Crystal. Although we canu2019t make the above query into a database view, we can incorporate it into a stored procedure that returns a result set and then feed that stored procedure into Crystal no differently than we would feed a query based on views or tables.
Since stored procedures are so different between Oracle and SQLServer, weu2019ll first show you how to use a stored procedure in Crystal, given that it is already created. Then, weu2019ll separately show you how to create the procedure in SQLServer and Oracle.
When creating a Crystal Report, make it like any other report, except for the following.
1. When specifying a data source, instead of selecting Tables or Views, select Procedures, and then select the newly created procedure.
2. Crystal will immediately prompt you to enter values for the procedureu2019s input parameters. Do NOT do so; rather, check u201CSet as Nullu201D and click OK so Crystal will know to prompt for these as input parameters each time the report is run.
3. If you are using SQLServer, click on the Field Explorer and rename the fields to remove the u201C@u201D prefix that Crystal automatically adds to conform to SQLServer parameter/variable naming conventions. (This is not necessary if you are using Oracle.)
Then finish the report as you normally would. In our example, since all of the hard work was done in the query embedded inside of the stored procedure, the work in Crystal is trivial.
or check http://www.pdssoftware.com/newsletter/mar07/page6.htm
http://www.crystalreportsbook.com/Forum/forum_posts.asp?TID=2143
Thanks,
Neetu -
Question - Best practice data source for Vs2008 and Crystal Reports 2008
I have posted a question here
CR2008 using data from .NET data provider (ADO.NET DATASET from a .DLL)
but think that perhaps I need general community advise on best practice with data sources.
In Crystal reports I can choose the data source location from any number of connection types, eg ado.net(xml), com, oledb, odbc.
Now in regard to the post, the reports have all been created in Crxi 6.3, upgraded to Crystal XI and now Im using the latest and greatest. I wrote the Crystal Reports 6.3/ XI reports back in the day to do the following: The Reports use a function from COM Object which returns an ADO recordset which is then consumed fine.
So I don't want to rewrite all these reports, of which there are many.
I would like to know if any developers are actually using .NET Class libraries to return ADO.NET datasets via the method call or if you are connecting directly to XML data via whatever source ( disk, web service, http request etc).
I have not been able to eliminate the problem listed in the post mentioned above, which is that the Crystal Report is calling the .NET class library method twice before displaying the data. I have confirmed this by debugging the class lib.
So any guidance or tips is appreciated.
ThanksThis is already being discuss in one of your other threads. Let's close this one out and concentrate on the one I've already replied to.
Thanks -
How can i export excel 2003(Version 11) from Crystal Report 8.5
how can i export report to excel 2003(Version 11) from Crystal Report 8.5
We i can only see below formats
Acrobat Format (PDF)
Character-separated values
Comma-separated values (CSV)
Crystal Reports (RPT)
Crystal Reports 7.0 (RPT)
Data Interchange Format (DIF)
Excel 5.0 (XLS)
Excel 5.0 (XLS) (Extended)
Excel 7.0 (XLS)
Excel 7.0 (XLS) (Extended)
Excel 8.0 (XLS)
Excel 8.0 (XLS) (Extended)
HTML 3.2
HTML 4.0 (DHTML)
Lotus 1-2-3 (WK1)
Lotus 1-2-3 (WK3)
Lotus 1-2-3 (WK5)
ODBC - AddressBook
OBDC - CRGUP
OBDC - CROR8V36
OBDC - CRSS
OBDC - CRXMLV36
ODBC - dBASE Files
ODBC - Excel Files
ODBC - MS Access Database
ODBC - Visio Database Samples
ODBC - Visual FoxPro Database
ODBC - Visual FoxPro Tables
OBDC - Xtreme Sample Database
Paginated Text
Record style (columns no spaces)
Record style (columns with spaces)
Report Definition
Rich Text (Exact Format)
Tab-separated text
Tab-separated values
Text
Word for Windows document
XML
there is no format with "Microsoft Excel 97-2000 (XLS)"
what should i do? -
Failed to retrieve data from the database using Crystal Reports XI R2
I am using Crystal reports XI R2 and using the Universal Web Connector (connecting to Coghead). When I put some some of the fields from the database and run Preview I get "Failed to retrieve data from the database." . Where is this message coming from and how can I track down what the issue is?
Hi Jamie,
When you are trying to Browse Data of a field it is not poping up any window menas, it is unable to interact with database and get the data from database.
Try to create a new report using ODBC with Xtreem Sample Database. If you get the data in your report without any error then your connector is not working / unable to pull the data into your report.
You can find the supported platforms document in below link
http://support.businessobjects.com/documentation/supported_platforms/xi_release2/default.asp
Thanks,
Sastry -
How to supress/Minimise space if no data is given in a crystal report
Dear members,
I have designed a report through crystal report and in that,i have a field namely remarks in group section.
during the generation of report if there is no remarks given there is a empty space shown in that place. which i need to avoid. please can anyone help me in this regard as how to minimize the space if no data is given to the field of remarks.
Thanks to all,
Venkatesh.RHi Venkatesh.R,
Right click on the section you want to supress and check on the box labelled Suppress blank section.
I highly suggest you search Crystal Reports Help before posting questions like this. Simply press the F1 key and the help menu will appear.
Thank you
Don -
How to use stored procedure in crystal report for eclipse
Hi;
I am working on crystal report for eclipse 2.0 and trying to use stored procedure in report .It is created from Oracle but it is not showing any dependencies
CREATE OR REPLACE procedure ACT_DB.getCostTransferDetails
p_In_Contract_ID varchar2 DEFAULT '*',
p_In_Status_ID varchar2 DEFAULT '*',
p_In_COST_TRAN_DATE varchar2 DEFAULT '*',
p_In_DEPT_ID varchar2 DEFAULT '*',
p_In_PROJECT_ID varchar2 DEFAULT '*',
p_In_EMPLOYEE_ID varchar2 DEFAULT '*',
p_Out_CostTransfer_Cusor OUT COST_TRANSFER_PACKAGE.COST_TRANSFER_TYPE
AS
BEGIN
OPEN p_Out_CostTransfer_Cusor FOR
SELECT
header.cost_tran_id,
header.cost_tran_date,
header.total_credit_amount,
header.total_debit_amount,
header.transfer_status,
header.updated_by,
header.added_by,
header.trf_over_ninety_days,
header.business_unit_id,
header.equip_approval,
header.batch_desc,
details.opr_unit_id,
status.status_id,
details.fund_code_id,
details.prgm_code_id,
details.class_id,
details.activity_id,
details.product_id,
details.status_id,
details.transaction_amount,
details.jrnl_date,
details.adjust_prcnt,
details.adjust_amnt,
details.details_equip_approval,
details.detail_desc,
details.account_id,
details.project_id,
details.dept_id,
details.contract_id,
details.reason_code_id,
details.jrnl_id,
employee.f_name,
employee.l_name,
employee.employee_id,
project.project_id,
project.project_status,
--header.transfer_status,
contracts.contract_desc
FROM header, details, status, employee, department, project, contracts
WHERE (header.cost_tran_id = details.cost_tran_id)
AND (header.cost_tran_date = details.cost_tran_date)
AND (header.transfer_status = status.status_id)
AND (department.dept_id = details.dept_id)
AND (department.dept_id = employee.dept_id)
AND (project.project_id = details.project_id)
AND (contracts.contract_id = details.contract_id)
AND (details.Contract_ID = p_In_Contract_ID OR p_In_Contract_ID ='*' )
AND (header.TRANSFER_STATUS = p_In_Status_ID OR p_In_Status_ID ='*' )
AND (TO_CHAR(details.COST_TRAN_DATE, 'MM/DD/YYYY') = p_In_COST_TRAN_DATE OR p_In_COST_TRAN_DATE ='*' )
AND (details.DEPT_ID = p_In_DEPT_ID OR p_In_DEPT_ID ='*' )
AND (details.PROJECT_ID = p_In_PROJECT_ID OR p_In_PROJECT_ID ='*' )
AND (header.ADDED_BY = p_In_EMPLOYEE_ID OR '*'=p_In_EMPLOYEE_ID )
Can any another way to make procedure
Thanx
Regards ,
AmolHi Amol,
Are you able to execute your stored procedure from oracle?.
- If "Yes" then use the Crystal Report XIR2 Designer to create the report.
- Import this report in the Crystal Report For Eclipse Workbench.
- The latest version for Crystal Report For Eclipse is SP1.
Please let me know the results.
Thanks,
Neeraj -
How to pass parameter from 1 stored procedure to another stored procedure inside crystal report
Hi
I have several stored procedure in my Crystal Report. I am wondering if it is possible for me to pass a parameter to one of the stored procedure and to use the result of that stored procedure E.g. CustomerCode. To another 2 stored procedure to generate the report dynamically?
I have 3 stored procedure
The 1st one is used to gather information and process the calculation
another 2 stored procedure is used for generate the graph and both of them required to take 2 parameters. The 1st stored procedure will require 1 parameter (E.G. Reference Code) and will return a set of information including the data that could be use on the other 2 stored procedures.
After I added these 2 stored procedure, it requires me to pass 3 parameters to the report. I would like to know if I could only pass the Reference Code for stored procedure 1 and use it to retrieve the information for the other 2 parameter?
Thanks in advance
ChiHi Chi
To pass parameter from 1 stored procedure to another stored procedure, you will have to create sub report. In your case you will have to create 2 sub reports for 2nd and 3rd stored procedure and link those sub reports with the main report using Reference Code field in order to pass the values.
After creating the report when you will refresh the report, it will ask 4 parameters, one parameter for main report, one for the first subreport and two for second subreport to fetch the data correctly.
Regards
Poonam Thorat.
Maybe you are looking for
-
Satellite U400-15E - Upgraded to Windows 7 32-bit now NO sound through HDMI
I upgraded from vista to windows 7 32-bit, now i have no HDMI device shown under playback devices, i have installed new windows 7 drivers but still no luck. Under device manager/sound a HDMI device is shown as enabled and when connected to an externa
-
Transferred certain files to my new Mac from my old computer via memory stick.Can open PDF files but not xlr,aww or wps ones.The important ones are in xlr format.Is there a solution please?
-
Hello, I don't know what is happened but pacman is no longer on my system! alain ~ $ pacman bash: pacman: command not found I don't have a clue what has happened and I cant even seem to install pacman from the source code. Please help Thanks!
-
WHILE SYNCHING iPHONE 3 WITH iTUNES. MY 1700 CONTACTS VANISHED FROM iPHONE AND iTUNES. I AM RUNNING AROUND TO GET IT RESTORED. ANYONE THERE WHO COULD HELP. HOW CAN I RESTORE AND GET MY CONTACTS BACK.
-
Hi Guys, I need some help. I want to increase and then decrease a number continuously. for example: 0,1,2,3,4.....179,180, 179, 178,...3,2,1,0,1,2,3....179,180, etc.. Any ideas?? Regards! Sam Solved! Go to Solution.