Creating Crystal Reports Dynamically from an incoming SQL query

Hi,
I have a requirement where a sql query will be entered by the user in a text box and in the back end java code, i have to create a crystal report dynamically based on that sql query and show it in the crystalviewer object.
For example if the user writes "select x,y from xtable ", i should be able to create a report with 2 fields, and if the user says "select x,y,z from xtable" then i should be able create and show a report with 3 fileds...thsi report creation should be done in the click event.
Is this possible in java? I have found something similar in .NET... pls have a look at this 
http://vb.net-informations.com/crystal-report/dynamic_crystal_report_from_sql_query_string.htm
Thanks,
Preethi

Hi Preethi,
Can you please share the steps with me? I am also looking for dynamic SQL being applied to the crystal report.
Thank you so much for your help in advance.
Regards,
Janakiram D.

Similar Messages

  • Create Crystal Report Dynamically using XML based design metadata

    Hi,
    I have a CR Report Development environment. Please refer to workflow and requirement description below;
    I have a Java application(Report Customization Tool), which allows users to dynamically select structure and content for a report.
    The process goes as follows:
    1. In Java Application, user first gets option to select Report Header, Page Orientation, Font etc for master report.
    2. User can select a sub-report (pre-developed report frames. Not Sure about tool.) and apply the same format option (mentioned in step 1, except orientation) to it.
    3. User can select individual row/data cell to be displayed on the report through reference to DB tables in sub-reports.
    4. There can be N number of sub-reports each with independant formatting, data and data layout that could be integrated in single report.
    5 Once all selection is done, Java code generates an XML with all this info.
    Now, my requirement is dynamically write CR report based on this XML. I am not using BO enterprise, hence RAS SDK is out of scope. This report will be called thorough stand-alone .NET application in CITRIX environment.
    Can we do it in CR XI/CR 2008?
    Please feel free to comment in case you need more info. But I won't be able to post screenshots. NDA of course!
    Thanks in advance.

    I moved your post to the NET - SAP Crystal Reports forum.
    To start, you have a fair bit of work ahead of you. The Crystal reports SDK will not do the job. You will have to use the InProc RAS SDK which is included in both CR XI and CR 2008. I'd recommend going with CR 2008 as CR XI R1 (11.0) is out of support now and CR XI R2 (11.5) will be out of support come June of 2011. Next, make sure you have applied SP 3 for CR 2008:
    https://smpdl.sap-ag.de/~sapidp/012002523100007123572010E/cr2008_sp3.exe
    As an FYI, all files can be found on the downloads page:
    http://service.sap.com/sap/bc/bsp/spn/bobj_download/main.htm
    Next, you want to read up on RAS. I suggest the following:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10b840c0-623f-2b10-03b5-9d1913866b32
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b050afe0-2fa5-2b10-658d-98f214ba6a4a
    http://help.sap.com/businessobject/product_guides/boexir31/en/rassdk_net_dg_12_en.chm
    Samples are here:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples
    and here:
    http://www.sdn.sap.com/irj/boc/samples?rid=/webcontent/uuid/80774579-b086-2b10-db91-ed58c4dda375 [original link is broken]
    I also find this 3rd party link useful:
    http://book.soundonair.ru/sams/
    And as always, search these forums. Lots of info here. E.g.;
    Programaticaly add Table in CR database fields
    InProc RAS Issue
    Adding the columns dynamically in crystal report
    Also, see the search box at the top right of this page. It searches blogs, wikis, Kbases, articles and more - all in one go.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup

  • Crystal Reports 10 Datasource Location and SQL Query update

    I am running Crystal Reports 10 accessing SQL Server 2008 database on Windows 7. Our product changed database names and I'm trying to update reports to point to the new database. Sounds nice and simple. The database has no structure changes yet, it's just a copy and rename of the old database. Both databases exist, same SQL instance, same permissions, etc. ...
    Existing working report:
       Has an ODBC (RDO) location to database DbVersion1
       If I run Show SQL Query, the database name is in the query text (i.e. FROM DbVersion1.dbo.MyTable)
    Attempted:
       In Set Database Location popup, I created a new ODBC (RDO) connection to database DbVersion2
       Updated Current Data Source for report to this new ODBC (RDO) connection.
       Ran Verify Database. Popup stated "The database is up to date."
    But when I run "Show SQL Query", is still shows DbVersion1 in the text, and the report displays data from DbVerison1. When I display the Datasource Location for the report, it shows DbVersion2 as I changed to above. How do I "refresh" the SQL Query to recognize the new Datasource Location?
    Thanks,
    Gary

    Hi Gary,
    A possible couple of issues, CR 10 doesn't support SQL Server 2008 and it doesn't support Windows 7. We had to update CR XI R2 SP 6 and above to make SQL 2008 work. MS changed the name of their client dll so CR is not aware of the new drivers.
    MDAC native driver may work but not sure....
    Try OLE DB, it may work better.
    Thanks
    Don

  • Problem to run the Crystal report inside from SAP B1 based on SQL views.

    Hello,
    I have a problem to run my Crystal report inside from SAP B1 which is based on SQL views.And the SQL views are stored in a separate database in SQL server.The error which i am getting is saying the the tablename does not exist.What i need to do in order to sort this problem.
    Great if somebody can help me to sort out this so that i can run my report based on SQL views stored on separate database other than SAP databases inside from SAP B1.
    Edited by: rozenagrawal on Apr 19, 2011 11:51 AM

    Try using a SQL synonym in your company database for the views outside the company database. I don't know if SBO will let you get away with it, but its worth a shot.
    If your company database is MyCompany and you have a view called MyView in Views database, assuming the view belongs to schema dbo, and you want the synonym to belong to dbo schema in your company database, run this:
    Use MyCompany
    go
    create synonym dbo.OutsiderView for
    Views.dbo.MyView
    go
    select * from OutsiderView
    The select statement should return the contents of MyView in the Views database while you are connected to your MyCompany database.
    For more info, see the Books Online for MSSQL on topic synonym.
    You will need to change your CR options to include displaying synonyms along with tables, views, etc. You may also need to grant select to B1 users.
    Edited by: Cindy Lange on Apr 21, 2011 4:00 PM

  • Creating crystal report file dynamically.

    Post Author: malcomstewart115
    CA Forum: General
    Hi, everybody.
    I have one problem.
    How to create crystal report file(*.rpt)  in php dynamically.
    I mean, I want to create the "*.rpt" file with php code.
    Please help me. thanks everybody.

    Post Author: PWilkens
    CA Forum: General
    It sounds like you're defeating the power and purpose of Crystal Reports, or replace it with pure PHP (which I suppose could be done... but why?)
    What exactly are you trying to do?
    If you're trying to make certain parts of the report hide or reveal or change depending on variables settings in the PHP file, that's easy enough to accomplish by sending parameters with your PHP values into the report.  But the dynamic actions really need to be done within the report itself, accomplished through ample use of the section and field settings provided within the Report Designer.

  • Crystal Reports functionality from Save The Cat

    Sorry if I've missed this in the presentation video since I've only watched half of it, so I have no idea if this has been considered for development.
    I use "Save The Cat" from Blake Snyder to storyboard my scenes with Crystal Reports - minus his structure.. and I create my own story templates and then drop the whole thing into "Final Draft".
    If I had the flexibility to setup and re-use "structure" templates that would contain my scene cards with an overview of my scene cards as the structure under my script and the ability to toggle between the two...then where do I sign on the dotted line?
    If you could integrate this functionality into this software - and as I say, I'm not sure if you've done this - then I'm sold. In other words, you build with the cards, and worry about the script later.
    Cheers,
    C.

    I need more info from you. I have looked for info re. Powerbuilder 11.5 here:
    http://www.sybase.com/products/modelingdevelopment/powerbuilder
    but I can not find any mention of Crystal Reports as it would apply to Crystal Reports being part of Powerbuilder 11.5. So, I need more explanation of this:
    I'm trying to use the Crystal Reports ocx from Powerbuilder 11.5
    Also, in the title of this post, you mention:
    Crystal Reports RDC from Powerbuilder.
    RDC and OCX are quite different technologies. It's one or the other. Thus please provide the following info:
    1) Is the CR component you are using (be it an OCX or RDC) part of Powerbuilder? Or have you purchased a stand-alone version of CR and are using the component in Powerbuilder?
    2) What component are you actually referencing?
    3) What is the version of the Crystal Reports you are using?
    Ludek

  • How to create crystal reports using MSDE 2000?

    Post Author: S_Muhilan
    CA Forum: Deployment
    Hi,
    I am using Crystal report 8.5. My Database sqlserver 2000. I generated reports and are working fine.
    Now I want to use MSDE 2000 instead of Sqlserver 2000 due to license factor.
    My application is developed in VB 6. The all the parts of the application is working fine except the report.
    All reports produced Database DLL error.
    So I opened the report and try to verify the database. But it gives pdssql.dll not found. Database error.
    After this error, I tried to create a new report and found that there is no option for MSDE 2000 database selection under more database.
    I usually select Sql server 2000 database under More Database option of location wizard.
    How to create crystal reports using MSDE 2000?
    Is it due to crystal report 8.5 verison problem? I also have crystal report 11 licensed copy.
    Please give me the good solution as early as possible
    RegardsS. Muhilan

    To use the inproc RAS SDK with CR.NET, you'd have to purchase either (1) Crystal Reports XI Release 2 Developer edition, and apply Service Pack 2 or above, or (2) Crystal Reports 2008 (not Crystal Reports Basic that comes with Visual Studio 2008).
    Sincerely,
    Ted Ueda

  • Error: "Couldn't create Crystal Reports Engine for report format version 10.0"

    Post Author: mkubala
    CA Forum: Crystal Reports
    I created several reports in ClearQuest v2003.6.15 using Crystal Reports v10. When a user tries to run these reports from his machine he gets the following error:"Problems executing ReportContact your ClearQuest administrator to verify that a supported version of Crystal Reports has been installed.Couldn't create Crystal Reports Engine for report format version 10.0"My version of CR is compatible with this version of CQ and he shouldn't need CR installed to run the reports so I'm not sure what the issue is?

    Post Author: nschindler
    CA Forum: Crystal Reports
    I have the same problem with ClearQuest 7.0.1.1, except the error contains 'version 11.0' instead of 10.0.This happened when I installed Crystal Reports XI Pro designer.  I followed the procedure to manually uninstall and re-install CR, which allowed me to to author report formats, but I still get this error when trying to view report in the ClearQuest for Windows client.  I tried to re-register all the CR viewer DLLs I could find, but still no luck.Any suggestions?  Thanks,Nate

  • Creating Crystal Report Thru InfoView Options

    Post Author: TriciaS
    CA Forum: Integrated Solutions
    When I click on New in InfoView, I see Crystal Reports as an option. I've been creating Crystal Reports locally, then loading them into InfoView.  Can I create Crystal Reports right through InfoView?  When I click on the Crystal Reports option in the New menu, I get a page not found error.  The same thing is true if I click Modify on one I loaded in.  Do we need to install something on the server to enable this?  Thanks!

    Post Author: kibbey
    CA Forum: Integrated Solutions
    Is anyone from BO looking at these forums?  I have noted the very same problem with our site.

  • Create crystal report file using JAVA

    Can someone tell me how to a Create crystal report file using JAVA Programming
    I want a very simple example

    Please help me. It's urgent.[http://catb.org/~esr/faqs/smart-questions.html#urgent]
    Be back in an hour or two...

  • Crystal report viewer from portlet

    Hi,
    I have a problem with opening Crystal report viewer from portlet. I am using Spring portletMVC but this doesnt matter in this case. After clicking some button a controller process form in method where is access to ActionRequest, ActionResponse. But how can I "redirect" with some parameters to plain JSP page where I can write something like this:
    CrystalReportViewer viewer = new CrystalReportViewer();
         viewer.setReportSource(rcd.getReportSource());
         viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
         viewer.dispose();
    Oh, perharps is understandable, sorry for my English and thanks for helping. Any code of link would be wonderful.

    I haven't worked with Crystal Reports in quite awhile, but in the past I've written code to launch Crystal Reports using OLE. If I recall correctly, there existed an ActiveX control that could be embedded into VB forms, and the like. I'm unsure, however, whether they continue to support this mechanism. Given that your requirements do not allow CLIENT_HOST or DDE, however, I am guessing that OLE automation would also be unacceptable.
    Have you looked at WEB.SHOW_DOCUMENT?
    Eric Adamson
    Lansing, Michigan

  • How to create crystal report for fixed assets

    Hi,
    I am beginner to SAP B1. I have to create crystal report on fixed assets. for the following fields I have to get data.
    Fixed Asset,
    Cost of Fixed asset,
    Disposal of fixed asset
    Scrap of fixed asset
    Additional cost on fixed asset
    Fixed asset cost after additional cost
    Rate of fixed asset –Depreciation item cost - Percentage
    Depreciation of fixed asset on item cost
    write-up cost on fixed asset –write-up
    Rate of fixed asset-Depreciation on write-up cost --percentage
    Depreciation of fixed asset on  write -up cost
    Net Book value of fixed asset.
    your help here is appreciated.
    Thanks,
    Challa

    Hi,
    Actually they are not going to standard reports as Revaluation amount we are creating User defined fields and that needs to be fetched to the report. As well they want original cost, depreciation original cost, Revaluation amount and depreciation on revaluation separately..
    As per my understand system will provide one cost and the depreciation on that.
    So, can somebody help me in guiding me..
    Thanks in advance.
    Thanks,
    Challa

  • Creating Crystal Reports with Crystal Report Server XI

    Hello,
    I am new to Crystal Reports, i installed Crystal Reports Server XI R2 on Windows 2003 server with SP2 and was able to launch Inforview application and also Central Management Console Log On.
    I can also see some sample reports which are installed during installation.
    Now my next task is to create Crystal Reports using Crystal Report Server XI R2. How can we create a crystal report now by only using Crystal Report Server XI R2?
    Do we have to install some other application to create Crystal Reports? I donot see any link on my server which i can use to create crystal reports. The only links which i can see are :
    Business Objects-->
         Crystal Report Server-->
                            .Net Administration LaunchPad
                            .Net Infoview
                            Business View Manager
                            Central Configuration Manager
                            Data Source Migration Wizard
                            Data Source Migration Wizard Help
                            Import Wizard
                           Online Developer Library
                            Publishing Wizard
                            Registration Wizard
                           Release Notes
                           Repository Migration Wizard
    Please help
    Thanks
    Vipin

    Two ways to create reports:
    1) You install the Crystal reports Designer (CRW32.exe).
    With your Crystal Report Server, you should also have received a second CD that would have the CR designer.
    2) You use the RAS SDK and create reports on the fly using the RAS report creation APIs - .NET or Java. Since you are in the .NET developer forum, I assume you might be interested in the .NET RAS SDK. Here is a list of resources i would recommend:
    Links to samples are [here|https://www.sdn.sap.com/irj/scn/wiki?path=/display/bobj/netBusinessObjectsEnterpriseSDKSamples]
    [How to use the RAS SDK .NET with In-process RAS Server|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10b840c0-623f-2b10-03b5-9d1913866b32]
    [Programing RAS|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b050afe0-2fa5-2b10-658d-98f214ba6a4a]
    [Choose the Right SDK for the Right Task|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f006a5e6-7e64-2b10-8a84-8b15ca5cacfc]
    For more help, search these forums (there are some great posts in here), the [notes database|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_ossnotes&query=&adv=true]
    [articles|https://www.sdn.sap.com/irj/sdn/businessobjects-articles] and [downloads|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/bobj_download/main.htm]
    Ludek

  • Problem with crystal reports get from All in One Best Practice package

    Hi,
    I tried to use Financial Statements crystal report download from All in One Best Practice package but encounter the below errors. I followed the guide in Manual Steps for Additional Datasource Creation to set up the additional data source. When i try to preview the report, I tried to set all the value to Null but the error message still appear. I believe this has something to do with the infoset but i not sure how to resolve this. Those report which connect to infoset doesnt seem to work for me.
    Errors:
    Failed to retrive data from database. (then i press OK)
    database connector error: 'no item structure data' (then i press OK)
    database connector error: 'RFC_Closed'
    Please advice
    Thank you

    Hi Afzal,
    I think you misunderstood. The crystal report i am talking about is the 23 crystal report template i get from All in One Best Practice package. All i need to do is follow the "Quick Guide to impletement SAP Best Practices for Business Intelligence V4.31" to make those template works. For those template that connect to Database type: SAP Table, Cluster or Function, i can make those work. The problem i facing now are those template (example: Financial Statements) that connect to Database type: SAP Info sets. The error i receive are stated in my first post.
    Please advice

  • Run a report developed on Crystal Reports XI from java

    Hi,
    I am trying to run a report developed on Crystal reports XI from my Java Web Project.
    I used the configuration specified in:
    http://businessobjects.com/pdf/dev_zone/crxi_java_startup_guide.pdf
    but I am getting the error:
    "com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: There is no server specified.---- Error code:-2147217390 Error code name:serverNotFound"
    when the code reaches the line: oReportClientDocument.open(reportName, 0)
    I am using Eclipse as SDK and Tomcat as Webserver.
    Thanks for the help.

    can i use it In J2SE
    if yes where i download it.also some link for reading

Maybe you are looking for