Crystal Report with text(csv) data file, unable to connect on deployment.

Hi
I have a crystal report that connects to a text file using (Access/Excel DAO).
Now I wrote a C# .net code that loads this report and change the file name to the text file to a different file
using table.TableName and  table.Location to the new file and location,
then I do applyLogonInfo.
This worked perfectly on the machine where I developed my report and code but when I put the
files to a different machine where I need to deploy the reports, I get the following error.
Unable to connect: incorrect log on parameters.
   at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetTa
bleLocation(ISCRTable CurTable, ISCRTable NewTable)
   at CrystalDecisions.CrystalReports.Engine.Table.set_Location(String value)
   at ComponentCalcsReport.GenerateCrystalReport.getReportInPdf(String reportfil
e, String fileName)
I have done the following on the deployment machine.
1) I have installed the CR_runtime libraries required to be able to run crystal report applications.
2) I have put my .rpt file and the .csv database files in the correct folder.
3) I have put my exe file on the machine.
I run it from the command line.
Am I missing something like registering the DAO or creating a DSN explicitly?

Hi,
After searching through the forums I found this nice document
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0225775-88c4-2c10-bd80-8298769293de?quicklink=index&overridelayout=true
Using it's steps, I found out that when I created the report file using CR, I had the data connection set as a path
on the D drive. But the client/deployment machine did not have a D drive and hence the path to which the database was
pointing to. Therefore, the error "cannot connect to database" since the database name was pointing to D:pathToData
When I created a report that was on the C drive and it's data connection was also made from C drive then the same report worked fine on the client machine. I had to make sure that on the client machine I set up the exact same folder structure as the development machine's (i.e. C:pathToMyDataandReportFolder).
I tried using the setConnection function to change this path at run-time but did not succeed.

Similar Messages

  • Crystal Report with text(csv) data file, can we set it as input parameter?

    Hi,
    I am a new user of Crystal Reports 2008.
    I have created a report with charts in it. The input data comes from a csv text file.
    Can I set the name of this text file as an input parameter?
    as I need to generate 44 similar reports with different text filenames(and data)?
    Thank you.
    Regards

    Brian,
    Thanks much.
    I did exactly what you said.
    Just to see any change, I first gave a bad report file name just to see if I am accidentally pointing to a different file,
    but I got an error saying report not found.
    Then I renamed my original datafile name and generated a report and it still generated one without giving an error.
    Then I also gave a junk name to the logoninfo and printed that name, the new name was assigned to logoninfo, but the code did not error out.
    It ended up generating the report.
    Now here is what I think is happening,
    1) The save data in report option seems to be still on even though I have turned it off in 2 locations
    a) file -> Report Options
    b) file -> Options -> Reporting tab.
    2) For some reason the logoninfo is getting ignored as well.
    Since I did not see any answers yesterday I posted a link to this thread on the .Net forum
    Crystal Report with text(csv) data file, can we set it as input param? C#
    and Ludek Uher says that I am connecting to the text file via a DAO database engine and so need to use the same code for changing the text file as for changing an Access database.
    But the link he gave me tells me to try the same thing that we have been trying..
    Here is my plan,
    1) I will first try and find out why my save data with report option is still on ( but it shows off in Crystal ).
    2) why is LogonInfo getting ignored.
    Meanwhile any suggestions from anyone are welcome.

  • Crystal Report with text(csv) data file, can we set it as input param? C#

    Hi,
    I am new to the forums and posted a question which belonged to the .net - SAP Crystal reports group.
    Can someone help me with my problem? following is the thread that I have started.
    Crystal Report with text(csv) data file, can we set it as input parameter?
    Thank you in advance.

    Looking at the original thread, you are connecting to the text file via the DAO database engine:
    "I added the text file as follow, new connection -> Access/Excell (DAO) -> select the file and the database type as text"
    Thus I would use the same code for changing the text file as for changing an Access database. See Kbase [1218178 - Error: "Logon failed" when connecting to Access database in .NET application|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313338333133373338%7D.do] for more information. If that does not work, you may want to consider connecting via ODBC or feeding the data from the text file to and ADO .NET dataset and pointing the report at the dataset.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • How to design crystal report with web service data source?

    I want to design and run a Crystal Report 2008 against my ADO.NET DataSet from web service method.
    I choose New Report, for Data I choose XML, then "Use Web Data Source" hit next, then choose "HTTP WSDL URL" I enter http://localhost/RDWS/Service.asmx?wsdl, hit Next, I leave HTTP username and HTTP password blank. Then I see the Services, Ports and Methods screen. Services: Service, Ports: ServiceSoap, Methods: CustomerOrdersDataSet
    When I click Finish, I get Logon Failed, Details, Schema file is invalid. error:Element Schema@htttp://www.w3.or/2001XMLSchemal not found.
    How can I get this to work?

    The native XML driver is incompatible with ADO.NET DataSet XML.  The specific issue is that the driver cannot handle the recursive definition on "Schema" that the .NET DataSet XML uses.
    The workaround is to create a .NET class that Web References, invoke the Web Service method for the DataSet, then returns it. 
    Use the ADO.NET (XML) driver in Crystal Report to consume the .NET data source.
    Note - when you deploy your report, ensure you deploy the DLL for the .NET class you've created.
    Sincerely,
    Ted Ueda

  • Schedule a report with the system date imbeded in the file name

    Hello,
    Could anyone tell me how I can schedule a crystal report with the system date imbedded in the file name (FileNameYYYYMMDD) through BOE?  When I scheduled the report through BOE, I gave a file name and selected Attach Date Time, but the file name is coming out slightly differently and with the time imbedded as well (FileNameYYYY-MM-DD-HH-MN I think). Is there a way to change the default system date time format in BOE so that the date stamp comes out the way we want it?
    Thanks!

    %SI_STARTTIME% will add the time the report ran too.
    Adding onlt the date will necessarily have to be done via the appropriate SDK.

  • Failed to Load database information - Crystal report with XML as datasource

    Hello Friends:
    I am getting the attached error when i try to load the Crystal Report with XML as data source.
    I have designed the crystal report with the sample XML provided with XSD schema (PFA I have attached the XML and XSD). It is working as expected on design time. But it is failing when I load it from C# code.
    Note: I have referred the following DLLs of version 13.0.2000.0 in my sample application.
    CrystalDecisions.CrystalReports.Design.dll
    CrystalDecisions.CrystalReports.Engine.dll
    Please let me know what should be done in order to resolve this.
    Thank you!

    All I know is that you are using 'SAP Crystal Reports, Developer Version for Visual Studio .NET". No idea what service pack or what version of .NET...
    So. make sure you are on SP 9:
    SAP Crystal Reports, developer version for Microsoft Visual Studio: Updates & Runtime Downloads
    Search for KBA 1525432 (search box is in top right corner) and follow the instructions there.
    Remove your reference to CrystalDecisions.CrystalReports.Design.dll
    Add the following references:
    CrystalDecisions.Shared
    CrystalDecisions.ReportSource
    CrystalDecisions.Web (if web app)
    CrystalDecisions.Windows (if win app)
    I'd also recommend commenting out the export code for now; one step at a time. Get it to work in the viewer, then move on... No Big Bangs
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Unable to save the Crystal Report with Dynamic paramters in Enterprise

    Hello,
    We are not able to save our Crystal Report with dynamic parameters in Enterprise, Error message as follows :
    "Failed to read data from report file C:\DOCUME1\...\crw{...}.rpt. Reason : Failed to read parameter object"
    CR Developer Version 12.0.0.683
    help us in this regard..
    thanks,
    Narasimha Murty

    Hello,
    The error message occurs because the user or group who created the LOV does not have the appropriate rights in Business View Manager.
    Try this hope its helps
    To resolve this issue follow the steps,
    1.Log on to Business View Manager as administrator.
    2.Click View > Repository Explorer.
    3.Right-click Dynamic Cascading Prompts. Click Edit Rights.
    4.Click the appropriate user or group receiving the error.
    5.Click the Granted option for the right to View, Edit & Set Security rights.
    6.Click OK. Close Business View Manager.
    The user or group is now able to save a report with dynamic parameters to Enterprise.
    Regards,
    Vinay

  • SQL Loader - CSV Data file with carraige returns and line fields

    Hi,
    I have a CSV data file with occasional carraige returns and line feeds in between, which throws my SQL loader script off. Sql loader, takes the characters following the carraige return as a new record and gives me error. Is there a way I could handle carraige returns and linefeeds in SQL Loader.
    Please help. Thank you for your time.
    This is my Sql Loader script.
    load data
    infile 'D:\Documents and Settings\user1\My Documents\infile.csv' "str '\r\n'"
    append
    into table MYSCHEMA.TABLE1
    fields terminated by ','
    OPTIONALLY ENCLOSED BY '"'
    trailing nullcols
    ( NAME CHAR(4000),
    field2 FILLER,
    field3 FILLER,
    TEST DEPT CHAR(4000)
    )

    You can "regexp_replace" the columns for special characters

  • Is it possible to export the out put of Crystal report into text file?

    Hi All,
    Is it possible to export the out put of Crystal report into text file?

    Hi
    Yes, Go to File --> Export --> Export Report --> Under Format select TEXT & select the destination as "Disk file"(defaultly selected)
    Give the proper details as per your requirement for "Characters per inch" & "Number of lines per page" & click on 'OK"
    In "Choose Export file" window, select the destination folder & provide file name. click on "SAVE"
    Regards
    Ashwini

  • Crystal report with filtering data.

    hi, i work on an add-on for creating crystal report with SAP B1 UI. Do somebody know how to do it. if possible please provide me the reference needed, way to create the crystal report, way to connect the crystal report to database.
    hope u guys can help me out. Coz i'm new to crystal report. Thanks for help...

    Hi hock,
    It is crystal report online documentation.
    <a href="http://support.businessobjects.com/documentation/default.asp">http://support.businessobjects.com/documentation/default.asp</a>
    Hope it helps.
    Min

  • Crystal Reports with VS2005 - Load Report failed Error....

    Post Author: rajeshvijayan
    CA Forum: Older Products
    Hi,
    I am running Crystal Reports viewer on IIS6.0 and windows server 2003, which was installed using the redistributable package that comes along with Visual Studio 2005. We open these reports through a web based application 1 which is run on a different application pool on IIS. We have about 3 to 4 other web applications runing on the same IIS. All the other Web applications are working fine.
    This  web application 1 has 2 parts - one is the normal data display quiries from the back end SQL server 2005 and the other is the Crystal Reports which also quires data from SQL Server 2005. At times i find that these reports all of them throw an error - Load Report Failed. At the same time the Part 1 of this application does work fine in showing the data that is queried from the database. Moreover at this stage, I dont find any errors in the Event viewer. If i restart this application pool alone, the reports starts working fine again.
    I had gone through a few of the news groups and have made all the necessary permission related changes like the TEMP Folder, ASP.NET temporary folder, the folder in which the crystal reports is placed etc but still the same error throws up after some point in time. Wanted to know if there is any special configuration required on the Application pool when it comes to Crystal Reports. We have bout 10 to 15 users using this application for testing and it only throws this error at times and not always.
    Looking forward to any kind of solution from your side.
    Regards
    Rajesh

    Post Author: mikeeby
    CA Forum: Deployment
    Yes I too have been fighting this problem. I was using a XML Data file and schema file for my u201Cdatabase templateu201D in the report. I would then run my query using the .NET SQLClient then fill the report with my dataset table using the SetDataSource method from the ReportDocument object.
    I tried both embedded and runtime loaded reports all worked fine on my development machine but would NOT work on my production server. I use all the server installs, played with user rights, registering DLLu2019s still nothing.  I went as far as creating a winform app to fix the problem. I then had exactly the same problem, I was catching the error and it originated from the viewer control in both winform and webforms.
    What finally worked for me was to attach to the database using OLE DB instead of XML/schema (xml/xsd) datasource then pasting my SQL Query into the database connection command this gave me the fields to build the report. I actually used the u201CSet Database Locationu201D Dialog in Crystal Reports so I didnu2019t have to redesign my report. This dialog works very weird but I managed to figure it out. I then used an embedded report and all seem to be well. I think there is a problem with the Crystal Reports .NET Server Install and Merge Modules used with .NET with XML files, but I cannot be sure, all I know is this worked for me.
    I am concerned that if my database server is moved or renamed my report might break because the server connection is embedded in the report, but for right now it is working. I thought that was the reason for using the xsd file was to eliminate the dependence on a server connection in the report.
    Good luck and I hope this helps you fix your problem too. If it does please let me know I have see so many reports of people asking questions about this problem and it seems like most are left hanging.
    Mike

  • Sub reports In Crystal reports XML as a data Source

    Hi,
    I am facing one problem related to Sub reports functionality in crystal reports as XML as a data Source. We are using CrystalReports XI for this.
    I was generated PDF's using crystal reports from ruby on rails, by using the JAVA API to produce the PDF by taking the XML,XSD,and RPT files as parameters. I  succeed in this case
    and the way we are communicating with JAVA API using  from my Ruby on Rails application by the following link.
    http://rorataspire.wordpress.com/2008/06/13/how-to-integrate-crystal-reports-with-ruby-on-rails/
    Right Now my problem is as follows.
    The problem with the sub reports generation from  crystal reports.  We had one main report file(RPT), In that we are using the Sub reports,for that sub reports need to parse the XML's and XSD's dynamically based on the report encountered on the main(RPT)file,but to send more than one XSD's and XML's dynamically  based on the  sub report, to the JAVA API from Ruby on Rails application I am not succeeded.  So as a result  PDF with the Dynamic data for Sub reports is not fulfill.
    Your help is appreciable, Thanks in advance.

    Is this a coding question or a data source format question?
    Sincerely,
    Ted Ueda

  • Passing parameters from vb form to a crystal report with stored procedure

    Can someone give me an idea how to use data inputted on vb form to be use as basis of crystal report generation which loads data from a stored procedure. Stored procedure has parameters that was also set in the crystal report. viewing on crystal report is ok but i am having difficulty running the report from vb.

    Hi John,
                  If Not CRRpt.ParameterFields("AgeType") Is Nothing Then
                        CRRpt.ParameterFields("AgeType").CurrentValues.Clear()
                        Dim ParamValue As new CrystalDecisions.Shared.ParameterDiscreteValue
                        ParamValue.Value = AgeType.ToString 
                        CRRpt.ParameterFields("AgeType").CurrentValues.Add(ParamValue)
                    End If
    Note that the ParamValue.Value should be assigned with exact same data type as you declared it in CR.
    If it is string, Convert your Variable to string first.
    If it is date, make sure you are passing a date variable.
    and so on...
    Regards
    Edy

  • Crystal Report with Windows Vista Home Premium

    (Why I added Code and my paragraph becomes dis-order??)
    Dear all,
    This is my first post in this forum. So, if I put at wrong section, Mod please kindly move my thread.
    Here is what I'm facing now.
    I have an application which is coded in Visual Studio 2005 (VB.Net) using SQL Server Express 2005 edition. This project include report sections which I used Visual Studio built-in Crystal Report. (My development PC is running XP Pro edition)
    I already tested it in Windows XP Professional Edition (this is a clean OS no programming or other tools installed in it) and it worked well and it display the report accordingly and correctly.
    But when I tested it in Vista Home Premium, it got error and I can't run all reports. I juse ADO.Net connectivity to connect between Database and Crystal Report.
    Below is a sample which is provided by Crystal Report under my C:\program files\Microsoft Visual Studio 8\Crystal Reports\Samples\en\Code \ VB_Win_Data_DataSets. The way I connect is follow this project standard. Even the sample project got this error in Vista Home, I think it may be Vista problem or Crystal report problem. It will not my connection problem.
    Because my customer PC is running Vista Home Premium, now I'm in dead end. Kindly please tell me what should I do to solve this case.
    Thanks.
    Here is the error it pop up. (this is just a portion of the error. the others are "Loaded Assemblies" portion).
    System.Runtime.InteropServices.COMException (0x8002000B): Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
       at CrystalDecisions.ReportAppServer.DataDefModel.FieldsClass.get_Item(Int32 Index)
       at CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinitions.get_Item(Int32 index)
       at CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinitions.get_Item(String fieldName)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetParameterValue(String name, Object val)
       at VB_Win_Data_DataSets.Form1.ConfigureCrystalReports() in D:\TutorialSampleCodeProjects\VB_Win_Data_DataSets\VB_Win_Data_DataSets\Form1.vb:line 16
       at VB_Win_Data_DataSets.Form1.Form1_Load(Object sender, EventArgs e) in D:\TutorialSampleCodeProjects\VB_Win_Data_DataSets\VB_Win_Data_DataSets\Form1.vb:line 23
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    Edited by: scsfdev on Jun 28, 2009 8:33 AM
    try to add error code. but my paragraph seems to disorder when I add
    blog. don't know why.

    Hi Ludek,
    Sorry, I was on vacation and didn't notice the email alert.
    I didn't deployed yet. Because I want to make sure it runs OK on vista, I didn't create a setup or deploy project in .Net.
    I just build and copy the entire bin folder and required data to Vista PC and test it.
    then it hits this error. (All other parts of my program is working well like CRUD data to DB.)
    (I did install this file "crredist2005_x86.msi" on Vista PC.)
    Thanks for all your support.
    I still didn't solve this case.
    What I do now is I change the way I connect to Server for all Crystal Reports.
    At first I use Dataset and map it to Server.
    Now I directly connect to it without pass through dataset. (Use OLEDB SQL Server.)
    But I still want to know how to solve this case.
    If anyone know it. Please share your idea and experience here.
    thanks.

  • FND function to create .csv data file on client machine?

    Hello All,
    I am trying to create a concurrent request which when run by the user's creates a .csv file with data. I created a procedure in the database which run's when they run the conc.request.
    However is there any FND function or anyother function available that creates the data file on the client machine (either in their 'C:\') or in a share drive etc?
    Currently through the procedure, I am able to write the .csv data file to a unix directory to which users do not have access.
    Thanks,
    Chiru

    Chiru,
    Several options for you to consider are :
    1. If you want to have the csv on client machine: Make the program to create the csv in server with a constant name, eg : test.csv and create a dos command in client's machine that is could FTP to server, rename the existing csv file in client's machine and get test.csv from server.
    2. If you want to do in share drive : As long as the share drive exists in PC that can be used for FTP, you can create unix host script that can FTP the file to the windows server. For instance, create a generic unix host script that accepts parameter such as filename, and server destination, destination folder, unix login ,password, etc. This program will run in a request set after your concurrent program. If you search google I'm sure you will find samples of unix script that does this kind of thing.
    3. As per what Kevin said ,another options is to send the csv file using email to the recipients.
    HTH

Maybe you are looking for