Updating the previously updated records in Crystal Reports

Hi All,
     Well I am currently working on Crystal report 11. The issue that I am facing is in regard to the already updated row's record.
In one of my reports I am fetching data from the database which is received by the Crystal Report's one by one as in the normal cases it is being done. For each record some manipulation is done and then it is printed for the user's viewing.
The problem that I am facing can be better be explained while taking an example.
Lets suppose, I have 100 rows of records in the database table which I have to show to the user after modifying any row of record if necessary. And in each row of record there are suppose 10 columns. Now in the data in the 10th column of the row is dependent on the any xth row of record which is a variable value which can be 5th row, 19th row or even 100th row.
      Now when I receive 1st row I manipulate it if required and print it, then I receive 2nd row and print in the same fashion, n so on. Now in the 15th row I receive some data by which I have to modify the 10th column of the 2nd row which I had previously modified and printed. This dependency could be for any row depending upon the kind of data the record brings.
     Is there any way to handle these kind of cases at the Crystal Report end side. If you need any further clarification in regard to this or any more information then please do let me know.

To be honest, I'm not really following the logic you need to implement.  However, if you base your report on an SQL Command, you can do all of the logic there.  (It is functionally equivalent to a database Stored Procedure.)  You can use a temporary table if you don't have a permanent one to store the modified data.  At the end of the command, return the already-modified data from the temp table.
One other possibility might be to read the data into arrays, perform the logic on the array data, then print.  You may run into array size issues (among other things), though...
HTH,
Carl

Similar Messages

  • Trying to change the data source for a Crystal Report.

    <p>The method below represents my best attempt to programatically change the data source of a Crystal Report. The goal is to have a routine that will update the data source for reports after they have been distributed to production servers. So far I have not been successful in saving the report back to the CMS. No exceptions are thrown, but when I view the Database Configuration of the report in the CMC nothing has changed.
    </p>
    <p>
    Am I missing a step, or is there another way to accomplish this?
    </p>
    <p>
    Thank you.
    </p>
    <hr />
    <pre>
    private void test(String reportName)
       throws SDKException, ReportSDKException, java.io.IOException
       IInfoObjects newInfoObjects;
       IInfoObject reportObj;
       ReportClientDocument clientDoc = new ReportClientDocument();
       DatabaseController dc;
       PropertyBag pBag;
       PropertyBag logonProps;
       ConnectionInfo newConInfo;
       ConnectionInfo oldConInfo;
       ConnectionInfos conInfos;
       int connOptions = DBOptions._ignoreCurrentTableQualifiers + DBOptions._doNotVerifyDB; //0;
       Fields connFields = null;
       String queryStr = "Select * From CI_INFOOBJECTS " +
          "Where SI_NAME='wfr.rpt' AND SI_KIND='CrystalReport' AND SI_INSTANCE=0";
       newInfoObjects = getCms().executeQuery(queryStr);
       if(newInfoObjects.size() > 0)
          reportObj = (IInfoObject)newInfoObjects.get(0);
          try
             clientDoc = getCms().getReportAppFactory().openDocument(
                reportObj
                , OpenReportOptions._refreshRepositoryObjects
                , java.util.Locale.US);
             dc = clientDoc.getDatabaseController();
             conInfos = dc.getConnectionInfos(null);
             for(int i = 0; i < conInfos.size(); ++i)
                oldConInfo = (ConnectionInfo)conInfos.getConnectionInfo(i);
                newConInfo = (ConnectionInfo)oldConInfo.clone(true);
                pBag = newConInfo.getAttributes();
                pBag.putStringValue("QE_ServerDescription", "alio");
                logonProps = new PropertyBag();
                logonProps.putStringValue("Trusted_Connection", "false");
                logonProps.putStringValue("Server", "alio");
                pBag.put("QE_LogonProperties", logonProps);
                newConInfo.setUserName("admin");
                newConInfo.setPassword("password");
                dc.replaceConnection(
                   oldConInfo
                   , newConInfo
                   , connFields
                   , connOptions);
          catch(ReportSDKServerException Ex)
             String msg = "A server error occured while processing the " + reportObj.getKind()
                + " object, " + reportObj.getTitle() + " (" + reportObj.getCUID() + "), from the CMS.";
             Utility.errorOut(msg, Ex);
          catch(Exception Ex)
             String msg = "An error occured while processing the " + reportObj.getKind()
                + " object, " + reportObj.getTitle() + " (" + reportObj.getCUID() + "), from the CMS.";
             Utility.errorOut(msg, Ex);
          finally
             clientDoc.save();
             getCms().commitToInfoStore(newInfoObjects);
             clientDoc.close();
    </pre>
    Edited by: Mark Young on Sep 10, 2009 2:16 PM

    <style type="text/css">
    /<![CDATA[/
        body
            font-size: 1.125em;
              font-family: helvetica,arial,"sans-serif";
          .code{font-family: "courier new",courier,mono,monospace}
          .bi{font-style: italic; font-weight: bold;}
    /]]>/
    </style>
    <p>Justin,</p>
    <p>
    Thank you for the reply. Time constraints have not allowed me to post back to this tread
    till now. I will try your suggestion. My assumption is that <i>Save the report back to the
    info store</i> refers to <span class="code">IInfoStore.commit(IInfoObjects)</span>.
    </p>
    <p>
    I'm afraid that I do not understand why I don't want to change the report client document,
    or why <i>successfully exporting the report with the new login/password</i> is not what I
    want to do. Any explanation on that statement would be appreciated.
    </p>
    <p>
    I did find a way to accomplish my goal. It involved adding the SSOKEY property to the
    logon property bag. Below you'll see my revised code which modifies the report logon and
    server. I have no idea what
    this does, and SAP support has not been able to tell me why it works. However, what I
    discovered is that if I changed the report option, <b>Database Configuration -> When
    viewing report:</b>, in the CMS to <span class="bi">Use same database logon as when report
    is run</span> from <span class="bi">Prompt the user for database logon</span>, then the
    SSOKEY property had been added to the logon property bag having an empty string as its
    value. This allowed me to successfullyupdate and save the modified logon back to the CMS.
    </p>
    <p>
    So I took a chance and added code to always add the SSOKEY property with an empty string
    as its value, and I could then successfully modify and save the report's logon info
    and server. Again, I don't know what this means, but it has worked so far. If anyone has
    some insight or comments, either are welcome. Thank you in advance.
    </p>
    <br />
    <hr />
    <pre>
    private void changeDataSourceOfAWFCrystalReports()
       throws SDKException, ReportSDKException, java.io.IOException
       IInfoObjects newInfoObjects = null;
       IInfoObject reportObj = null;
       IReport curReport = null;
       ReportClientDocument clientDoc = new ReportClientDocument();
       DatabaseController dbController;
       PropertyBag pBag;
       PropertyBag logonProps;
       ConnectionInfo newConInfo;
       ConnectionInfo oldConInfo;
       ConnectionInfos conInfos;
       int connOptions = DBOptions._ignoreCurrentTableQualifiers + DBOptions._doNotVerifyDB;
       Fields connFields = null;
       String outputStr;
       int numOfReports;
       int numOfQueryPages;
       double progressIncrementPerPage = 30;
       int progressIncrementPerReport = 0;
       // Path query to reports is in a .properties file.
       String queryStr = getAppSettingsFile().getWscAwfCrystalReportPathQuery();
       try
          // Executes IInfoStore.getPageingQuery() and generates a list of queries.
          getCms().setPathQueryQueries(queryStr, 100);
          numOfQueryPages = 0;
          // Gets a List&lt;String&gt; of the IPageResult returned from IInfoStore.getPageingQuery().
          if(getCms().getPathQueryQueries() != null)
             numOfQueryPages = getCms().getPathQueryQueries().size();
          if(numOfQueryPages &gt; 0)
             // Use 30% of progress bar for the following loop.
             progressIncrementPerPage = Math.floor(30.0/(double)numOfQueryPages);
          for(int queryPageIndex = 0; queryPageIndex &lt; numOfQueryPages; ++queryPageIndex)
             // Gets the IInfoObjects returned from the current page query
             newInfoObjects = getCms().getPathQueryResultSetPage(queryPageIndex);
             numOfReports = newInfoObjects.size();
             if(newInfoObjects != null && numOfReports &gt; 0)
                progressIncrementPerReport =
                   Math.round((float)Math.floor(progressIncrementPerPage/(double)numOfReports));
                for(int reportIndex = 0; reportIndex &lt; numOfReports; ++reportIndex)
                   reportObj = (IInfoObject)newInfoObjects.get(reportIndex);
                   curReport = (IReport)reportObj;
                   clientDoc = getCms().getReportAppFactory().openDocument(
                      reportObj
                      , OpenReportOptions._refreshRepositoryObjects
                      , java.util.Locale.US);
                   dbController = clientDoc.getDatabaseController();
                   conInfos = dbController.getConnectionInfos(null);
                   for(int conInfosIndex = 0; conInfosIndex &lt; conInfos.size(); ++conInfosIndex)
                      oldConInfo = (ConnectionInfo)conInfos.getConnectionInfo(conInfosIndex);
                      newConInfo = (ConnectionInfo)oldConInfo.clone(true);
                      pBag = newConInfo.getAttributes();
                      pBag.putStringValue(
                         "QE_ServerDescription"
                         ,getConfigFile().getDBDataSourceConnections());
                      logonProps = new PropertyBag();
                      logonProps.putStringValue("Trusted_Connection", "false");
                      <b>logonProps.putStringValue("SSOKEY", "");</b>
                      logonProps.putStringValue(
                         "Server"
                         ,getConfigFile().getDBDataSourceConnections());
                      pBag.put("QE_LogonProperties", logonProps);
                      newConInfo.setUserName(getConfigFile().getUNVConnectionUserName());
                      newConInfo.setPassword(getConfigFile().getUNVConnectionPasswordDecrypted());
                      dbController.replaceConnection(
                         oldConInfo
                         , newConInfo
                         , connFields
                         , connOptions);
                      newConInfo = (ConnectionInfo)conInfos.getConnectionInfo(conInfosIndex);
                   } // end for on conInfosIndex
                   clientDoc.save();
                } // end for on reportIndex
             } // end if on newInfoObjects
          } // end for on queryPageIndex
       } // end try
       catch(ReportSDKServerException Ex)
          // handle...
       catch(Exception Ex)
          // handle...
       finally
          getCms().commitToInfoStore(newInfoObjects);
          if(clientDoc != null)
             clientDoc.close();
    </pre>

  • Dynamic Parameter only showing 1000 records when Crystal report is run.

    I have created a crystal report using ODBC access to a table that has 3000 records.  I created a dynamic parameter to pull a list of all the Customer ID's in a customer table and the parameter will only show the 1st 1000 records.  In addition I cannot type in the customer ID that I would like.  Version of Crystal - Crystal 11.

    Oh, darn. So sorry. Looks like I hyperlinked the wrong URL (You'd think I got that down by now...). Anyhow here is the correct link:
    1218588 - How to increase the number of values in a dynamic parameter list in Crystal Reports?
    And in case the link does not work, or I goofed again, here is a copy of the resolution:
    Resolution
    CAUTION
    The following resolution involves editing the registry. Using the Registry Editor incorrectly can cause serious problems that may require you to reinstall the Microsoft Windows operating system. Use the Registry Editor at your own risk. For information on how to edit the registry key, view the 'Changing Keys and Values' online Help topic in the Registry Editor (Regedit.exe). It is strongly recommended that you make a backup copy of the registry files before you edit the registry.
    To increase the maximum number of values available in a dynamic parameter list of values, set the registry key: MaxRowsetRecords, to a value greater than 1,000.
    Open the Microsoft Registry Editor, and navigate to the path corresponding to the version of Crystal Reports used:
    Crystal Reports XI:
    -  HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.0\Crystal Reports\DatabaseOptions\LOV
    Crystal Reports XI R2:
    -  HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.5\Crystal Reports\DatabaseOptions\LOV
    Crystal Reports 2008:
    -  HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\Crystal Reports\DatabaseOptions\LOV
    Crystal Reports 2011:
    -  HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\DatabaseOptions\LOV
    Crystal Reports 2013:
    -  HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\DatabaseOptions\LOV
    Crystal Reports for Visual Studio 2010:
    -  HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\DatabaseOptions\LOV
    NOTES:
    -  Add the key: LOV, if it is not present.
    -  For 64 bit version of Microsoft Windows, the registry path will be slightly different, it will start with:
          HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\...
       But the rest of the registry path is the same.
    Add the String value: MaxRowsetRecords
    Set the value of: MaxRowsetRecords to the maximum number of values to display in the List of Values.
    For example, a value of 2000 will return up to 2000 values in the lowest level of a dynamic cascading parameter.
    IMPRTANT NOTES:
    - The higher the number of values is, the longer it will take the see the dynamic parameter prompt screen. In brief, it impact the performance.
    - The value 0 (Unlimited) will not work with BusinessObjects Enterprise XI or Crystal Reports Server XI, you must specify another value.
    After making changes to the registry, close and reopen Crystal Reports, or restart the Crystal Reports services for the BusinessObjects platforms.
    - Ludek

  • How to overcome the Memory leakage issue in crystal report 2008 SP2 setup.

    I have developed the small windows based application tool with help of  Visual studio 2008 for identify the memory consumption of crystal report object. It helps to load the crystal report objects in the memory and then released the object from the memory. The tool simply does the u201CLoading and Unloadingu201D the objects in the memory.
    The tool will be started once u201CTest_MemoryConsumption.Exeu201D executed. The u201CTest_MemoryConsumption.Exeu201D consumes u201C9768 KBu201D memory before load the crystal report object in memory. It means, 9768 KB is normal memory consumption for run the tool.
    Crystal report object initiated by the tool and object help to load the report in memory once the tool initiated the crystal report object. Now u201CTest_MemoryConsumption.Exeu201D consumes u201C34980 KBu201D memory during the crystal report object creation and report load process. The actual memory consumption of crystal report object is 34980u20139768=u201C25212u201DKBu201D. 
    The memory consumption u201C34980 KBu201D will be continued till the end of the process. The memory consumption will be reduced to u201C34652 KBu201D from u201C34980 KBu201D once report load process completed. It means, u201C328 KBu201D memory only released from the memory consumption. Tool enables the Release command for the crystal report object. But crystal report object does not respond to the command and will not release his memory consumption.
    The memory consumption u201C34652 KBu201D will be stayed in the memory once job ends.  If i again initiate the crystal report object then it crystal report object start to consume the memory from 34652 KB.
    Database objects and crystal report objects are properly used in the tool. The object release commands properly  communicated to crystal report setup. But the u201CCrystal report service pack 2u201D setup unable to respond the commands which has enabled from .Net Tool.  Crystal report objects are properly initiated and disposed in the tool. But the crystal report unable to release from the server.
    The memory consumption will be reduced once the server restarted or kill the application.
    Crystal report 2008 and crystal report 2008 SP2 setup available in the server.
    Microsoft .Net Framework 2.0 SP2, Microsoft .Net Framework 3.0 SP2 and Microsoft .Net Framework 3.5 SP1 are available in the server,
    Could you please suggesst how to avoid the memory consumption keep increasing and  how to release the memory consumption  once the crystal object disposed???

    Hi Don..
    My case is different one. I hope, the problem with Run time Installation setup file (Crystal report 2008 Serivce Pack2 installer) which we installed in the server.
    Let me explain with Live scenario which our client faced in crystal report 2008 Service pack2 Installer.
    Our client is using a application to help to print their reports. The application is developed with Windows service.
    Windows service keep on running in the server. Windows service executes the client 's crystal reports( Labels Report, Stock  report) which designed for clients need and the reports will be printed from printer. 
    10 Same type report (Label Report) will be printed in 1 minute. Reports are not printing during non business hours. But the windows service keep on running.  Memory cosumption of application will be 160 MB in business hours.
    For Example, On Monday the application memory consumption starts with 160 MB. The Memory consumption will be reached 165 MB  in peak business hours. Then the memory will be ended in163 MB in the End of Monday. It means, The memory consumption will be in 163 MB during the non business hours. Reports will not be printed in non business hours.
    On Tuesday, the application memory consumption starts with 163 MB and it will be reached 168 MB during the peak hours. The Memory consumption will be ended in 165 MB in the end of Tuesday.  The same process contiues till friday. End of friday, the memory consumption of the application will be ended with 170 MB.
    Application Memory Consumption slowly increasing in the server. In 5 days, Memory consumption reached Threshold value (170 MB) of the server. Application gets hanged up once the memory consumption reached 170 MB. We got the error messages as "Attempted to read write protected memory " / "Not Enough memory for process".  If we restart server / If we restart the service then memory consumption of application get reduced to 160 MB.
    From the above scenario, We came know that the either the problem with Application object or the problem crystal report object. In the application, We have checked dispose methods of application objects completly. I am sure that  application objects are properly disposed in the application. I hope the problem not with application objects. The problem with Crystal report objects.
    Application properly communicates the dispose methods to crystal report objects. Crystal report objects are not released from
    the memory.
    Crystal report 2008 Serive Pack 2 setup installed in the server. 
    As you said, If Crystal report runtime is not released from memory then memory consumption keep increase???  In service oriented architecture application, how to unload the crystal report runtime??
    Do you any fix for this kind of issue??
    Willl Crystal report 2008 service pack 3 help on this issue??

  • How to handle the OK button of the parameters prompt of a crystal report

    Hi,
    how to handle the OK button of the parameters prompt of a crystal report in vba.NET?
    I want to use the parameter prompt from the crystal report itself and I want to know when the report is ready. I need to export programatically by sending email to a list of employees after the parameters has been set. The emails I send depends on the results of the report.
    Im using a CrystalReportViewer control  in VS2010 and Crystal Report for VS2010 v13.0.1.220.

    Right. But the parameter screen is driven by the viewer. Unless you create your own parameter screen and pass the parameters to the report via code.
    Another thing I am not sure about:
    "Then by code I want to read all the employees id from the report and send email to them with specified pages of the report. (1 page per employee)"
    How do you plan on reading the employee ID from the report? I am not aware of any API that will read a value in a report so that you can then decide what page to send to whom.
    I think you're approaching this kinda backwards. A question to ask is; can you do what you are trying to do in code in the CR designer? If not, using APIs will not work either. I suspect your approach should be a report that uses an employee filter. Run the report for employee x, get the report populated with the data for that employee and email it. Repeat for employee x1, employee x2, etc.
    - Ludek

  • Return code 471 is returned from the server while saving a crystal report

    Hi All,
    The return code 471 is returned from the server while saving a crystal report.
    Could some one give me a solution how to overcome this problem and to save my crystal report.
    Thanks
    Jiten

    Hi Jitendra,
    request you to provide the complete error message along with the work-flow to reproduce the error and the version of both the Crystal Reports Designer and Enterprisee installed on the server.
    Regards,
    Jayendra.

  • Out of memory exception while reading the records in crystal report

    hi..
    im using sap crystal report version 13.0.2000.0.
    i've 27,000 records to be printed but when i run my application
    the exception error is displayed "Out Of Memory"..
    i've my appliation in VS2010 and OS is server 64bit
    and 4GB RAM..
    i dont know what to do ...

    Ok. So this is a brand new report created in CRVS2010(?).
    I'd like you to go to the database menu and select "Set Data Source Location". Expand the "Poperties" node and tell me what you see next to "Database Type"
    Also, I've also got a bit of a confusion on my part. In the inital post you say:
    i've 27,000 records to be printed but when i run my application
    the exception error is displayed "Out Of Memory"..
    But a bit later on you say:
    if there are 8000 records it'll take around 2 minutes
    to display the records..
    but there are 27000 records it will take more
    amount of time and the browser hangsup..
    So, is the issue when printing, or viewing?
    - Ludek

  • Deploying a report to the end user without using Crystal Reports Server

    Hello,
      I'm using Crystal Reports Professional XI.
      I finished creating a report that contains several subreports.  Now it's time for me to deploy the report to the end user so that they can start running it.  The company that I'm doing this consulting work for does not have Crystal Reports Server setup so what is the best approach to deploying this report to the end user?  For now it would just be one user using the report but down the road there could be other people within his department that are running it as well.
        if you have any questions or need additional information to answer my posting just let me know.  Have a good day.
    Regards,
    Ting

    Hi Ting,
    I see now.... In older versions of CR like 8.5 there was a Deployment Wizard one could use to compile the report and runtime into an executable to run on an end users PC so that user could preview and refresh the reports.
    That ability stopped as of CR 8.5 or earlier, I don't recall exactly now.
    Yes, if they want to be able to run your report they will need to install a copy of Crystal Reports, then just send them your RPT file, they can then set Database location to their DB Source and then preview and refresh the report as required.
    Or as mentioned use a third party app to do the same or write your own. It's quite simple to do and likely one of our samples applications is all you need with a few basic changes, report source and DB log on info would need to be updated.
    As for licensing, the end user must purchase a copy of Crystal Reports to be able to use your application. Third Party app's would include the licensing mostly but check with them if you go that way.
    The convenient part is if the users want to write their own reports they can.
    And for your sake if you want to protect your reports the next version of CR has a read only RPT file format that all the user can do is preview and refresh the report. They can not edit it in anyway.
    Thanks again
    Don

  • Get the parameter fields defined in crystal report

    I am porting my application from crystal 8.5 written in C++ to crystal 2008 in .net.
    Here I am not making use of crystal report viewer neither I am creating .rpt in .net code.
    I have a set of already created .rpt files.
    I have written a function in .net to export the crystal report.
    Its a generic function and will be called for multiple crystal reports.
    I am passing the parameter values to the report by making use of the following function :
         ReportDocument repDoc;
         repDoc.SetParameterValue(APPTYPE, strNextToken[0]);
         repDoc.SetParameterValue(COMPORROLETYPE, strNextToken[1]);
    Similarly I are setting other parameter values.
    The problem here is that, all the reports do not have parameter fields defined that I am trying to set.
    They may be present for one report and absent for another. In this case , if the report does not have a particular parameter
    field, then it gives error on setting parameters and subsequently fails.
    Now I want to find out through code what all parameter fields are defined in the report. Then I will only set those
    parameter fields?
    Please guide how can this be done.
    Thanks
    Sonam

    Not as trivial as you might think. You will have to loop through all the sections of the report looking for the objects you need. I don't have a code specific to parameters, but looping through al the sections would be something like the code below. But... this will only show you parameters in a section. It will not show you parameters used in a formula, record selection formula, group selection formula, text field or a conditional formula. In order to get those parameters, you's have to parse out each of those objects looking for parameters. And this is probably not an exhaustive list of places to look for a parameter in the report.  I get a headache just thinking about this...
    Dim crSections As Sections
    Dim crSection As Section
    Dim crSubreportObject As SubreportObject
    'set the crSections object to the current report's sections
    crSections = crReportDocument.ReportDefinition.Sections
    'loop through all the sections to find all the report objects
    For Each crSection In crSections
    crReportObjects = crSection.ReportObjects
    'loop through all the report objects to find all the subreports
    For Each crReportObject In crReportObjects
    If crReportObject.Kind = ReportObjectKind.SubreportObject Then
    'you will need to typecast the reportobject to a subreport
    'object once you find it (***you'd go to setting the parameter here - or not...)
    crSubreportObject = CType(crReportObject, SubreportObject)
    'open the subreport object
    crSubreportDocument = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)
    'set the database and tables objects to work with the subreport
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup

  • How to acheive the purchase order items in Crystal report

    Hi
          In crystal Report am using purchase order layout ,how to remove the unwanted space(i'm using only one item like cement alone so lot of space in page 1 )below screen shot show the clear view how to remove this using formula.if suppose am using 5 items that space will cover ,but for 1 item lot of empty spaces.
    Regards
    Vinoth

    Hi Vinoth,
    Please follow below Steps.
    In Crystal Report for Report Footer Section -- Report >>> Section Report >>> Print at Bottom of Page >>> Uncheck
    Please check attachment also.
    hope thid help
    Regards::::
    Atul Chakraborty

  • How to limit the number of records in WebI Report

    Hi,
    I have a requirement where I need to display the WebI Report data only if the number if record is less than 65k.
    Incase if the records are more than 65k then the report should be blank and a text message needs to be displayed.
    The client dont want to set the number of records either in universe or at the edit query at the report. They want to limit once the report is executed.
    Please let me know if its possible to do it at the report level.
    Thanks in advance!!
    Best Regards
    SAP BO

    Optional prompts are not a problem.
    Assuming you first query uses the following SQL statement
    select a,b,c from t where x=y and z=@prompt(...)
    The query for checking the number of rows should use the following SQL code
    select count(*) from t where x=y and z=@prompt(...)
    The original query should be modified as follows
    select a,b,c from t where x=y and z=@prompt(...) AND (select count(*) from t where x=y and z=@prompt(...)) < 65000
    Regards,
    Stratos

  • Trying to programmatically set the data-source for a Crystal reports report.

    I've got the following existing procedure that I need to add to in order to programmatically set the data-source (server, database, username, and password) for a Crystal reports report.
     I added the connectionInfo parts, but can’t figure out how to attach this to the existing
    this._report object.
    This is currently getting the connection data from the report file, but I now need to populate this connection data from a 'config.xml' text file.
    Am I trying to do this all wrong?
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using CrystalDecisions.CrystalReports.Engine;
    using WGS.Reports.Reports;
    using CrystalDecisions.Shared;
    using WGS.Reports.Forms;
    namespace WGS.Reports
    public class ReportService
    ReportClass _report;
    ParameterFields paramFields;
    ConnectionInfo connectionInfo; // <- I added this
    public ReportService()
    public void DisplayReport(string reportName, int allocationNo)
    if (reportName.ToLower() == "allocationexceptions")
    this._report = new AllocationExceptions();
    PrepareConnection(); // <- I added this
    PrepareAllocationExceptionReport(allocationNo);
    this.DisplayReport();
    private void PrepareConnection() // <- I added this
    //test - these will come from the config.xml file
    this.connectionInfo = new ConnectionInfo();
    this.connectionInfo.ServerName = "testserv\\test";
    this.connectionInfo.DatabaseName = "testdb";
    this.connectionInfo.UserID = "testuser";
    this.connectionInfo.Password = "test";
    this.connectionInfo.Type = ConnectionInfoType.SQL;
    private void PrepareAllocationExceptionReport(int allocationNo)
    this.paramFields = new ParameterFields();
    this.paramFields.Clear();
    ParameterField paramField = new ParameterField { ParameterFieldName = "@AllocationNo" };
    ParameterDiscreteValue discreteVal = new ParameterDiscreteValue { Value = allocationNo };
    paramField.CurrentValues.Add(discreteVal);
    paramFields.Add(paramField);
    private void DisplayReport()
    frmReportViewer showReport = new frmReportViewer();
    showReport.ReportViewer.ReportSource = this._report;
    showReport.ReportViewer.ParameterFieldInfo = paramFields;
    showReport.ShowDialog();
    showReport.Dispose();
    Any help would be much appreciated.

    Hi Garry,
    Please post SAP Crystal Reports questions in their own forums here:
    SAP Crystal Reports, version for Visual Studio
    We don't provide support for this control now. Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Where is the Manage Object function in Crystal Reports 2013 for the CMC?

    I recently upgraded to Crystal Reports 2013 after upgrading our Crystal Reports server to SAP Business Objects Platform 4.1. Before the upgrade, I could publish reports from Crystal Reports XI to the CMC then right-click on the report title in the Repository Explorer (in Crystal Reports) and I had the option to select Manage Object where I could set the default settings for the CMC. I am not seeing this option in the new version of Crystal Reports. Is there something I need to do to see this option or has this option been removed from Crystal Reports 2013?

    Hi Kelley,
    You're right, the option doesn't exist in CR XI R2 and above.
    All the options now need to be set in CMC.
    -Abhilash

  • How to get the coloumns (fields) width in crystal report

    hi,
    how to get the coloumns width, date(get and set) and page size in crystal report using ras sdk .
    thanks

    Thanks

  • Controlling the no of records display in report

    Hi,
    I want to create a display field(text box item) in which user will write the number of records he wants to display in a SQL tabular report. I donot want the next button. Please suggest.
    regards
    Kaushik

    Hi Kaushik,
    first create the tabular report region.then add a text field there as choose any name of the text field say p4_x as item.Add one button say Go button.Select the region where you like to associate those text item and button with the region .
    Now go to the report attributes of the tabular report and then add one line after the automatic generated sql query as -- rownum <= :p4_x . and press Go button.
    e.g, select * from emp where rownum <= :p4_x .
    this will take the input from text field and restricted the record to be displayed only the number which you will put in the text box.
    More any query revert back to me .
    Cheers,
    Rosy

Maybe you are looking for

  • How to use (greater than) in web services call

    Hello, I am trying to query a set of assets where the external unique ID is greater than 400,000. My existing code looks like qryIn.ListOfAsset(0).ExternalSystemId = ">'400000'" However, using this will return any asset record starting with a 5 or ab

  • Wbs element and cost centre

    Hi All, For account assignment "P", when we put WBS element, cost center is autpmatically picked up...where is this linkage? This happens fopr all the WBS or there is some setting? Regards, Satyendra

  • Sap Script Queries

    Hi Experts, I need to print Long Text maintained for a record in sap. I have the Text ID and Text Object but don't know about the Text Name and I have to print this Long Text in my SAP SCRIPT to be shown on the Form and i am not doing changes in stan

  • Count field in table

    hallow i have a table and i wont to now if i have field datbi appear more then once datbi is<b> variable</b> i give example table a_itab datbi <b>20071231</b>     20070201     0000014848      <b>20071231</b>     20070401     0000014849 20061231      

  • When is the Flash issue going to be fixed in Lion?  Freezes every time...

    I can't even load the YouTube website without my entire computer coming to screeching halt.  I have to hard reboot my computer everytime.  Doesn't matter if the youtube video is embedded in another website as long as its a flash video it crashes my c