Crystal Reports 2008 - dynamic parameters not returing all data

I am having the same issue with Crystal Reports 2008. Only returning 135 customers in a dynamic paramaters when the list should be 3288.
When I re-create the parameter by using a command instead of relying on Crystal to return the data from the db table Crystal returns only 5"pages" of customers to select from.
I have tried to run the report with this reduced selection & it then crashes.
Any ideas??

This article may help you to increase the number of values in the parameter
KBase Article ID:c2017238
Article refers to: Crystal Reports XI BusinessObjects Enterprise XI
Symptom
For performance reasons, in Crystal Reports XI Release 1 and Release 2 the maximum number of values that are returned for a list of values is set to 1000. If you have a cascading List of Values (for example Country > Region > City), the lowest level (in this case City) will only display a maximum of 1000 values. This means that the higher-level prompts may display far fewer values than you expect. The list of values provides the data for the dynamic parameter list.
How can you modify the maximum number of values available in a dynamic parameter list?
Resolution
To increase the maximum number of values available in a dynamic parameter list, you must add a registry key.
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 (System.dat and User.dat on Win9x computers) before you edit the registry.
Crystal Reports XI Release 1
1.     Create a registry key HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.0\Crystal Reports\DatabaseOptions\LOV.
NOTE     Alternatively, you can create the registry key HKEY_CURRENT_USER\SOFTWARE\Business Objects\Suite 11.0\Crystal Reports\DatabaseOptions\LOV and that key will override the settings of the HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.0\Crystal Reports\DatabaseOptions\LOV key.
2.     Add a string value "MaxRowsetRecords" and set the value to the maximum number of values that you desire for your report. For example, a value of 2000 will return up to 2000 values in the lowest level of a cascading parameter. NOTE: The value 0 (Unlimited) will not work with BusinessObjects Enterprise XI or Crystal Reports Server XI, you must specify another value.
NOTE     The higher the number of values is, the longer it will take the Enter Values dialog box to populate with values.
3.      After making changes to the registry, restart the affected service or application as required.
Crystal Reports XI Release 2
1.     Create a registry key HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.5\Crystal Reports\DatabaseOptions\LOV.
NOTE     Alternatively, you can create the registry key HKEY_CURRENT_USER\SOFTWARE\Business Objects\Suite 11.5\Crystal Reports\DatabaseOptions\LOV and that key will override the settings of the HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.5\Crystal Reports\DatabaseOptions\LOV key.
2.     Add a string value "MaxRowsetRecords" and set the value to the maximum number of values that you desire for your report. For example, a value of 2000 will return up to 2000 values in the lowest level of a cascading parameter. 
NOTE     The value 0 (Unlimited) will not work with BusinessObjects Enterprise XI or Crystal Reports Server XI, you must specify another value.
3.     After making changes to the registry, restart the affected service or application as required.
Regards,
Raghavendra

Similar Messages

  • Integrate Crystal Reports 2008 in Lotus Notes 8.x

    We allready use Crystal Reports 2008 with Lotus Notes 8.x trough NotesSQL 8.5. This works fine.
    Now we want integrate Crystal Reports 2008 directly in Lotus Notes 8.x. so that the user can start reports directly from his Lotus Notes Application. Of course, data has to be retrieved in realtime (not with data stored in the report) and he should be able to pass parameters from a lotus notes form.
    All informations we found are quit old (Crystal Reports 8.5 and Lotus Notes R5). Does anyone has an idea how to start and where to find new documentations? Is there maybe even a sample application availabl?
    Any help is welcome!

    Hello Alain, I have the same troubles. I have some databases with Crystal Reports 9. But no solution for Crystal Report 2008.
    Which dll's are needed?

  • Crystal Reports -  missing dynamic parameters when published to InfoView

    Hi all,
    I'm facing a problem when I publish Crystal Reports 2008 V1 which includes dynamic parameters on InfoView (either on BO EDGE 3.1 or Crystal Reports Server 2008 V1). Problem manifests itself in missing dinamic parameters - I get only static parameter panel and need to write in the value by myself... All other documents like Webi, Deski (on BO EDGE) works fine.
    I have tried to install all latest Service Pack's for Crystal Reports 2008 V1 but it didn't solve the problem. Btw, Crystal Reports 2008 V1 designer is installed on client machine.
    Here are the details of both installations:
    BO EDGE 3.1.
    OS: Windows Server 2003 SP2
    Repository database: MS SQL Server 2005
    CR Server 2008 V1
    OS: Windows Server 2003 SP2
    Repository database: MySQL
    Does anyone had a same problem?
    I will appreciate any help!
    Best regrads

    I had the same situation when I changed from a SQL server 2005 data source to a SQL server 2008 data source while using CR 2008.  Change printer option default in the report designer to use u201CNo Printer (optimize for screen display) and republish to InfoView.   Not sure why this would work, but it resolved the issue for us.
    Wendy

  • Bapi Function call from Crystal reports 2008. import parameters syntax.

    Dear,
    I have an issue with calling a function directly from Crystal reports (2008) in the R3 system.
    (if this belongs in another thread , please add the link if moved !)
    I try to get data through function "BAPI_CLASS_GET_CLASSIFICATIONS".
    Till now all possible input parameters have no data-result.
    I already read other threads stating that 'for example' the Language key needs to be provided in a single character. 'E' in stead of 'EN'.
    I also already created a Z-wrap-function that fills out all input parameters 'hardcoded'. This works.
    clearly there are som syntax changes in passing the values to R3 when called from Crystal Reports.
    Can someone state which syntax has to be followed for numeric fields, for datefields etc. (so when i make these dynamical, I know which syntax should be the outcome of the formula)
    in my function that doesn't work I use these selections:
    (this function is called in a standard report only calling this function)
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.I_LANGU_ISO} = "E" and
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.I_LANGU_INT} = "E" and
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.T_CLASS_OBJECTS.OBJECT_TYPE} = "MARA" and
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.T_CLASS_OBJECTS.OBJECT_KEY} = "000000000000000085" and
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.I_CLASSNUM} = "DSWTEST" and
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.I_CLASSTYPE} = "001" and
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.I_KEY_DATE} = Date (2011, 08, 05)
    I already tried other languages or the 'EN' as input.
    (I would like to know how the date is passed exaclty to R3.)
    The function is of course RFC enabled.
    when I call the my Z-function with predefined inputparameters in R3 it does give the wanted result.
    FUNCTION ZBAPI_CLASS_GET_CLASSIFICATION.
    ""Local Interface:
    *"  TABLES
    *"      OBJECT_CLASSIFICATION STRUCTURE  BAPI_OBJECT_VALUES
    *"      CLASS_OBJECTS STRUCTURE  BAPI_CLASS_OBJECTS
    data ZOBJECT_CLASSIFICATION type TABLE OF BAPI_OBJECT_VALUES.
    data ZCLASS_OBJECTS  type TABLE OF BAPI_CLASS_OBJECTS WITH HEADER LINE.
    ZCLASS_OBJECTS-OBJECT_KEY = '000000000000000085'.
    ZCLASS_OBJECTS-OBJECT_TYPE = 'MARA'.
    Append ZCLASS_OBJECTS.
    CALL FUNCTION 'BAPI_CLASS_GET_CLASSIFICATIONS'
      EXPORTING
        CLASSTYPE                    = '001'
        CLASSNUM                     = 'DSWTEST'
    *   KEY_DATE                     = SY-DATUM
    *   LANGU_ISO                    =
    *   LANGU_INT                    =
    *   CHARACTS_OF_CLASS_ONLY       =
    * IMPORTING
    *   RETURN                       =
      TABLES
        OBJECT_CLASSIFICATION        = ZOBJECT_CLASSIFICATION
        CLASS_OBJECTS                = ZCLASS_OBJECTS
    OBJECT_CLASSIFICATION[] = ZOBJECT_CLASSIFICATION[].
    ENDFUNCTION.
    please advise.
    once again if this should be moved to another forum , add the link please!

    Dear,
    I just debugged my Z-function, after adding all input parameters as in the standard BAPI function.
    All parameters seems to be passed correctly except from the table parameters from
    CLASS_OBJECTS
    So all I_parameters are passed :
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_LANGU_INT} = "EN" and
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_LANGU_ISO} = "EN" and
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_KEY_DATE} = Date (2011, 08, 05) and
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_CLASSNUM} = "DSWTEST" and
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_CLASSTYPE} = "001" and
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_CHARACTS_OF_CLASS_ONLY.BAPIFLAG} = ""
    but the table parameters aren't coming through:
    {ZBAPI_CLASS_GET_CLASSIFICATION.T_CLASS_OBJECTS.OBJECT_TYPE} = "MARA" and
    {ZBAPI_CLASS_GET_CLASSIFICATION.T_CLASS_OBJECTS.OBJECT_KEY} = "000000000000000085" and
    these are 'blanco' in the function.
    also after the function is executed and all data is retrieved, when passing the data back to Crystal reports, once again, the table result isn't passed to Crystal Reports.
    please advise

  • Unable to Save Crystal Reports(With Dynamic  Parameters to Infoview)

    I am using Crystal Reports 2008 and BOXI 3.1. I have 5 dynamic parameters and can't save my report to Infoview, but If I use Static parameter then I am able to save it.
    Any help would be highly interested?
    thanks
    nisniki

    What is the exact error message and the version of crystal reports.Can you also check that all the BOE services are up and running

  • Crystal Reports 2008 Page Header needed on all pages.

    I have Crystal Reports 2008.
    In my report I need the Page Header and Page Footer to appear on all pages.
    When I have over 50 detail records/lines the Page Header appears on only odd pages, the Page Footer is OK on all pages.
    How do I change the Page Header to print on all pages in CR 2008?

    Thanks what work was creating a Page Header b and moving all header info there.
    This report has 4 levels of groupings and I am finding that group effects a lot.

  • Crystal Reports 2008 Barcode font not exported to any format

    Hi,
    I am creating a report that will use IDAutomationC128XXL barcode font (GS1 standard). I have downloaded and installed this font in my machine. I use the Visual Basic UFLs (IDAutomationFontEncoderUCC128()) to convert my content to barcode. I also have changed the field's font to IDAutomationC128XXL (by right click and field formatting). After this, i am able to see the barcode created in the my report preview. However when i try to export my report to PDF or any other format, the barcode is not coming up. It comes empty when i export to PDF.
    Am i missing any step to print barcodes in PDF during export from crystal report?

    Hi Sankara,
    Licensed fonts are Not exported to PDF.
    You should get in touch with IDAutomation's support and ask what are the alternatives.
    -Abhilash

  • Some questions on Crystal report's dynamic parameters

    With respect to the thread [How can we use C# to read dynamic parameter's value list from .rpt?|How can we use C# to read dynamic parameter's value list from .rpt?].
    I have some further questions:
    1.How can one differentiate between a Static or Dynamic parameter in a report document using c# code?
    2.Is there a way to know what the data source for the dynamic field is, I mean can we know the name of the table which is set to the dynamic field to pull data from?
    3. Is there any Report Application Server (RAS) API that allows us to work with dynamic parameter in a report document?
    Thanks,
    Qin

    1.How can one differentiate between a Static or Dynamic parameter in a report document using c# code?
    - I'm not aware od any API that will directly tell you that a parameter is dynamic or static.
    2.Is there a way to know what the data source for the dynamic field is, I mean can we know the name of the table which is set to the dynamic field to pull data from?
    - the only way you can find this out is through RAS.  Off the ParameterField class from there is a BrowseField property.  If itu2019s a Dynamic parameter, I believe it returns the database field name that it uses to populate the prompt.
    3. Is there any Report Application Server (RAS) API that allows us to work with dynamic parameter in a report document?
    - See http://help.sap.com/businessobject/product_guides/boexir31/en/rassdk_net_dg_12_en.chm
    search for parameters.
    Ludek

  • Crystal Reports 2008 Command Parameters

    Using command prompts with text file import to supply a pick list.  Is there any way to have more interaction with command prompts to select ranges?

    I have written a SQL.  Below is the remaining part with the "where" clause:
    ,D._Session_
    ,D._Modified_
    ,D._Status_
    ,D._Created_
    FROM dbo."Ventas en Pesos" A
    INNER JOIN dbo.Dim_Categoria B
    ON A.Dim_Category_dKey = B.Dim_Category_dKey 
    INNER JOIN Dim_Geografica C
    ON A.Dim_Geografica_dKey = C.Dim_Geografica_dKey
    INNER JOIN Dim_Tiempo D
    ON A.Dim_Tiempo_dKey = D.Dim_Tiempo_dKey
    WHERE C.Compania ={?Compania}
    AND C.Region ={?Region}
    AND C.Tienda = {?Tienda}
    AND B.Area = {?Area}
    AND B."Nivel Proceso" = {?Nivel Proceso}
    AND B.Categoria = {?Categoria}
    For each "where" there has been imported a text file for a pick list.
    The question is that when the report is generated, the viewer of the report has to pick what content that needs to be reviewed in the report:  Is there a way to with these pick list to make them more like with 'ranges' or 'multiple values' instead of just picking content?

  • I'm getting the below issue when I try to deploy a report with Dynamic parameters, when I deploy it with static parameters I'm not getting this issue.

    I’m getting the below issue when I try to deploy a crystal report with Dynamic parameters in BI Launch Pad, when I deploy the same report with static parameters I can deploy and run it. I have Restarted the BI server, still the issue exitno use. kindly help me on this issue.
    “This error occurred: Adding Crystal Report "CrystalReport1.rpt" failed. The server with kind rptappserver returned an error result. Failed to copy the report file to the report object. Refreshing the report object properties might have failed. Failed to read data from report file CrystalReport1. Reason: Failed to read parameter object”.

    BO does not run dynamic params through the report as would happen without BusinessObjects (BO) or Crystal Reports Server (CRS).  When you publish a report with dynamic parameters to BO/CRS, the prompt is published to the repository so that it can be accessed through the Business View Manager (which can be installed as part of the client tools).  In order for this to work a couple of things need to happen:
    1.  You need to be sure that you check the "Update Repository" box on the Save As screen the first time you publish the report.
    2.  Your BO/CRS user needs to have "view" access to the Crystal2013ReportApplicationServer in the Servers section in the CMC - in fact, the Everyone group should be given view access to the server in order for dynamic prompts to work correctly.
    3.  In the Business View Manager, the Administrator user needs to give your user, or, even better, a Crystal Developers group full control access to the "Dynamic Cascading Prompts" folder.
    Best practice for dynamic prompts in a BO/CRS environment is to actually create the prompts in the Business View Manager.  This will allow you to create a single data connection that can be reused and also create lists of values such that the same list or prompt can be reused by multiple reports.  If you just create the prompts in Crystal, you will end up with multiple data connections to the same database, the prompts will use the whole query for the reports to get the dynamic values instead of just a focused query to the lookup table that contains the values, and there ends up being lots of duplication and chaos.
    -Dell

  • Crystal reports 2008 SP1 missing in BusinessObjects Crystal Reports website

    We have used Crystal reports 2008 as a reporting utility in our application and have released our product last year. During our release the latest software available  was Crystal reports 2008 base + SP1 + SP2 + Fix Pack 2.7 and same was mentioned in our documentation as mentioned in BELOW.
    The current supported version of Crystal Reports is Crystal Reports 2008 with
    Service Pack 2 and Fixpack 2.7. The installation sequence is as follows:
    1. Install Crystal Reports 2008 base.
    2. Install Crystal Reports 2008 SP1.
    3. Install Crystal Reports 2008 SP2.
    4. Install Fixpack 2.7. This can be found under the hotfix section on the web site.
    Questions
    1) Now the issue is that, Crystal reports 2008 SP1  is NOT available for download in the "Business Objects u2013 Crystal Reports Runtime Packages". Why was it removed? Any clue? Without this our instructions doesn't hold good.
    2) If Crystal reports 2008 SP1 will NOT be available any more then what is the equivalent installable for "Crystal reports 2008 base + SP1 + SP2 + Fix Pack 2.7" to be used?  Can Crystalreports 2008 SP3 Full Build + Fix Pack 3.3 be used instead of "Crystal reports 2008 base + SP1 + SP2 + Fix Pack 2.7" ?
    Pls Clarify.

    Hello,
    Download Service Pack 3.0 full build: https://smpdl.sap-ag.de/~sapidp/012002523100009989492010E/cr2008_sp3_fullbuild.zip
    and then Fix Pack 3.3: https://smpdl.sap-ag.de/~sapidp/012002523100016815822010E/cr2008fp33.exe
    Then you and your users don't need to go through all of those upgrade steps.
    Thank you
    Don

  • No SAP Datasources or SAP Toolbar in Crystal Reports 2008

    I cannot see the SAP toolbar or SAP datasources under "Create New Connection" in Crystal Reports 2008 SP1.
    After reading many threads on SDN and reistalling Crystal Reports 2008 SP1 and the BOBJ SAP Integration Kit many times I have not been able to get this to work. I have installed the following in order:
    - SAP GUI for Windows
    Release: 710
    Build: 1046700
    Patch Level: 12
    includes the BW 3.5 AddOn and BI 7 AddOn
    Crystall Reports 2008 SP1 which I installed all components except Legacy XML Export.
    Business Objects XI Integration Kit XI 3.1 for SAP which I installed all desktop components and all server components excluding web content and SDK. This was a local install on my PC.
    I have ensured that I have only one instance of SAPLOGON.ini on my PC.
    I have not applied the transports yet because I want to see the SAP datasources and SAP toolbar in Crystal Reports before I progress.
    We do not have Business Objects Enterprise and I'm not sure what "BOE 3.1 Client Tools" is referred to earlier in this thread. My understanding is that in addition to SAP and BW we just need Crystal Reports 2008 and the SAP integration kit.
    We are on ECC6 and BW 3.5.
    I hope someone can help.

    Hi Stratos,
    Thanks for your response. I finally got this working. My issue was that I originally used the Crystal Reports 2008 and BOBJ Int Kit downloads from the SAP support portal. I checked with another SDN user Steven Dierick - thanks Steven - for the version of Crystal Reports 2008 he was using (version 12.0.0.683).
    I downloaded Crystal Reports 2008 version 12.0.0.683 and the BOBJ Int Kit from the downloads section of sdn and it works!! SAP Toolbar, datasources and everything.
    Considering I'm using Crystal Reports 2008 SP0 are there any disadvantages of not using Crystal Reports 2008 SP1?
    If I'm better off using SP1 where should I download Crystal Reports 2008 SP1 and the appropriate BOBJ SAP Integration Kit?
    cheers,
    John

  • Crystal Reports 2008 connecting to Crystal Server 2011

    Hello SAP Experts,
    I am new with the Crystal Client/Server platform and the only knowledge I have with the infrastructure is from the Crystal Server 2011 documentation I have pulled from SAP's website.  I have looked at a lot of online resources but very few have the answers that I need.
    I built an instance of Crystal Server 2011 running on Windows Server 2008 R2.  Our clients are currently using Crystal Reports 2008 client where they connect directly to a SQL 2008 Data Warehouse to pull reports.
    For security reasons, they want to implement Crystal Server 2011 to connect to the SQL 2008 Data Warehouse as a single point of entry, instead of having several Crystal Reports 2008 clients connecting to the SQL Data Warehouse.
    The idea is to have the clients connect to the Crystal Server; the Crystal Server will then connect to the SQL Data Warehouse so clients can pull reports from it.
    My questions are:
    1.  Is it possible to connect a Crystal Reports 2008 client to Crystal Server 2011?  If so, how do I accomplish this?
    2.  Do I need to create a Universe in order for the Crystal clients to pull data/reports from the SQL 2008 Data Warehouse?  Or is there a way I can create a connection without a Universe?
    Any help offered is greatly appreciated.
    Thank you.

    Check our site for more info but in general CR fully respects all DB security, if the user does not have permissions on the table used in the report the report will fail to run.

  • Unable to save the Crystal Report with Dynamic paramters in Enterprise

    Hello,
    We are not able to save our Crystal Report with dynamic parameters in Enterprise, Error message as follows :
    "Failed to read data from report file C:\DOCUME1\...\crw{...}.rpt. Reason : Failed to read parameter object"
    CR Developer Version 12.0.0.683
    help us in this regard..
    thanks,
    Narasimha Murty

    Hello,
    The error message occurs because the user or group who created the LOV does not have the appropriate rights in Business View Manager.
    Try this hope its helps
    To resolve this issue follow the steps,
    1.Log on to Business View Manager as administrator.
    2.Click View > Repository Explorer.
    3.Right-click Dynamic Cascading Prompts. Click Edit Rights.
    4.Click the appropriate user or group receiving the error.
    5.Click the Granted option for the right to View, Edit & Set Security rights.
    6.Click OK. Close Business View Manager.
    The user or group is now able to save a report with dynamic parameters to Enterprise.
    Regards,
    Vinay

  • Crystal Reports 2008 - Changing Table Locations

    Hello,
    we have several reports which we use by different customers. The customers use different name spaces (table locations) for the same data. To use the same reports with different table locations, we wrote a piece of software replacing the connection strings and table locations. 
    Example:
    A report should be used in a test environment as well as in a production environment:
      The original SQL is (using a DB2 database on a AS400):
        SELECT alias.name FROM as400.production.users alias
      The modified SQL looks like:
        SELECT alias.name FROM as400.test.users alias
    Up to now we used Crystal XI and developed using RDC. We solved the above described problem by reading the report SQL string, replacing the table location in this string and assigned it back to the report object. Modifying the SQL string has the advantage that it works fine also for reports which contain a SQL command.
    Since Crystal Reports 2008 this is not possible anymore (no RDC, no direct way to modify the report SQL string).
    My first approach was to use the CrystalDecisions.CrystalReports.Engine.Table object. First I just wanted to see what really was the content of the Location and Name property:
    for (int i = 0; i < rdReport.Database.Tables.Count; ++i)
      Table rt = rdReport.Database.Tables<i>;
      Console.WriteLine("Table Nr : {0}", i);                   
      Console.WriteLine("  Table Loc  : {0}", rt.Location);
      Console.WriteLine("  Table Name : {0}", rt.Name);
    My problem with this is that the output for the report with the SQL in the above example is:
    Table Nr: 0
      Table Loc : users
      Table Name: alias
    So obviously not the real table location and table name is returned, but instead the table name for the table location and the alias for the table name. Unsurprisingly setting the location had not the originally desired effect.
    Furthermore if the report was designed using a SQL command, the location and in the name property contain the string COMMAND. Therefore the table object doesn't seems to be the solution to my problem.
    Thanks to the help of a user in this forum here, I figured out how to read the SQL string of a report. Unfortunately I did not found a way to assign it back to the report.
    Has anybody here an idea how to solve my problem? I'm open for every kind of hint.
    Thanks in advance,
    Ron

    My solution looks like this:
    ReportDocument rdReport = new ReportDocument();                   
    rdReport.Load(sReportName, OpenReportMethod.OpenReportByTempCopy);
    CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument rcDocument = rdReport.ReportClientDocument;                   
    for (int i = 0; i < rdReport.Database.Tables.Count; ++i)
        CrystalDecisions.ReportAppServer.DataDefModel.ISCRTable rctTable = rcDocument.DataDefController.Database.Tables<i>;
        if (rctTable.ClassName == "CrystalReports.CommandTable")
            Console.WriteLine("Processing CommandTable {0}",rctTable.Name);
            Console.WriteLine("  Old Qualified Name: {0}", rctTable.QualifiedName);
            Console.WriteLine("  Old Alias:          {0}\n" , rctTable.Alias);
            CrystalDecisions.ReportAppServer.DataDefModel.CommandTable tbOldCmd = (CrystalDecisions.ReportAppServer.DataDefModel.CommandTable) rctTable;
            CrystalDecisions.ReportAppServer.DataDefModel.CommandTable tbNewCmd = new CrystalDecisions.ReportAppServer.DataDefModel.CommandTable();
            tbNewCmd.Name = tbOldCmd.Name;
            tbNewCmd.Alias = tbOldCmd.Alias;
            tbNewCmd.CommandText = sNewSql;
            tbNewCmd.ConnectionInfo = tbOldCmd.ConnectionInfo.Clone(true);
            CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag pbAttr = tbNewCmd.ConnectionInfo.Attributes;
            // set dlls
            pbAttr["Database DLL"] = "crdb_ado.dll";
            pbAttr["QE_DatabaseName"] = "NL67S021OUD";
            pbAttr["QE_DatabaseType"] = "OLE DB (ADO)";
            pbAttr["QE_ServerDescription"] = "192.0.5.24";
            pbAttr["QE_SQLDB"] = "True";
            pbAttr["SSO Enabled"] = "False";
            // set connection string                  
            CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag pbLogOnProp = (CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag)pbAttr[sAttrLogOnProp];
            pbLogOnProp.RemoveAll();
            // strangely comma seperated values instead of semicolon seperated values are needed here
            pbLogOnProp.FromString("Provider=IBMDA400,Data Source=" + sServerName + ",Initial Catalog=" + sDBName + ",User ID=" + sUserId + ",Password=" + sPwd + ",Convert Date Time To Char=TRUE,Catalog Library List=,Cursor Sensitivity=3");
            tbNewCmd.ConnectionInfo.UserName = sUserId;
            tbNewCmd.ConnectionInfo.Password = sPwd;
            rcDocument.DatabaseController.SetTableLocation(tbOldCmd, tbNewCmd);                           
        else
            Console.WriteLine("Processing Table {0}",rctTable.Name);                           
            Console.WriteLine("  Old Qualified Name: {0}", rctTable.QualifiedName);
            Console.WriteLine("  Old Alias:          {0}\n", rctTable.Alias);
            CrystalDecisions.ReportAppServer.DataDefModel.ISCRTable rctNew = new CrystalDecisions.ReportAppServer.DataDefModel.Table();
            rctNew.Name = rctTable.Name;
            rctNew.Alias = rctTable.Alias;
            rctNew.QualifiedName = sDBName + ".V41TSTDBF.CRGUOPF";
            rctNew.ConnectionInfo = rctTable.ConnectionInfo.Clone(true);
            CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag pbAttr = rctNew.ConnectionInfo.Attributes;
            // set dlls
            pbAttr["Database DLL"] = "crdb_ado.dll";
            pbAttr["QE_DatabaseName"] = "NL67S021OUD";
            pbAttr["QE_DatabaseType"] = "OLE DB (ADO)";
            pbAttr["QE_ServerDescription"] = "192.0.5.24";
            pbAttr["QE_SQLDB"] = "True";
            pbAttr["SSO Enabled"] = "False";
            // set connection string                  
            CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag pbLogOnProp = (CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag) pbAttr[sAttrLogOnProp];
            pbLogOnProp.RemoveAll();
            // strangely comma seperated values instead of semicolon seperated values are needed here
            pbLogOnProp.FromString("Provider=IBMDA400,Data Source=" + sServerName + ",Initial Catalog=" + sDBName + ",User ID=" + sUserId + ",Password=" + sPwd + ",Convert Date Time To Char=TRUE,Catalog Library List=,Cursor Sensitivity=3");
            rctNew.ConnectionInfo.UserName = sUserId;
            rctNew.ConnectionInfo.Password = sPwd;                         
            rcDocument.DatabaseController.SetTableLocation(rctTable, rctNew);
            Console.WriteLine("  New Qualified Name: {0}", rctTable.QualifiedName);
            Console.WriteLine("  New Alias:          {0}\n", rctTable.Alias);
    Console.WriteLine("\nSetting parameter {0} to value {1}", rdReport.ParameterFields[0].Name, iDataId);
    rdReport.SetParameterValue(0, iDataId);
    Console.WriteLine("\nShow SQL: ");
    CrystalDecisions.ReportAppServer.Controllers.RowsetController rsController;
    CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument rdClient = rdReport.ReportClientDocument;
    CrystalDecisions.ReportAppServer.DataDefModel.ISCRGroupPath rdGroupPath = new CrystalDecisions.ReportAppServer.DataDefModel.GroupPath();
    string temp;
    string sql;
    rsController = rdClient.RowsetController;
    sql = rsController.GetSQLStatement(rdGroupPath, out temp);
    Console.WriteLine(sql);
    Console.WriteLine("Printing");
    PageMargins pmMargins = rdReport.PrintOptions.PageMargins;
    pmMargins.bottomMargin = 350;
    pmMargins.leftMargin = 350;
    pmMargins.rightMargin = 350;
    pmMargins.topMargin = 350;
    rdReport.PrintOptions.ApplyPageMargins(pmMargins);
    rdReport.PrintOptions.PrinterName = sPrinterName;
    rdReport.PrintToPrinter(1,     // copies
                            false, // collated
                            0,     // start page
                            0);   // end page
    rdReport.Close();
    Regards,
    Ron

Maybe you are looking for