Select Query in Crystal Report

Dear all,
I have a report to be developed in which i have to fire more than 2 select quires. I am adding this quires in "Add Command" window, it doesn't give any error but gives output of first query only.
I have tried to use multiple commands in report but the query fields are not having any common field in it so i am not able to link it.
Is there any other way to use more than one query in crystal report?
Thanks in advance.
Ashish Tambe

Dear Charles,
I am willing to develop a report in which i need to select diff data from diff table such as OOPR,ORDR,OINV and many more.based on diff conditions and it may happen that a query can give more than 2-3 records then i need to make summation for that. On the basis of this summation and some more formulas in CR i need to make some conclusions.
This cannot be done in single query. so i need to fire more than one select query.
Regards,
Ashish Tambe

Similar Messages

  • How to get select query for crystal report in c# code

    In C#, (Visual Studio 2008 ) I need to use the native Crystal Reports objects to get the complete SQL statement as it appears when you view it in Crystal Reports.
    In Crystal Reports 12.0, Go to "Database > Show SQL Query..." ... That is what I need to get via C# code. I can get bits and pieces of parameter info etc but I just want the whole SQL statement.
    How to get this?

    Hi Ganesh,
    It's simple to use RAS, include the assemblies and use this to open your report document:
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.Shared;
    using CrystalDecisions.ReportAppServer.ClientDoc;
    using CrystalDecisions.ReportAppServer.Controllers;
    using CrystalDecisions.ReportAppServer.ReportDefModel;
    using CrystalDecisions.ReportAppServer.DataSetConversion;
    using CrystalDecisions.ReportAppServer.DataDefModel;
            CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
            ISCDReportClientDocument rptClientDoc;
    To open the report use:
         object rptName = openFileDialog.FileName;
                    rpt.Load(rptName.ToString());
                    rptClientDoc = rpt.ReportClientDocument;
    Then to get the SQL set the log on info:
                rptClientDoc.DatabaseController.LogonEx("10.50.212.77,1433", "xtreme", "sa", "password");
                GroupPath gp = new GroupPath();
                string tmp = String.Empty;
                rptClientDoc.RowsetController.GetSQLStatement(gp, out tmp);
                MessageBox.Show(tmp, "Data Source Set and SQL Statement", MessageBoxButtons.OK, MessageBoxIcon.Information);
    Thank you
    Don

  • Select query in a report

    Hi!
    Is it possible to modify a select query for a report in the following way:
    I have created two fields where users input values and operators.
    Operators selection is a static list consisting of: =, like , in
    Value field is a text field.
    The current query is:
    SELECT
    A,
    B,
    C
    from TABLE
    I would like to add:
    WHERE
    A : P1_OPERATOR : P1_VALUE
    but it doesn't work; I get a notification that the operator is incorrect.
    It has a defaulft value = and when I set let's say 5 in the value field the whole query should be:
    SELECT
    A,
    B,
    C
    from TABLE
    WHERE
    A = 5
    Regards!

    Hmm, I get the following error:
    Updatable report parse error:
    ORA-20001: Query must begin with SELECT or WITH
    The only difference I see is that your type is SQL Query (PL/SQL function body returning SQL query) while I have SQL Query (updateable report) hardcoded.
    I have APEX 4.2.2, I'm not quite sure how to change this...
    This is my code:
    begin
    :P7_QUERY := 'select ROWID,BNK_ID,MSR_PRD_ID,SRC_STM_ID,ID,ID_RETKA,RSP,OZNAKA_RETKA,DATUM_STANJA,OZNAKA_IZVJESCA,OZNAKA_KOMITENTA,MBR_KOMITENTA,KOMITENT_NEREZ,ZUPANIJA,DRZAVA,SEKTOR_NEREZIDENTA,VRSTA_POVEZANOSTI,INSTRUMENT,ISIN,VALUTA,OTKAZNI_ROK,IZVORNO_DOSPIJECE,VRSTA_INDEKSACIJE,VALUTA_INDEKSACIJE,PORTFELJ,UTRZIVOST_KREDITA,ZNACAJKE_KAPITALA,RIZICNA_SKUPINA,UGRADJENI_DERIVAT,ODNOSNA_VARIJABLA,PREDZNAK,IZNOS,IZNOS_ACTUAL,VRSTA_IZNOSA,KOMITENT_PBR,UDJELI_POVEZ_C,AR_ID,AU_ID,ACT_AR_BAL_KN,ACT_AR_BAL,AR_BUSS_ID,MTI_CCY_TP_ID,REG_NO,REG_SFX,JMBG_ID_NO,IP_ID,NO_DYS_OO,TAX_ID_NO,INSTRUMENT_OLD,PREDZNAK_OLD,IZNOS_ACTUAL_OLD,ACT_AR_BAL_KN_OLD,ACT_AR_BAL_OLD,NAPOMENA,NOVI_POSAO_F,LISTA_SUMARNA,LISTA_REKAP,POSTOTAK1,POSTOTAK2,POSTOTAK3,DZS_IDY_CL_ID,HNB_IP_CL_ID,EXG_RT_CRD_RSK_F from DWP.IZV_SLOG_DET
    where ' || :P7_X_FC1 || :P7_X_O1 || :P7_X_O1;
    return :P7_QUERY;
    end;
    I have also set Use Generic Column Names (parse query at runtime only) nad P7_QUERY as page item to submit.
    Regards,
    Ivan

  • See sql query from crystal report without crystal report

    see sql query from crystal report without crystal report 

    Hi,
    Depends on datasource type but you could have a look at ODBC trace or if you have access to the SQL Server you could use profiler to monitor the session.
    Regards,
    Craig
    And this will only be of use if you know which Server/Insstance/Database the Report is connecting to...
    Please click "Mark As Answer" if my post helped. Tony C.

  • Error when opening a BW query with Crystal Reports

    Hi all,
    I am having problems when opening a BW query with Crystal Reports, the strange thing is that it only happens with
    the bo user I have created. If I use a user that already exists and that has SAP_ALL authorization it works.
    I don't know if this could be an authorizations issue, but I have created a role with all the authorizations stated in the manual.
    The error I am getting is the following:
    "An error occurred while generating a new report template. Error in UNKNOWN.RPT file"
    Does anyone know what this could be?
    Thanks

    Well,
    I cannot access the system now. But I think it is not an issue of authorization, because I assigned all the good user's role to the bo user,
    and even with that, it still don't work.
    Thanks

  • How to enable show SQL Query in Crystal report tool

    Hi,
    How can we enable the show SQL Query under Database tab in crystal report...
    We have a requirement to modify the SQL query in Crystal reports.
    Thanks,
    Gana

    Gana,
    CR has an "Add Command" feature that will allow you to use hand-coded SQL as your data source.
    Look at Defining an SQL Command in CR's online help (F1).
    If a command was used in the original report creation, it's a simple matter to go in and edit that SQL.
    If the report was not originally built w/ a Command you may find it difficult to switch over. In most cases it easier to start over from scratch, creating a new, blank report, that uses the command.
    Jason

  • Modify SQL query in Crystal Reports 2013

    Bonjour,
    Je voulais savoir s'il était possible de modifier la requête SQL dans Crystal Reports 2013, car les bases de données de notre application pour bibliothèque utilise un format de date particulier qu'il nous faut corriger directement dans la requête SQL.
    Merci pour vos informations.
    Cordialement
    Claude Marcilly
    Cannes - France
    Hello,
    I wanted to know if it was possible to modify the SQL query in Crystal Reports 2013. Databases of our application library indeed use a particular date format that we need to fix directly into the SQL query.
    Thank you for your information.
    Best regards
    Claude Marcilly
    Cannes - France

    Hi Claude,
    If you are creating reports using tables then go in Database menu and click on show SQL query, this will show the SQL generated by crystal reports.  Now go in database expert and expend your connection and double click on Add Command and past the query which was generated by Crystal and try to modify the date format and click OK.
    Now you need to redesign your reports based on Add command.
    or
    If your reports datasource is Add command you can directly go in add command and change it.
    -Sastry

  • Selection Screen for crystal report ?

    Hi to all,
    Is it possible to create selection screen using Crystal report designer alone ?
    I came to know that we can give selection parameteres using SELECT EXPERT option in desginer.
    Can we create selection screen for user input like we have in abab (selection screen) ?.
    Is it possible to check authorization using Crystal report designer ?
    If anyone knows anything .... remotely connected with the question I asked please reply.
    Waiting for reply.
    Regards,
    Surya.

    Surya,
    To do what you are wanting, you will want to do the following:
    1) Create parameters. Open the Field Explorer > right click Parameter Fields > fill in the necessary fields o create the desired parameter.
    2) Add the parameter to the Select Expert.
    2a) If you are using a SQL Command to generate your data set you will need to add the parameter name to the Parameter List of the Command and add it the selection criteria of the SQL statement.
    Something like this:
    WHERE f.FieldName = {?ParameterName}
    HTH,
    Jason

  • Query regarding Crystal Reports Server

    Hi,
    I am new to Crystal Reports.
    I have created a couple of .rpt files using CR2008 and I am loading these report files in my aspx pages using CrystalReportViewer control.
    I am planning to host my webApp on IIS in production environment. Maximum simultaneous/concurrent connections to my reports would be 1 or 2.
    My question is:
    1. Do I need Crystal Reports Server in this scenario?
    2. In future if the number of concurrent users to report increases then do I need to go for Crystal Reports Server? Will just buying and installing the Crystal reports server on production server work? or will I have to do some configuration or some other changes in the existing deployed reports? OR Will I have to deploy my existing reports on Crystal Report Server again?
    Any help will be highly appreciated.
    Thanks in advance,
    Manish

    Manish, please do not cross post:
    Query regarding Crystal Reports Server
    See the [Rules of Engagement|http://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] for more details.
    Marking this thread as answered and locking...
    - Ludek

  • Mapping relation from sap bw query to crystal report

    Hello Gurus,
            will you please describe mapping relation for following items from sap bw query to crystal report? it is better to provide a instance for each one.
               (1) character   (2) key figure  (3) navigation attribute  (4) display attribute (5) charater with hiararchy
    Many thanks

    This blog may be helpful:
    /people/ingo.hilgefort/blog/2008/10/03/businessobjects-and-sap-part-1-of-4--creating-a-xcelsius-dashboard-on-top-of-sap-bi

  • Convert BI query into Crystal Report

    Dear Sir,
    I have drawn a structure in BI query onto Crystal Report,
    my question is that, can I delete one single field from this structure on Crystal Report ?
    'cause when I tried to delete one single field, the whole structure is deleted.
    In addition, can I change the field name(text/description) on Crystal Report ?
    Thank you very much for your help.
    Best Regards,
    Girai

    Hi,
    in Crystal Reports you can still decide which parts of the underlying query you would like to use in the report.
    in case you mean a actual structure in the BW query and having 2 structures overall, one of the structures becomes rows of data in your report and you could if required filter it out.
    In terms of texts - you can for sure create your own headings.
    ingo

  • Format Column Header in Crosstab Query in Crystal Reports for Enterprise

    Hi
    I am using Crystal reports for Enterprise and I would like to format the Column header of a crosstab query one block of colour say light blue.  However I cannot select the header in isolation to the rest of the cross tab.  All I can select is either column text boxes, which doesnu2019t look good formatted as a different colour to the background of the crosstab.  Or I can only select either entire column or the entire row, which kind of defeats the object of formatting just the column header itself.  Is there a way to isolate the column headers so I can format just the header, as the report is looking extremely bland all in white?
    Many Thanks in advance
    Regards
    Neil

    Alright, here's what you need to do:
    1) RIght-click one of the Column Headers and select 'Format Result Object Element' > Appearance > click on the formula button (fx) beside 'Fill' and use this code:
    if currentrowindex < 0 then crBlue
    You wanted light blue right? So, the rgb value for light blue or sky blue would be 135-206-250. So, you can change the color by modifying the formula like this:
    if currentrowindex < 0 then color(135,206,250)
    If this is not the exact blue you're after, just google!
    Hope this helps!
    -Abhilash

  • Parameterised Query in Crystal report

    I have Created a Parameter List Box having the following values Channel Name, Channel City, Channel State in the Crystal reports Designer.
    I want to create a parameterised query in such a way that whenever user select any value from the Above list the query column name should be taken automatically.
    For eg if I select Channel Name from the list the Query should read as Select "Channel Name" from... and if i select Channel City the query should be transformed to Select "Channel City" from... Can this query be generated on the fly using parameters in the select statement
    For E.g. Select ?ChannelColVaiable from .....
    ?ChannelColVaiable should be populated with the value I select from the Parameter list box I select above.
    Is this possible is crystal reports designer???
    Any Solution is welcome.
    Thanks in Advance.
    Suresh Vishwanathan

    Hi Suresh,
    Check this link
    Re: parameter in crystal report
    Regards
    Jambulingam.P

  • Limited drop down list in selection criteria in Crystal Report

    I have designed a Crystal Report to produce Item Labels using Crystal Reports for SAP Business One.
    The design has a Dynamic parameter for the selection of Item Code, linked to the OITM table in the database
    The customer database has 5000+ items.
    When I run the report, either in the designer or in the viewer, I get 5 pages of item codes to select from, but they stop at 1000 items.
    Is this a bug with Crystal, or is there some configuration I can change to correct this issue?

    Closed

  • Cannot Edit Universe Query in Crystal Reports.

    Hi,
    We have Crystal Reports 2008 SP5 installed on a Terminal Server where our report developers can go to develop reports. We have a 4 node BOXI R2 SP4 cluster on the opposite side of a firewall, and have opened the firewall ports so that Crystal Reports can connect to this BOXI cluster and a universe on that cluster, and the developers can publish their reports.
    For some developers, and the issue is intermittent for them, if they open one of those Crystal Reports to edit the universe query, they go into Database Expert and right click and choose Edit query, nothing happens. The Query Editor window does not open. They don't get any errors, other than the Universe Query editor window refuses to open. No errors on the BOXI server side either.
    They can work for a few days and everything works fine, when suddenly this behavior starts. When they report the issue to me and I try it myself, it works fine. I've checked their access rights repeatedly and have even given a user temporary full admin rights to rule out any rights issues, but they stll get this behavior.Just as strange, the problem suddenly will disappear. Often, they will send me an message several hours or days later stating that everything is OK again and they can edit their universe queries in the same reports that refused to work earlier.
    I've also checked the BOXI cluster nodes to see if possibly one of the services had a missing -requestport setting, and was choosing a random port that the firewall could be blocking, but everything looks fine. If I login to the BOXI cluster servers and try one of the reports, I can edit the query just fine.
    Any suggestions? I'm at my wits end.
    Edited by: Perry Provst on Nov 11, 2010 9:18 PM

    I had the same issue and it was because the Universe is having Oracle as Database and I dont have any Oracle drivers installed on my machine. Once i have installed Oracle drivers i was able to view/edit the query panel.
    Hope this would help you.

Maybe you are looking for

  • Setting up a USB external Drive with USB Hub on Airport Extreme

    I have successfully hooked up the Airport Extreme Base Station (n) with two printers using a USB Hub. I am now trying to hook up an external hard drive(acomdata 250 gb). When I plug the hard drive into the Hub and turn the drive on the Airport Extrem

  • How to change language in mail ?

    Hi, My system is in French but mail suddely were in Greek. I used Apple > System Preferences > International and I removed other languages than "French" but mail is now in English. No settings in mail to change the language. Please tell me how to get

  • HT1551 geting out of range message, what can i do

    Hi I am getting the message out of range, what can I do

  • Authorization for limited vendor for user in FBL1n

    Hi, I have certain user in my company, to whom, i want to give t-code FBL1N access. But for some vendors only. Please let me know, how it can be done.

  • Where can be find Item's shopOrderType

    hello I  want to get Item's shopOrderType, but i don't know where is the filed id DB. even though , i find the ITEM_SHOP_ORDER_TYPE table, but if  Item's router not be setted.  the Item's shopOrderType will not be insert into the ITEM_SHOP_ORDER_TYPE