Crystal Reports Temp tables - Driving Me crazy

Our ongoing saga with temp tables and crystal reports continues. I am ready to go crazy, so any help would be appreciated.
Notes:
I create the ##tempsmall table in query analyzer, so it is present when the code executes.
When I use the sa/Corinne credentials, it works.
When I use a non sa set of credentials, I get an error saying the temp table is not found.
When I add the non sa user to the tempdb as a user, with DBO permissions, It works.
Code is below
Dim Report As New ReportDocument()
Report.Load("C:\KI\Customers\Live Customers\Brookledge\ReportRD\CrystalReportsApplication1\Projects.rpt")
Dim LogInfo As New TableLogOnInfo
Dim Tbl As Table
For Each Tbl In Report.Database.Tables
  LogInfo = Tbl.LogOnInfo
  LogInfo.ConnectionInfo.ServerName = "ocamb-vista"
  LogInfo.ConnectionInfo.DatabaseName = "mapps20"
  ' We need to figure out how to make this work with a non sa user?
  LogInfo.ConnectionInfo.UserID = "medequipuser"
  LogInfo.ConnectionInfo.Password = "mapps"
  'LogInfo.ConnectionInfo.UserID = "sa"
  'LogInfo.ConnectionInfo.Password = "corinne"
  Tbl.ApplyLogOnInfo(LogInfo)
Next Tbl
Report.Database.Tables.Item(0).Location = "tempdb.dbo.##tempsmall"
Dim v As New Viewer
v.CrystalReportViewer1.ReportSource = Report
v.Show()

Hi Scott,
The problem is tempdb is only accessible by the Administrator account and they are typically not to be used by anyone other than the system. This is how SQL server works, any query being run will create a temp table for the DB server to use and pass that data to the calling query, once completed the tempdb is deleted.
As you have seen, unless you set permissions each time for a specific user you don't have access to it. One option is to use real tables that you can populate and delete the rows of data each time. Not very efficient though.
Crystal respects all DB permissions so it's not a CR issue.
One possibility is in your front end you could use MS SQL Server API's, if there are any, or use a stored procedure to set permissions to the temp table before calling CR to set location. Sorry no samples to do this, its a DB server question.
Another option is to write the data into a Data Set and then set the location to the DS for CR to use. If you have more than 5000 row though don't do this or your reports will have performance problems.
CR does not have any API's that will allow you to access a table that it does not have permissions to get to. Basic DB security, you'll get the same log on error trying to connect ot any table that user doens't have access to.
Thank you
Don

Similar Messages

  • Dunning Letter as Crystal Report: What tables? (SAP B1 9.0)

    Dear Experts,
    I am being asked to revise the Dunning Letters for our clients.  The existing PLDs for each Dunning Letter shows most data fields as system variables.  The existing Crystal Report for Dunning Letter 1 is a conversion from the PLD and doesn't show table information for most of the report's main items.  There are tables in the report but they are standard ones (OADM, OADP, OCRD, OHEM, OSLP).  It also includes a "table" called "PLD__ITEMS" which has all the PLD system variables and no B1 table or field/column information.
    As I'm just now starting to work with dunning letters, I see that I can't even run this report in Crystal.  The PLD__Items datasource prompts me for a file path and class name.  Any ideas what one enters here to run the report outside of B1 (from the Crystal report designer)?
    The main focus of my question is: Has anyone created a Crystal Report to replicate the Dunning Letter and if so, what tables are involved and how are they connected?  If I can create a Dunning Letter entirely in Crystal, I can replicate it across all clients and get the correct fields/columns of data the clients want.  The inclusion of the PLD__Items apparently limits my ability to test the results.  I would prefer to avoid the PLD limitations.
    Thanks for any assistance.

    Thank you Nagarajan.  I have a dunning letter created in Crystal Reports for our client.  It is fairly limited in scope, it just has the customer name and address, invoice numbers and dates, amounts due and the text they wanted in it.
    I can import it into B1 9.0 and set it as the default for Dunning Letter #1 and it runs, but unlike other formats where there is a DocEntry and/or ObjectID and a ?DocKey@ or ?ObjectId@ parameter, how do I limit the report to just one customer?  Typical document layouts run for the document that's on the screen.  In the dunning process, the report runs once for every customer when the Dunning Letter Method is set to "One Letter per BP".  I have to limit the report to one customer at a time.  Right now, each dunning letter based on the Crystal report is identical and it contains all the data for every customer.
    So, does anyone have any ideas for what selection criteria needs to be included in the Crystal report to have it select just one customer from the dunning wizard tables?  Thanks.
    Michael
    Edit: I created a ?WizardID@ parameter and a ?CardCode@ parameter to limit the report to a single dunning wizard event and a single customer.  While it works fine in Crystal itself, it doesn't work in B1 at all.  I had thought that by limiting the report in this way, it would only create dunning letters for a single customer.

  • Crystal Report VS2005 - Table fields missing in Database Expert

    Hi,
    I am having a problem with the Crystal Report comes with Visual Studio 2005. I am trying to develop a customized report for SAP Business One. When I try to add two tables using the Database Expert, there are certain fields missing in the LINK page. This is a big problem for me because I need to link that field with another table. Oddly, it doesn't seems that there are anything wrongs with the missing fields. If I click OK and check at the Field Explorer, the missing fields are there!!!
    In other words, it is missing only at the Database Expert --> Link Tab. Anyone having the same problem? Is this a known issue or any patch that I can apply to resolve this issue?
    Thanks in advance for your help.
    Regards,
    Harianto

    Try this link to resolve your issue:
    Full Outer Join option for SQL Query and BW Query grayed out
    Thank you
    Don

  • Crystal Report - Linking tables

    Hi all,
    I had a look around for this subject matter but cannot find anything to answer my question.  If you know where I can find the answer, please let me know.
    I have 2 tables on Crystal Report and am trying to link the Primary table to the secondary one with a 'NOT EQUAL' link.  ie. I want all the records in the Primary table (about 4000) which Do Not have an entry in the secondary one (about 3500) so I am expecting to get about 500 records.
    I have tried with all the various link and Enforce Join options but cannot get the correct results.
    I have also tried to link them with an Inner Joint of Equal Type then created a formula of Primary.key.field <> to Secondary.key.field but this is not working either as it returns no records.
      Any idea?

    Hi All,
    This is to let you know that I have now found an answer to my questions (yiha!).  So thanks to James Gust who answered a note from Joey041 on March 2nd.
    Thanks a lot for being there.
    Cheers, Sylvie
    Edited by: SylvieWolpert on May 12, 2009 7:31 AM

  • Function module in crystal reports using tables as input

    We had a function module created with a few import parameters. We successfully linked it in crystal and were able to retrieve the data.
    To accommodate the requirement of being able to pick multiple values for some of the parameters, the import parameters were changed to tables. When testing in ECC, we are able to retrieve the data using the function module.
    However, when we're using the same approach as before in crystal reports, we are not able to retrieve the data.
    Is it possible in crystal to pass the input parameters to tables ?
    Any ideas what I might be doing wrong?
    Thanks,
    Mat

    Hi John,
    The solution is very simple. 
    You create a function module in ECC (t-code SE37) that will receive you input parameters, process them, and export a table with your results.
    In the function module you define an input parameter using a CHAR120 data type (ex. PERNR).
    In the function module source code you add logic to split the input parameter
    [SPLIT i_PERNR AT ',' INTO TABLE itab_PERNRS.]
    You then create a crystal report against your function module.
    In your crystal report you create a parameter using type "string" (ex. I_PERNR).
    When you execute the crystal report, you input a comma delimited string in the parameter.
    [00001234,00005678,00009123]
    The function module will receive the string of values, split the string to an internal table, and process accordingly.
    I still have no solution for the 120 character restriction in the CR->ECC interface.  In the meantime, I get around this by creating multiple parameters (PERNR1, PERNR2, PERNR3, etc.). 
    Each parameter is set up to pass a string of 120 characters to ECC.
    The function module is set up to concatenate the parameters before splitting.
    [CONCATENATE PERNR1 PERNR2 PERNR3 into I_PERNR]
    Hope this helps.

  • Crystal Reports - ECC Tables - Row level security on Multiple tables

    Hi Experts,
    We are implementing Crystal Reports directly reporting on ECC Tables.  Lot of information on row-level security has been provided by experts Ingo Hilgefort, Don Williamsand Mike Seblani, but not related to multiple tables or Wild cards
    Requirement:
    Crystal Users should have access to ALL the tables in ECC, but restricted by Company code, plant, Sales Organization, Purchasing Organization fields to what ever table it applies to. Example: MARC table should be restricted by Plant, BSEG table should be restricted by Plant and company code, GLT0 table should be restricted by Company code..etc
    Users should ONLY see their Organization related data.
    Solution Developed:
    1. We created custom authorization object with BUKRS and WERKS
    2. In  /CRYSTAL/RLS  we used Wild Cards *, +  rather than specific table  and referenced the custom authorization object with =BUKRS and =WERKS  in the Field Value
    3. Enabled global lock
    4. Custom Authorization object was added to user-profiles with corresponding restrictions
    *Observation:*
    1. This security works when a crystal report was developed on a ECC table which has both BUKRS and WERKS
    2. This setup DOES NOT work when a crystal report developed on a table with either one of BUKRS or WERKS
        Example: Does not work on MARC table - error message "Database connection error: /CRYSTAL/OSQL_EXECUTE_QUERY Message: field T0~BUKRS" unknown"
       Does not work on GLT0 table - error message "Database connection error: /CRYSTAL/OSQL_EXECUTE_QUERY Message: field T0~WERKS unknown"
    Trouble Shooting:
    In the "where clause" of the internal ABAP code generated for MARC, system is checking for BUKRS - which  should not be the expected result
    ANYTHING WRONG IN THE SECURITY SETUP ? PLEASE ADVICE
    Note: Document "BusinessObjects XI Release 2, Integration Kit for SAP, Installation Guide" does not talk much about this multiple table restriction. Any other document to be referred to ?

    I'm not sure how that would help; by using the Faculty_ID Session Variable I can identify the CRN and Term of all courses a faculty member is teaching. But I don't think that has to do with the problem I am having?

  • Crystal Reports - Two Tables in one report, grouped by machine.

    I have two tables for machine schedules.  One is a Current Job Table, and the other is a Que Job Table.  I do have tables joined to a definition table for the machine name.
    Cur Job Table - Def table
    Que Job Table - Def table
    I want to report the information from the current job table for each 13 machines in sequence.  Some machines may have more current jobs than qued jobs.
    ...Machine 1 (Machine Name)
    .....Current Jobs (Cur Job Table)
    .....Qued Jobs (Que Job Table)
    ...Machine 2 (Machine Name)
    .....Current Jobs (Cur Job Table)
    .....Qued Jobs (Que Job Table)
    Etc.
    Is there a way to do this easily?  I have tried grouping and sub reports.  Seems like I end up with duplicate records due to the SQL joins.

    Sharon,
    Select distinct will not work here, as select distinct checks all fields in the record, and when joining the two detail tables, it will not clear out "duplicates" on only one side of the join.
    I would also humbly suggest that using Select Distinct to try to "clean up" a query is rather dangerous.  You may end up dropping some data that should appear on the report.  (In fact I recently had to fix a report due to this issue - coded by someone else, of course!  :->)  If you are getting duplicate records and you don't want them, the query should be coded to produce the desired result set WITHOUT the Distinct clause being the reason duplicates are dropped.  (This is not to say that select distinct is not useful, or should never be used.  If you need a distinct list of customers over a date range, using Select Distinct custcode from sales where date between {?start} and {?end} is perfectly OK.)
    HTH,
    Carl

  • How to build Table of Content in Crystal Reports

    Hi,
    Initially, I am looking for an article about how to build Table of Content in Crystal Reports in table-based approach----including how to write to DB table from report:
    http://support.businessobjects.com/library/kbase/articles/c2011950.asp
    However, the link above is invalid. I also searched through SDN articles, but no luck.
    Can someone please forward me the link if you happend to know?---does not have to link to this specific article, any working solution is just fine.
    I am aware of another approach which put the TOC to the end of the report(http://www.ml-consult.co.uk/cryst-05.htm), which probably does not satisfy the requirement.
    If you have other solutions, your share is greatly appreciated.
    Thanks a ton!

    [Is it possible to create a table of contents in Crystal Reports?|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313335333133303330%7D.do]

  • Need help in creating table in crystal report for visual studio 2010

    Since there is no table support in crystal report,how can I create a table in crystal report for visual studio 2010?
    I have a datatable and I need to show that in crystal report in table structure.
    I have tried using lines and boxes to generate the table but it is not working perfectly.
    How can I export the report in excel format in read/write mode saving all the formatting in the report

    Hi,
    Check sample codes from following:
    http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsSDKSampleApplications
    You can download the [Developer's Guide|http://help.sap.com/businessobject/product_guides/boexir31/en/crsdk_net_dg_12_en.chm] & [API Guide|http://help.sap.com/businessobject/product_guides/boexir31/en/crsdk_net_apiRef_12_en.chm]
    Thanks,
    Saurabh

  • Dynamic Parameters in Crystal Reports

    Post Author: Suresh Babu
    CA Forum: General
    Hi,
    Iam working in Business Objects Crystal Reports XI.
    I faced a problem when dealing with the multi value parameter.
    Iam taken a parameter it allows to choose multiple values from user.
    after selecting the values how to send these values to stored procedure.
    if iam selecting one value it retrieves the data perfectely. But if we select more than one value it does not retrieves any rows.
    ex: iam taking a parameter name @AlgorithmCode
    if iam select AlgorithmCode it retrieves the the data, if iam select more than on e AlgorithmCodes as  parameters its not working.
    If any one knows please help out.
    Thanking You
    Suresh Babu

    Hi,
    assuming all what you are using in the Crystal Report are tables using the OpenSQL connection (Table, ..) then you should be able to create the parameters as dynamic in Crystal Reports.
    Ingo

  • 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

  • Crystal Report Pick List - "Table ADM1 could not be found" Error

    Hi,
    When preview is select in sales order, we select pick list gets error.
    Crystal Report Window Forms Viewer:
    "Table ADM1 could not be found"
    Error in File Temp {   .........} .rpt
    The table could not be found"
    If I login remotely , then log into SAP as this user I do not get an error.
    I have given user full authorisation.
    I have run Verify Database.
    I am assuming it is some database or network user access rights.
    Could anyone help on this?
    Kind Regards,
    Eric

    Report was developed and tested against a 'test' database and then imported into a 'production' database.
    Problem appears to be that when B1 connects it does not reset the login credentials for the unlinked tables such as ADM1 and OADM.
    Performing the following steps appears to solve the problem.  Not sure how many of them are really necessary.
    1. Develop and test against the test system as before.
    2. Save as a .rpt file outside B1.
    3. 'Set Datasource Location' to the appropriate B1 datasource for the production database and individually link every table as well as the data source.
    4. Save the .rpt file again.
    5. Import into the production database.
    This does not specifically address the issue where it worked when logged in to the server but not remotely.  Perhaps when logged in remotely the test database was not visible but when logged in locally it was.

  • Can Crystal Report XI update data in a SQL Table

    Post Author: abidamin
    CA Forum: Data Connectivity and SQL
    Hi,
    I have a very specific requirement to update a flag field in one of SQL2005 database tables, I need to update a One character field with Y on all selected records printed on the report as a result of running the report successuflly.
    Can anyone let me know if it is possible to update a SQL table field using Crystal Report XI.
    Regards

    Post Author: SKodidine
    CA Forum: Data Connectivity and SQL
    Perhaps this KBase article can be of some help.
    http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2011921&sliceId=&dialogID=18608077&stateId=1%200%2018610053

  • Not able to get the tables in crystal report 2008

    Hi,
    I am using crystal report 2008 and trying to connect MS SQL using OLE DB (ADO) connection. After giving all DB credentials data base tables are not appearing in the connection. how to get the tables for selection in crystal report 2008.
    Regards,
    Sree

    In the CR Designer, select the connection and press the right mouse button. Select Options in the context menu and check if there is an entry in the Table name fiel. Maybe you have a placeholder there that does not match the names of the tables in the database. Just remove it, close the window by pressing OK and refresh the connection browser (press F5). Unfold the connection again and check if you can see the tables now.
    Regards,
    Stratos

  • Change crystal report data source dynamically failed with multi tables report

    hello all
    i have many reports created by someone else on his own machine using same database file i use
    my application use Visual studio 2013 win form with crystal report pack 9
    i use rpt files provided to me
    connect database use OLEDB
    to show form i use below code
    SQLstr = " select what ever  from  table "                      ' defined as Public
    reportName = rpt file path & report name
    showReport()
    public sub showReport()
    reportTable.clear()                                                       ' defined as Public
    DBAdapter = new oleDpdataAdapter(SQLstr,DBconnection)
    DBAdapter.fill(reportTable)
    dim rptDoc as new Crystaldesicin.crystalreports.Engine.ReportDocument
    rptDoc.load(reportName)
    rptDoc.setdatasource(reportTable)
    formRpt.RptViewer.reportsource = rptDoc
    formRpt.showdialog()
    now
    when i use one table report with (select from one table) >>>>> works perfectly
    but when i use report retrieve data from 2 tables and group   data like using
    SQLstr = " select 'table'.'coulumn', 'table2'.'column' ....... etc
    from 'table1'
    INNER JOIN 'table2' ON 'table'.'coulumn' = 'table2'.'column'
    it's not working and formrpt shown but asking for database login
    I noted that in database login window : server name refer to ORIGINAL DATABASE USED BY Report Creator not to my local database
    ================================================
    i tried to set
    rptDoc.datasourceconnection.item(0).setconnection("","databse file path and name", False)
    rptDoc.datasourceconnection.item(0).setlogin("admin","")
    but the same
    using dataset instead of reportTable the same error
    ================================================
    what i missed in this type of reports?
    ( apologize about long take and poor English )

    Hi
    Please have a look at the wiki Troubleshooting Issues with VS .NET Datasets and Crystal Reports.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

Maybe you are looking for