How to feed data into crystal reporte with "SQLQuery" method in c#?

Hi there,
I've an old app that was written in VB with some crystal reports from Crystal Report 7.
Now I need to upgrade this old app into c# with newer version of Crystal Report, so we decide to go for VS2010.
I can open the report template in the VS2010 without any problems.
But I'm running into some issue here:
the old report has multiple tables from a SQL db as the connection. Each table has a PK to each other.
and the VB code feed the data like below:
MainForm.CrystalReport(1).SQLQuery = SQLString
I couldn't find any reference for "SQLQuery" method in the C#, is there such command exist?
Thank you in advanced,

Thank you Ludek. Looking into the info you provided.

Similar Messages

  • Step- by- Step on How to Load Excel data into Crystal Reports?

    Hi Friends,
                      Can anyone send me a Step- by- Step on How to Load Excel data into Crystal Reports? Pls help me. Thanks in Advance.
    Vijay

    It's also important to 'prep' the excel file prior to connecting to it.
    Give the data tab a meaningful name
    Make sure the column headers are unique and that every column has a header
    Delete any blank tabs
    If you have trouble with Excel changing the data type of a field (say, a social security number you want to be a string value rather than a number so you don't lose leading zero) an alternative would be to save the spreadsheet file as a CSV, create a schema.ini to specify the data types for each column (example below) and use the same steps to connect except instead of choosing Excel 8.0, scroll to the bottom and choose Text.  You have to make sure the CSV file is in the same folder as the schema.ini file that defines the columns.
    Schema.ini example:
    200912PUSD.csv
    ColNameHeader=True
    Format=CSVDelimited
    MaxScanRows=25
    CharacterSet=OEM
    Col1=SSN Char Width 9
    Col2=LAST_NM Char Width 25
    Col3=FIRST_NM Char Width 25
    Col4=DOB Date
    Col5=STDNT_ID Char Width 10
    Col6=SORTKEY Char Width 10
    Col7=SCHOOL_NM Char Width 30
    Col8=OTHER_ID Integer
    Col9=GRADE Char Width 2
    The filename in the first line needs to have the []  brackets around it, but I couldn't get it to display in this forum correctly.
    Edited by: Eric Petersen on Jan 27, 2010 9:40 AM

  • How to create user editable Crystal Report with dynamic dataset

    What I would like to achieve:
    A program loads a report in runtime updates list of database fields (possibly includes sample data), open report in "Crystal Reports 2011" (or 2008) where user customizes report and saves it. Later on the program loads the report, fills actualized data and displays it in .net report viewer.
    What I do:
    CrReport = New CrystalDecisions.CrystalReports.Engine.ReportDocument
    CrReport.Load(TemplateFilename)
    Dim Results As DataTable
    DataTable is filled from a database
    CrReport.SetDataSource(mResults)
    CrReport.SaveAs(NewReportPath, True)
    The NewReportPath is opened in the default program.
    What are the problems
    The report is open in preview mode (not in design).
    When the field is added to the report the designer asks for XML datasource on preview.

    The short answer is that it is not possible. I broke the question to other two: How to save a report that it opens without preview? and How to create user editable Crystal Report with dynamic dataset, where it is possible to find details. Key answer is Re: How to create an editable previewable report?

  • How do i signon into crystal report XI with server signon Account

    I have a signon account to connect to SQL Server 2005, but i cannot use the same signon account to signon into crystal report XI. Is there any special permissions that i need to set? But if i use the sa account for sql sever am able to signon without any error. What could be the problem.

    Thank you for your fast response, i really appreciate that.
    Am able to signon into the server in SQL 2005 with my signon credentials but cannot signon into the same server when am using crystal report. And for the connectivity, we are using OLE DB and not ODBC. Also, we've been using the sa account for a while now, it just last week that management decided we signon into crystal with our own signon credentials, which isn't working.
    Regards
    Henry Obeng

  • How to compare dates in Crystal Reports 2008

    Hello,
    I cannot figure out how to compare the dates in the Crystal reports.
    I need all dates that are in the future to be displayed with the green font.
    So in the formula for the font for this texbox I've tried to use different
    formulas like:
    If DateDiff("d", CurrentDate, {DevelopmentTracking_SELECT.Anticipated}) > 1
    Then
         crGreen
    or
    If {DevelopmentTracking_SELECT.Anticipated} > CurrentDate Then
         crGreen
    (where DevelopmentTracking_SELECT is the stored procedure, and Anticipated
    is a date field).
    None of them worked. All dates are treated like they were in the past
    comparing to the CurrentDate. If I reverse these formulas like:
    If {DevelopmentTracking_SELECT.Anticipated} < CurrentDate Then
         crGreen
    then all dates turn to green, otherwise they always stay black.
    What could be a problem here?
    I would appreciate your help.
    Thank you.

    OK, got it, thank you. It worked.
    However, I also need to use another field value which is not on the report, like this:
    If CurrentFieldValue < CurrentDate And {DevelopmentTracking_SELECT.Completed} = False Then
    crRed
    DevelopmentTracking_SELECT.Completed is not on the report.
    Is it possible to use it with the cross-tab?

  • How to input data into a table with columns?

    I am trying to input data into a table.  My table have 5 columns and an unlimited amount of rows.  I created a program in LabView that enters the data into the table but it enters all of the data in one row.  I would like to enter the first set of information into the first column, the second set of info into the second  column and so on.  I am including a copy of the program that I am working with.  I would like the number of runs to be put into the first column (it should count down like number 5 in first row, number 4 in second row, number 3 in third row, and so on).  I would like the applied voltage to be placed in the second column, and so on.  Any help or information will be greatly appreciated.  I am working with LabView Version 6.1 and 8.0.  I am submitting the vi from 6.1. 
    Attachments:
    FJ-PROGRAM.vi ‏68 KB

    Pondered,
    I looked at your code and I think you might be making things too complicated. I've included a very simple example that demonstrates how to write a 2D array of integers to a table. Hope you find this helpful. It is in LV 7.1.
    Chris C
    Chris Cilino
    National Instruments
    LabVIEW Product Marketing Manager
    Certified LabVIEW Architect
    Attachments:
    rows - columns.vi ‏17 KB

  • How to stop printing the crystal report with an alert message

    I am having a field called "APPROVAL" in my stored procedure with which I prepared the CR. I want that if the value in the filed is 'A' then only the crystal report should print else it should prompt with an alert message.

    Hi Sreejith,
    Check this helps you:
    Create an alert from "Report  -> Alerts -> Create or Modify Alerts" with below steps:
    1. Provide name of the alert (say Alert1)
    2. Click on X+2 in front of "Message" field and write the Alert message you want to display.
    3. Click on Condition button and write the condition If not({APPROVAL}='A') then true;
    The above Alert will prompt with configured alert message when {APPROVAL} field is not having value of 'A'
    Now, in a formula, write below content and display it where you want to display the APPROVAL field value:
    If {APPROVAL} = 'A' then
              {APPROVAL}
    This formula content will be blank if the value of {APPROVAL} is not 'A'
    Thanks,
    Raghavendra

  • How to get data from MS CRM into Crystal Reports

    Hello All,
    Can anybody tell me how to get data into   crystal XI reports with MS CRM.
    Thanks in Advance
    Ramesh

    First you should refer to the Rules of Engagement and then add more info.
    Start off by telling us what version of CR are you using and what is MS CRM?
    Thank you
    Don

  • 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]

  • 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.

  • Can anyone let me know how to integrate crystal reports with bi 7?

    HI all,
    Can anyone pls let me know the steps involved in integrating crystal reports with bi 7?
    thanks
    Pooja

    1.install BO client tools
    2. install crystal reports
    3.install sap integration kit
    once you install in above sequence you will be able to pull data from BW system.

  • How to load a web page into crystal report

    How can i load a web page into crystal report? pls help
    Thanks in advance

    Hi Sebastin,
    You can't open a webpage in your Crystal Report, because all webpages will be executed in browser only. If you insert any webpage link in any documents it will not open in the same document, it will open in browser.
    Hope this will help you
    Thanks,
    Sastry

  • How to use crystal report with php

    Hello every body
    can any body know how to use crystal report with php any helping material, code or tutorial for my problem ill be very thankful for helping me
    farooq

    Hello sir
    i am sudeep and i need to deploy crstal reports in php
    i want to integrate it in sugar crm (open source project(
    can u plz tell me how to do it
    i have written this code
    <?php
    //echo phpinfo();exit;
    $ObjectFactory= New COM("CrystalReports11.ObjectFactory.1");
    $crapp = $ObjectFactory->CreateObject("CrystalDesignRunTime.Application");
    //$crapp = new COM("CrystalRuntime.Application.10");
    $reportToRun="C:\Report4.rpt";
    $creport = $crapp->OpenReport($reportToRun, 1);
    //reportToRun=full path to *.rpt file
    $creport->Database->Tables->
    Item(1)->ConnectionProperties['User ID'] = $user;
    $creport->Database->Tables->
    Item(1)->ConnectionProperties['Password'] = $pass;
    //fomatType = integer 22=xls, 31=pdf etc
    $creport->ExportOptions->FormatType = $formatType;
    //type 1 is to output to a file I think 2 is email
    $creport->ExportOptions->DestinationType = 1;
    //location = full path to report output file
    $creport->ExportOptions->DiskFileName = $location;
    $creport->DiscardSavedData();
    $creport->Export(False);
    ?>
    thanks in advance

  • 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

  • How to insert data into two tables linke with foreign key..

    I have two tables
    1)EMP(emp_ID,username,emp_type_code)
    emp_ID is primary key, emp_type_code is a foreign key references emptype table.
    2)emptype(emp_type_code,emp_type_descripton)
    emp_type_code is primary key
    Could anyone help me ..how to insert data into EMP table. How to insert data into two tables linke with foreign key..

    CREATE TABLE "CATDB"."DWDIMUSER"
    "USER_ID" NUMBER(10,0) NOT NULL ENABLE,
    "SPECIALTY_ID" NUMBER(10,0),
    "FULLNAME" VARCHAR2(20 BYTE),
    "FNAME" VARCHAR2(20 BYTE),
    "LNAME" VARCHAR2(20 BYTE),
    "USER_SUBTYPE" VARCHAR2(20 BYTE),
    CONSTRAINT "DIMUSER_PK" PRIMARY KEY ("USER_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "CATDB" ENABLE,
    CONSTRAINT "DIMUSER_DIMSPECIALTY_FK" FOREIGN KEY ("SPECIALTY_ID") REFERENCES "CATDB"."DWDIMSPECIALTY" ("SPECIALTY_ID") DISABLE
    CREATE TABLE "CATDB"."DIMSPECIALTY"
    "SPECIALTY_ID" NUMBER(10,0) NOT NULL ENABLE,
    "SPECIALTY_NAME" VARCHAR2(100 BYTE),
    CONSTRAINT "DIMSPECIALTY_PK" PRIMARY KEY ("SPECIALTY_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "CATDB" ENABLE
    INSERT INTO DIMUSER (FullName, FNAME, LNAME, USER_TYPE, USER_SUBTYPE)
    SELECT DISTINCT
    Engineer AS FullName,
    regexp_substr(Engineer , '[^,| ]+', 1, 1) as FName,
    regexp_substr(Engineer , '[^,| ]+', 1, 2) as LName ,
    'Engineer'
    FROM EMPLOYEELOOKUP;
    INSERT INTO DIMSPECIALTY (SPECIALTY_NAME)
    SELECT DISTINCT SPECIALITY
    FROM EMPLOYEELOOKUP;
    COMMIT;
    CREATE TABLE employeelookup ...IS A TABLE THAT HAS ALL THE DATA NEDED TO BE FILLED IN BOTHE TABLES...
    CREATE TABLE "CATDB"."EMPLOYEELOOKUP"
    "EMPLOYEELOOKUP_ID" NUMBER(10,0) NOT NULL ENABLE,
    "ENGINEER" VARCHAR2(25 BYTE),
    "SPECIALTY" VARCHAR2(20 BYTE),
    CONSTRAINT "DIMSPECIALTY_PK" PRIMARY KEY ("EMPLOYEELOOKUP_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "CATDB" ENABLE
    DATA IN EMPLOYEELOOKUP
    Engineer, Specialty,
    John, Dow, Electronis,
    Dow, Jons, Technician
    Stan Smithers Sales
    Mark, Richards Marketing
    Jenny, Lane Marketing
    John, Lee Sales
    I NEED TO LOAD THE FOREIGN KEY IN DIMUSER FROM THE DIMSPECIALTY TABLE?
    BY USING THE LOOKUP TABLE TO MARCH THE NAMES UNDER THE Engineer COLUMN, SPECIALTY COLUMNE DISTICTIVLY BY JOINING THE DIMSPECILTY TO RISTIVE THE PRIMARY KEY AND FILL IT IN THE DIMUSER TABLE AS A FOREIGNE KEY.

Maybe you are looking for

  • Oracle 10g R2 installation problem in HP-UX Itanium 11.23 64 bit

    platform desc: HP-UX 64 bit Itanium 11.23 Oracle 10.2 I fulfill all the prerequisites (environment setup, kernel parameter update properly, user/group creation properly). But while i'm starting the ./runInstaller then I got error which i cant define

  • Email downloads in Mail on Leopard but not Tiger

    I recently switched three email accounts to a new host with new POP and SMTP. On my work computer (which is running OS X 10.5.4) I have the accounts set up and they appear to work just fine. On my home computer (running OS X 10.4.11), I have the acco

  • Any benefit of using toslink as well as HDMI to connect ATV2 to a TV?

    If you connect ATV2 directly to a TV using HDMI, does connecting the Toslink interface to the TV provide any benefits in terms of audio quality, additional Dolby etc or would this be a waste of money?

  • Solaris SPARC 10 64Bit -JDK Installation 1.6.05

    In Sun Solaris 10, not able to create the key using the jce.jar. JDK 1.6 Installed & PATH & JAVA_HOME both are referred to jdk 1.6. It is showing the belwo error Error: wrap() failed java.security.InvalidKeyException: wrap() failed at sun.security.pk

  • Does InDesign have any security features that can be used in a design?

    Our client would like us to create some certificiates which are to be printed using holograms, guilloche and security design patterns, micro text, etc, etc.  I'm of the understanding that this is a specialist field and we would need specific software