How to write SQL in crystal report that can reuse SQL execution plan cache?

I write the following SQL with crystal report parameter fields, and it is connecting to SQL 2005
Select Name from Customer where CustID = '{?CustID}'
The SQL profiler show that It is an ad-hoc query, how to write parameterized SQL which can reuse Execution Plan.
Edited by: Chan Yue Wah on May 14, 2009 3:17 AM

Since there are too many report, it is not possible rewrite all. Is that crystal report do not have option to change how it query the database ?

Similar Messages

  • How to write 14 similar crystal reports

    I am new to working with crystal reports. I would like to know way(s) to  write 14 similar detail reports.
      I will be passing parameters from a vb.net windows application to a crystal report that will have 14 detail reports that are similar but the columns may be different based upon the selection category passed by the parameters.  Each version of the detail reports will be similar but vary depending upon the category that is selected.
      The reports will only one one major selection criteria on them. These reports will be emailed out to each user user the request the detail infomation.
      Thus is there a way with crystal reports to have the reports similar but different based upon one major selction criteria? This would be similar to using cascading styles sheets on the web or writing a .net method that has the same name, but different parameters that can be passed to the 'methods' in .net.
       Thanks!

    Hi Jassie,
    It seems that you are having issue through Custom .Net application.
    I would suggest you to post your question here:
    [.NET Development - Crystal Reports Forum|SAP Crystal Reports, version for Visual Studio;
    That forum is monitored by qualified technicians and you will get a faster response there. Also, all .NET SDK queries remain in one place and thus can be easily searched in one place.
    Thank you for your understanding,
    Shweta

  • Sharepoint 2013 SSRS Interaction with Sql Server 2012 Reporting Services connecting to Sql Server 2008 R2 database

    Hi
    I'm working on upgrading sharepoint 2010 to sharepoint 2013 with sql server 2008 r2. I've ran into some problems but have been able to get a test farm upgraded. However to run SSRS 2013 it seems Sql Server 2012 Reporting Services are required. Upgrading
    to a full sql server 2012 database isn't an option. I know that sql server 2012 reporting services can use sql server 2008 r2 as a catalog and content database so I was wondering could this be a workaround? Importantly would I need a separate machine/virtual
    machine to host sql server 2012 reporting services? or could it live on the sql server 2008 r2 machine? Any pointers appreciated. Thanks Dan

    Remember that SSRS must be deployed on the SharePoint server. Having said that, yes you can install SSRS 2012 SP1 on a server running SQL 2008 R2. And yes, you can use 2008 R2 as your Database Engine server while SSRS 2012 SP1 runs on the SharePoint server.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Faxing a Crystal Report that has been exported to a PDF

    Hi. I am having a problem trying to fax a Crystal Report that has been exported to a PDF. I am using Windows XP Pro SP3, VB.Net 2008 and the Crystal Reports that came with it. The report exports to a PDF with no problem.  Generally, I can fax a document by putting <TOFAXNUM:12481234567><NOCOVER><DELETE><FINE> at the beginning of a document and send it to my fax printer.  The fax printer requires the <embedded code> to be in a printer font rather than a true type font. I put the embedded code as a report header on the report using Courier font, but it has a problem when it converts my font. I'm pretty sure the problem has to do with converting my font before it sends it to the printer.  Is there a solution in Crystal Reports to convert the font to printer font?

    I am using Table Adapters to filter my data from multiple Sql tables and processing the data using VB.net 2008. Once I have the data, I write it to temporary tables which are the data source for my Crystal Report. The Sql queries are not part of the Crystal Report designer. Within the VB.net , I export the report to a stream in PDF format. The VB.net code is done. I'm looking for a way to fax the report without having to re write my entire code. I don't think the report can be exported thru the designer the way I have my data sources set up.

  • How to do this in Crystal Report

    I have table a and table b in two database.
    I made connections. Want to implement this kind of query in
    CR.
    How can i do this using add command?. Is it possible to type
    in below query in add command of one database and make it work?.
    table a and b are in two data database connection.
    select * from a
    where a.id not exist
    (select b.id from b where a.id = b.id)

    i need to set where condition in crystal report like count {table.support} where ({table.support} = "others")
    support
    others others myself parent others
    then the result should be : 3
    how to do this in crystal report ? i'm just a newbie in crystal report.
    You should go on a Crystal reports forum for your version of Visual Studio and Crystal reports probably.
    SAP Crystal Reports, version for Visual Studio
    Please BEWARE that I have NO EXPERIENCE and NO EXPERTISE and probably onset of DEMENTIA which may affect my answers! Also, I've been told by an expert, that when you post an image it clutters up the thread and mysteriously, over time, the link to the image
    will somehow become "unstable" or something to that effect. :) I can only surmise that is due to Global Warming of the threads.

  • Query Engine report error with Crystal Report 9 And MS SQL SErver 2000

    Hi,
    Currently I m doing a report with Crystal Report 9 and MS SQL as back End.I used a stored procedure to fetch data from DB.The Stored procedure works properly with query analyzer . But when I take report through application
    "Table Not Found" Error is coming.Later I Found that In stored procedure for certain conditions only this error comes.But I cant resolve it.
    Can any One check any pblm with this query
    ELSE IF ISNULL(@intSourceID,0) = 10 Or ISNULL(@intSourceID,0) = 11 Or ISNULL(@intSourceID,0) = 12 Or ISNULL(@intSourceID,0) = 13 Or ISNULL(@intSourceID,0) = 14  
    BEGIN
    IF ISNULL(@intSchemeID,0) <> 0  
    BEGIN
    Select* From table
    END 
    ELSE IF ISNULL(@intSchemeID,0) = 0  
    BEGIN
    Select 
    END 
    END
    When I comment the above codes , report works fine....
    Can any one help me....plz....I m in such a critical situation...

    Hi,
    Currently I m doing a report with Crystal Report 9 and MS SQL as back End.I used a stored procedure to fetch data from DB.The Stored procedure works properly with query analyzer . But when I take report through application
    "Table Not Found" Error is coming.Later I Found that In stored procedure for certain conditions only this error comes.But I cant resolve it.
    Can any One check any pblm with this query
    ELSE IF ISNULL(@intSourceID,0) = 10 Or ISNULL(@intSourceID,0) = 11 Or ISNULL(@intSourceID,0) = 12 Or ISNULL(@intSourceID,0) = 13 Or ISNULL(@intSourceID,0) = 14  
    BEGIN
    IF ISNULL(@intSchemeID,0) <> 0  
    BEGIN
    Select* From table
    END 
    ELSE IF ISNULL(@intSchemeID,0) = 0  
    BEGIN
    Select 
    END 
    END
    When I comment the above codes , report works fine....
    Can any one help me....plz....I m in such a critical situation...
    Refer the above statement highlighted in BOLD. That statement is WRONG. Select what ???? Try any one of the below statement,
    select ''
    --or
    select 0
    --or
    select null
    Regards, RSingh

  • Problem with crystal report that comes with VStudio 2008 Database edition

    Hello,
    I'm using crystal reports that comes with Visual Studio 2008 Database edition. But I'm having a problem these days. When there are more than 4 pages in the report, the summary field in the pagefooter(usually sum of data in the Details section) show 0 in the first page.It will be displaying in all other pages. I couldnt sort out the problem.I'm binding data to the report from an SQL Server 2005 table.
    Thanks in advance.I really appreciate if some one can sort out the problem quickly.

    Have not heard of the issue, but download SP1 and see if that helps:
    https://smpdl.sap-ag.de/~sapidp/012002523100009351512008E/crbasic2008sp1.exe
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup

  • How do I connect from Crystal Report version XI to Oracle 10G express?

    I'm new to oracle 10G express and I'm developing an application that needs reports to preview some data from oracle tables.
    The oracle database is installed on the server and I installed the client on my machine. I need to use the crystal report 11 to report the output. Thus, I designed a crystal report that should simply read a table on oracle and though I need to be able to connect to the oracle 10G Express Edition database. I tried to create a connection from the crystal report using the Database Expert >> Create New Connection >> Oracle Server and I include the following parameters.:
    - Service: host:1521/XE
    - Username: username
    - Password: password
    Then when I tried to connect the crystal report crashes always.
    Is there any way to create a connection to the Oracle Database 10G express from Crystal Report 11?
    Please advise...

    Thank you bala,
    First, How I should start the Listener on the database server?
    Listener.ora content:
    SID_LIST_LISTENER =
    +(SID_LIST =+
    +(SID_DESC =+
    +(SID_NAME = PLSExtProc)+
    +(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)+
    +(PROGRAM = extproc)+
    +)+
    +(SID_DESC =+
    +(SID_NAME = CLRExtProc)+
    +(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)+
    +(PROGRAM = extproc)+
    +)+
    +)+
    LISTENER =
    +(DESCRIPTION_LIST =+
    +(DESCRIPTION =+
    +(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))+
    +(ADDRESS = (PROTOCOL = TCP)(HOST = Daoud-PC)(PORT = 1521))+
    +)+
    +)+
    DEFAULT_SERVICE_LISTENER = (XE)
    How to configure the tnsnames.ora on the client side?
    tnsnames.ora content:
    XE =
    +(DESCRIPTION =+
    +(ADDRESS = (PROTOCOL = TCP)(HOST = Daoud-PC)(PORT = 1521))+
    +(CONNECT_DATA =+
    +(SERVER = DEDICATED)+
    +(SERVICE_NAME = XE)+
    +)+
    +)+
    EXTPROC_CONNECTION_DATA =
    +(DESCRIPTION =+
    +(ADDRESS_LIST =+
    +(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))+
    +)+
    +(CONNECT_DATA =+
    +(SID = PLSExtProc)+
    +(PRESENTATION = RO)+
    +)+
    +)+
    ORACLR_CONNECTION_DATA =
    +(DESCRIPTION =+
    +(ADDRESS_LIST =+
    +(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))+
    +)+
    +(CONNECT_DATA =+
    +(SID = CLRExtProc)+
    +(PRESENTATION = RO)+
    +)+
    +)+
    Now I`m trying to initialize this on one machine (database & client) and so the crystal report will be on the same machine where the database exist; Additionally, this machine has OS Windows 7 Ultimate 64bit and include the Oracle 10g Express Database & Oracle 10g Express Client software.
    Please check the files content I included above and give me the way on how to establish a connection from the crystal report to the database where both are installed on the same machine.
    Thanks in advance...

  • 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 to incorporate ratio in Crystal Report?

    Hi,
    I am new in Crystal report and had no technical background.
    I would like to  know how to build ratio in crystal report? The draft layout as below:
                                                  (RM)        %
    Sales Revenue                        A           (A/A)*100
    Cost of sales                           B            (B/A)*100
    Where A and B are formula in crystal report.
    Regards
    Thomas

    Hi Thomas,
    Ratio is just a result by division.  If you take one field over another as a denominator, you got your ratio.
    Thanks,
    Gordon

  • How to map currecny from Crystal Reports

    Im using JRC to load and view crystal reports.ie loading crystal reports that are created (not by me) using Crystal Reports v 10. My work is just load those rpt files using JRC thick client.
    rpt files are bound to .mdb (MS Access) database and DB is password protected. One of the table in database has currency data type. I'm creating a POJO class to implement the table structure. To match with Currency type, Im using BigDecimal type in my pojo class. when i open the .rpt file in crystal report designer, it shows with default currency symbol (i.e $ and £) But the when i load the same report via JRC, It doesnot show the symbol at all.
    When I change this to String and pass symbol, it is coming up properly. But in some places, the reports use sum function of 2 curency fields. So in this case, string cannot be used.
    If not bigdecimal, then what can i use to map with currency.

    Hi ,
    We are also facing similar issues, if you found any solution please send info to kapilkashyap yahoo com.
    Regards,
    Kapil Kashyap

  • How to connect to the Crystal Reports Server XI R2 installed in other machi

    Hi,
    we are 3 people here we have Crystal Reports Server XI R2 installed in one machine and Crystal Repoprts XI  DEsigner ( downloaded trial version) in all the machines ,
    in my machine only Crystal Repoprts XI  DEsigner ( downloaded trial version) is installed , how to connect to the Crystal Reports Server XI R2 which is installed in other machine
    Regards,
    kathyaini

    Hi,
    thankyou for your  response,
    my problem here is as soon as i open CR Designer , and if i  click on either New Report,Blank Report, or  standard report wizard  it is saying "failed to create database connection"
    on which ever thing i click it is telling the same "failed to create database connection" i created the user DSN properly , i could not create System DSN i dont know why.
    can u please guide me
    and one more thing on the machine where CR server is installed , on the same machine designer is also installed (i think u was telling the same) .  my question is how the server will know about the CR Designer installed in my machine.
    Regards,
    kathyaini

  • How to connect Java to crystal report

    How to connect java with crystal report ?
    Which are the API's for that

    In all this time you never considered searching?
    Cross post
    http://forum.java.sun.com/thread.jspa?threadID=791154

  • How to know the list of reports that are in usage

    Hello,
    How to know the list of reports that are in use from the last 3 months by the users on Bw server.How basis team will help me in this regard?
    Regards,
    Anand.

    Hi,
    Pl look at following tables if you need any further detailed information
    Table Name  Use of the table 
    RSZELTDIR
    Directory of the reporting component elements
    RSZELTTXT  Texts of reporting component elements 
    RSZELTXREF  Directory of query element references .
    To get a list of query elements built on that cube.filter by: OBJVERS = 'A', INFOCUBE= [stage:cubename] 
    RSRREPDIR
    Directory of all reports (Query GENUNIID) .
    To get all queries of a cube.filter by: OBJVERS = 'A', INFOCUBE= [stage:cubename] 
    RSZCOMPDIR  Directory of reporting components.
    To get query change status (version, last changed by, owner) of a cube. 
    RSZRANGE  Selection specification for an element 
    RSZSELECT
    Selection properties of an element
    RSZCOMPIC
    Assignment reuseable component <-> InfoCube 
    RSZELTPRIO  Priorities with element collisions
    RSZELTPROP  Element properties (settings)
    RSZELTATTR  Attribute selection per dimension element 
    RSZCALC  Definition of a formula element 
    RSZCEL   Query Designer: Directory of Cells 
    RSZGLOBV
    Global Variables in Reporting 
    RSZCHANGES  Change history of reporting components
    Thanks and regards

  • Which is the lowest version of Crystal reports that shall work on BW 7.3?

    Hi,
    Can you tell me which is the lowest version of crystal reports that will work with BW 7.3?
    If given any reference document also it will be useful.
    Regards,
    Vignesh

    Just adding to Vitaly's point that when you load CR 2008 Sp4, you also need to upgrade SAP IK to the same patch level i.e. SP4
    You also have to load the respective transports for the service pack that you are loading.
    - Kuldeep

Maybe you are looking for

  • Cannot turn on "Show the day of the week" option in Date & Time

    OS X Lion turns "Show the day of the week" option off each time I open that preference pane and after every reboot. My region in Formats tab of Language & Text preference pane is set to "Russia (Russian)". I've noticed that the problem doesn't appear

  • Minimum specs for use as a media centre?

    I would like to have a Mac Mini hooked up to my tv to use as a media centre. i have worked out that i will be able to use it without a keyboard mouse etc by setting it up so front row or vlc load up on boot and using the remote, so am ok there... my

  • Inserting data in a existing table

    f Edited by: sai praneeth on Feb 10, 2009 5:07 AM

  • Raw sockets

    hi i have 2 questions; first: i want to design a network monitoring and packet capturing tool for my school project i read the related topics but i have still doubts, if i should use whether java or c . i dont know which one is better for such a tool

  • CSS weirdness with dd, dvdbackup, and mplayer -- Can someone explain?

    Just wondering if someone could explain what's going on in the following circumstance.  This doesn't happen for all CSS-encumbered DVDs, but I can reproduce the pattern for DVDs that it does happen to. dd if=/dev/sr0 of=~/somefile bs=2048 dd cuts off