Convert Sub-Report to Crystal Command

I'm attempting to convert a sub-report and a shared variable from the report to a Command.
Can someone help with the conversion
Here is the part of the Crystal SQL I can't convert
This is within last7days >>>  (ORDER_PROC.ORDER_INST>={ts '2014-06-18 00:00:00'} AND ORDER_PROC.ORDER_INST<{ts '2014-06-25 00:00:00'})
AND ((ORDER_PROC.RESULT_TIME IS  NULL ) OR (ORDER_PROC.RESULT_TIME>=ORDER_PROC.ORDER_INST))
ORDER BY ORDER_PROC.ORDER_INST
Here is the code for the shared variable
if (not isnull({ORDER_PROC_3.FREQ_UNSCHEDULED_C}) and {ORDER_PROC_3.FREQ_UNSCHEDULED_C}=1 ) then {ORDER_PROC.ORDER_INST}
else {ORDER_PROC.PROC_START_TIME}
Thanks
Steve

hi Steve,
you'd need to give us some info...what database are you using? Commands use syntax native to your database.
are you trying to get the last 7 days instead of a hard coded date range?
the following may take care of the date range and the null should you be using sql server..not sure though as i don't have the db to check against. i would suggest that you search a forum for your database for the correct syntax though.
WHERE
DATEDIFF(DAY,ORDER_PROC.ORDER_INST, GETDATE()) <= 7
AND
     ISNULL(ORDER_PROC.RESULT_TIME)
     OR
     ORDER_PROC.RESULT_TIME>=ORDER_PROC.ORDER_INST
ORDER BY
ORDER_PROC.ORDER_INST
also you can't use a Shared Variable directly in a command object but you can certainly pass it in via a sub-report link. what is the variable supposed to do in the command? suggest that you create a Parameter in the command object and then link the subreport from your main report to the command parameter.
cheers,
jamie

Similar Messages

  • Convert abap reports into crystal reports

    Hi,
    We are trying to convert abap reports into crystal reports.We could convert these reports into XML files
    Now we want to create utility which will automate the conversion of XML files into RPT files of crystal reports.Later on we can refresh the data in reports by changing the datasource location.
    Can you please guide us whether it is possible and if yes how should we go about it?
    regards,
    shital

    Hi, i suggest, 2 technies to do this, the first one, you can use,
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
      EXPORTING
        APPLICATION            = 'C:\Program Files\crystalreports.exe'
      EXCEPTIONS
        CNTL_ERROR             = 1
        ERROR_NO_GUI           = 2
        BAD_PARAMETER          = 3
        FILE_NOT_FOUND         = 4
        PATH_NOT_FOUND         = 5
        FILE_EXTENSION_UNKNOWN = 6
        ERROR_EXECUTE_FAILED   = 7
        SYNCHRONOUS_FAILED     = 8
        NOT_SUPPORTED_BY_GUI   = 9
        OTHERS                 = 10.
    where, exe file could be, a crviewer.exe, and, use a parameters  ( on exe ) to indicate rpt file, or, define of standar mode, a generic name and put, xml file generated via abap, on  a repository, this way, rpt file, when launched, displaying file.
    the second choice, could be,  go SM69, click create. enter a command name 'ZCREXE', enter the path and the exe file name in operating system command field. You can call this exe from ABAP using SXPG_COMMAND_EXECUTE.
    i hope so that my answers help you.
    greetings.

  • Need to create 6 sub reports in Crystal Reports 2008 - Advise Required

    Hello All,
    I am trying to create a report with 6 sub reports in Crystal Reports 2008.Each sub-report is filtered by a filed called Error Status.Finally i need to parameterize the report based on Rec Date ( This is also i field in table from where i am puling data). I tried to link sub reports but was not able to. Please guide me.
    Thanks !

    Hi,
    I linked the fields but no data appears in the main report. Any advise would be greatly appreciated?
    Thanks,
    Praneeth

  • Issue accepting sub-report parameters using Command queries

    OK,
       I am using a query which accepts a linked parameter to create a sub-report. When I type the linked data straight into the query the data queries correctly. When I pass the same data through the parameter it doesn't pull any data. The query runs in SQL Management Studio so I know the data exists.
    The query is:
    select * from pmappedu Inner Join prmisccd on pmappedu.pmad_inst_cd = prmisccd.prms_code where  pmappedu.pmad_ssn='{?Pm-Command.pmaq_ssn}'
    I can display the parameter value in the report and it's correct. All data types seem to match. I am not sure what else to do.
    Sam

    For some reason the sub-report would not accept the parameter passed from the main report in the Command feature so I got around it by taking out the where clause and using the Select Expert to do my where clause in the report itself. However, this seems very counterintuitive and not at all what I would expect for a SQL-based report. If I am understanding the process correctly, the SQL query is returning ALL data unfiltered and then filtering the report at run-time of the Crystal processes instead of with the SQL engine on the SQL server. This is actually pretty ridiculous because of the performance hit that we would take on say, a million records.
    Sam

  • Report containing 15 sub reports crashing - Crystal Reports 2008

    I am using Crystal report 2008 with all latest service packs applied. I have more then 20 different reports wich work absolutely fine and never crash. One of my report contains 15 sub reports since its bringing data from 15 different queries. This consistently keeps crashing everytime I try to run it. Not sure what could be the root cause.
    We are using Postgres database and connected to it with  ODBC connection using Microsoft DSN.
    - All Subreport data is being displayed on Report Footer
    - All subreports are included in the Main report  page header section. (I have also tried doing it on report footer section but it still crashes)
    I have tried searching through the forum and did not find similar issue resolutions. Did someone face similar problems before?
    The crash message is:
    "crw32.exe has encountered a problem and needs to close. We are sorry of the inconvenience."
    Error report contains this data:
    AppName: crw32.exe      AppVer: 12.2.0.290      ModName: psqlodbc35w.dll
    ModVer: 9.0.2.0      Offset: 0004c538
    I am using Windows XP
    Crystal Report Version Details:
    CR Developer Version 12.2.0.290
    Product Type: Full
    Let me know how can I debug this issue? Any help is appreciated.

    @Don - We performed extensive testing for this crash issue and found that now this crash is not happening only in one scenario. So we have partially fixed this.
    Now the report crashes if I get disconnected from database and reconnect. This is what happens
    1. open the report in crystal report 2008
    2. try to run the report when db is connected- it works fine.
    3. Now disconnect the database (we are using ssh tunnel to connect to db so we just close the tunnel)
    4. now try to refresh the report - it fails to retrieve data.
    5. Now close the report without saving it.
    6. Now Close Crystal Report.
    7. Now Connect the DB using ssh tunnel so crystal report can connect.
    8. Now open Crystal Report
    9. Launch the target report.
    10 Preview the report - it works for first time.
    11. Now do a refresh keeping same parameters - Report crashes here.
    - I tried these steps with some of my other reports and they do not crash.
    - Now I have only one report which contains a Postgres Query with date range,order by and a union join.
    - No subreports now - I am trying to run this one subreport as a standalone report which I created from scratch(using blank report wizard) and just copied the query.
    Any more pointers would help.

  • 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

  • Viewing sub reports with Crystal Viewer XI

    I am getting an error message when I try to open up a Crystal Report that has sub reports included.
    "This report contains invalid subreport linking parameters."
    Any ideas on how I can save report with sub-reports so that they can be read with Crystal Reports Viewer XI  offline?

    Hi Anders
    Are you getting the error message in Crystal Report Designer or Crystal Report Viewer?
    Would suggest you to follow the below steps in Crystal Report Designer:
    -Create a fresh report,in which insert linked sub report based off your database.
    -Create a fresh report,in which insert linked sub report based off Xtreme Sample Database.
    With this we can narrow down the issue ,whether this error occurs with this particular report or all report?
    Thanks
    Asha Lund.
    Edited by: Asha Lund on Jul 31, 2008 3:32 PM

  • Sub reports in crystal reports

    Hi All,
    I have a report where I am using a on demand sub report as in this thread calling a report
    Now my user is viewing this report from a java application.
    So whenever he run the report he will view this output in PDF format.
    The data will come like below in PDF. But here location name is on demand sub report
    Location name        Item total          tender total
    So now in pdf if he click particular location it should show the corresponding report.
    I don't know whether we will call a report by clicking a field name in PDF
    Please suggest how to do this.

    Hi Divya,
    The functionality does not exist in Crystal Reports.
    One of Ido's products however offers this functionality.
    The Crystal Reports&amp;#174; Underground
    -Abhilash

  • How to convert  PLD Report into Crystal Report

    Hello Experts,
                             I want to convert my  PLD Report into Crystal Report, but  i am not able to find the solution ,
                             so how can i do this and what are the  steps have to taken.
    Kindly give me the solution .
    Regards
    Rahul

    Hi Rahul........
    SAP has given a tool where you can convert your PLDs into Crystal Reports.......
    Please check the below link to download tool......
    http://www.sdn.sap.com/irj/scn/downloads?rid=/library/uuid/108305a7-1555-2d10-8289-9a178d441c71
    Regards,
    Rahul

  • Convert BI report 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

    Gira,
    You want my advise?
    Why convert from BI to BO ?
    Create in BO directly. Create new. That saves a lot of trouble.
    Learn BO. That is the way to GO.
    assign points if you feel generous today.

  • Seeking help in converting Excel report to Crystal (Related to format)

    All,
    I'm trying to create the report found in this image into a crystal report
    http://img.auctiva.com/imgdata/1/7/7/2/0/4/webimg/144238299_o.jpg
    I've got the data but I now stuck on the format.
    Col B = Application
    Row 1 = Report range (Lastweek, Last2week, last3week, last4week) - I've created a weekheader field within my data.
    Row 2 = Avail and Reponse
    How do I get my report to show Avail and RT side by side?
    I thought this would be a simple crosstab report but that doesn't work.
    Thanks
    Steve

    My datasource is a Oracle DB.
    Let me clarify
    I'm attempting to automate a manual report.
    Manual method
    Query DB from Access and export into Excel for formatting
    Automation effort
    Query and format in Crystal
    Schedule report using Enterprise.
    So I'm trying to recreate the format that I was able to do in Excel in Crystal.
    So I need
    The weeks across top of report like
    Week4---Week3-Week2---Week1
    Then I need Avail and RT heading for each week
    For example
    Week4 would look like this for each application
    4/21/2008-4/24/2008
          Avail-----RT
           98.4%--7.9
    Thanks
    Thanks

  • Convertion from Bex Reports to Crystal reports

    Hi all
    we are integrating BI with BO, i have a task to convert all existing BEx reports into Crystal Reports. I knew nothing how to do this, can any one please explain in detail steps how to convert BEx reports into crystal reports.
    For example any documents or t-codes how to start and finish the task.
    Thanks

    Post your question BEX and/or B1 and classic SAP data source issues to the Integration Kit forum

  • Passing Parameter from Main report to SQL command-based subreport

    I am trying to cut down the run time of my reports and have recently figured out how to write SQL commands to limit the data by filtering prior to being pulled into the reports.  However, many of my reports rely on multiple sub reports, which can cause a dramatic 'drag' on the report.
    I am trying to filter the SQL command used in my sub report by passing the group parameter, which is selected by the user in the main report, to the sub report's SQL command.  Without this parameter, the sub report has to sort through a lot more data than it would with this parameter, making the run time extremely slow.
    Any suggestions on how I can accomplish this?
    Thanks for any help you can provide,
    Marlene Allen
    Crystal Reports Developer
    Crystal Reports Professional;
    Product Type: Full;
    Product Version 11.5

    Hi Marlene,
    I don't believe you can pass a CR parameter to a Command object.
    I suggest replacing all of the Command Objects with a Stored Procedure so all of the data filtering is done server side. DB servers are much more proficient at collecting the data and filtering than CR will ever be. It will also allow you to replace subreports to also speed up your report processing. All depends on your layout of course but something to look at.
    Thank you
    Don

  • Report with sub-reports have to put ODBC credential several times

    I designed a report with several sub-reports in Crystal XI, which all have same  ODBC connection, when other developers got the .rpt file, they open the designer to run this report from their local PC, it will prompt them to put their user name and password for the ODBC SEVERAL TIMES. We all have the same ODBC connection set up, after they put the user name and password several times, the report works, but itu2019s so annoying.
    Is there a way to avoid putting ODBC user name and password in Crystal Designer? Or put once at main report and pass to all subreports?

    Hi,
    According to my understanding if we are using an odbc connection and the username and password for the database is same for the entire user, then you can just create an ODBC connection string in crystal report. Where in you will manually specify the dsn to be used, username and password will also be stored in that connection string.
    So next time you run a crystal report, it would take the username and password for this connection string.
    Thanks,
    kuldeep

  • Sub reports

    Hi All,
    I have a report having a command object where I have empno and some columns. And I have another command object which also having empno.
    The 2nd command object should get some empnos from 1st command object and should display countries based on the matched empnos . So I linked both command objects empnos in links tab.
    There is no parameter for both the reports
    Due to some performance issue I am doing like this
    Created a sub report with 2nd command object . Now in sub reports links tab I am passing main reports empno to sub reports empno
    But I am getting non matching empnos data.
    Please suggest
    Here what I observed in my 1st table have data like this.
    eno               name            division
    1                  aaa                 2
    2                  bbb                 2
    3                  ccc                 2
    In my 2nd table I have data like this
    eno               country            division
    1                 India                2
    2                 Aus                  2
    By using 1st method(linking command objects in links tab). I am getting result like this.
    eno               name            division        country
    1                  aaa                 2                Ind
    2                  bbb                 2                Aus
    By using 2nd method(Sub report approach). I am getting result like this.
    eno                  name            division        country
    1                  aaa                 2                Ind
    2                  bbb                 2                Aus
    3                  ccc                 2           
    Please suggest what is happening here ?I am doing anything wrong ?

    Hi Abhilash,
    I tired to suppress the records where there is no country.
    I did like this but not getting the result.
    Took a copy of sub report and placed it in report header as my sub report is in details section.
    In the sub report created a shared var like this.
    shared stringvar s :={sample1.country};
    And now in main report created a formula @Country to get country like this.
    shared stringvar s ;
    And in details section->suppress ->x-2 I wrote like this.
    isnull({@Country})
    Please suggest what is wrong here

Maybe you are looking for