Updating tables in report

Post Author: JRKenney
CA Forum: General
We use Crystal Reports XI to write custom reports for our business's primary application. The reports are then imported into the application as Custom Reports and the application uses a runtime version of Crystal to generate the report. All reports are built off of views provided by the application builder. The views are created by using the format:select * from <db>.dbo.<table>  While I know this method of creating views is not recommended, it's what we are stuck with from the application builder. A problem arises that whenever there are updates to the application, there may be new fields for any particular table. I found out awhile ago that this created problems in that those new fields were not being incorporated in the Views since views are built only once when the original code is run to build it, but I found a way to have the Views refresh every evening, essentially rebuilding them in case a modification arises.We have been experiencing since the most recent update, Custom Reports crashing the application and not running. I have narrowed the problem to those reports where new fields have been added. The reports will run fine natively in Crystal (it appears to handle these missing fields just fine), but the runtime is where I experience the problem.I can resolve the issue by deleting the affected tables from the Database Expert listing in Crystal and re-adding them to get the updated fields, but then this will remove any of the fields being used from that table. I've tried to figure out a way to "refresh" the table listing without removing it, but haven't found anything. Does anyone have any ideas on what I can do?Any help would be greatly appreciated since I don't want to have to recreate a bunch of reports.Johnnie

Post Author: JRKenney
CA Forum: General
OK - I've found that using the Update button in Set Data Source Location has been useful in getting the fields to update, but I am still having problems with some of the reports and the only fix seems to still be to remove the problematic table and re-add it. Again, any advice that any of you may have on what may be the issue/difference between running the report in the full Crystal program and the run-time engine would be helpful. Johnnie

Similar Messages

  • Ora-20001 when creating a form on table with report (bug?)

    Having some trouble creating a "Form on table with report".
    1) I pick my table
    2) take most of the defaults on the page where you pick the report type (interactive) and the page number (I changed it to 950). next->
    3) Do not use tabs. Next->
    4) Select all columns for the report. THEN (here's the problem) set an optional where clause of system_role_name like 'ODPSPOPUP%'. Next->
    5) choose standard edit link. next->
    6) Specify a page of 951 for the form (leave others defaults). next->
    7) Set the form primary key (defined in table). next->
    8) use existing trigger. next->
    9) choose all columns for the form. next->
    10) Leave actions to insert, update, delete. next->
    11) Get to the summary page and click Finish
    Then I get an error page saying:
    ORA-20001: Unable to create query and update page. ORA-20001: Unable to create query and update page. ORA-00933: SQL command not properly ended
    If I go back to step 4 and erase my where clause the wizard completes successfully.
    Also if I change the report type in step 2 from the default of "Interactive" to "Classic" the wizard completes successfully. However upon running the report I get a query parse error. Looks like the where clause in the report sql is: system_role_name like ''ODPSPOPUP%'' (two single quotes on each side).
    It looks as if you cannot specify a where clause with a quoted string. The wizard is expecting a bind variable.
    Workaround(s):
    1) Don't specify a where clause when report type = Interactive in "create form on table with report" wizard.
    or
    2) Specify a bogus where clause using bind variable syntax such as "system_role_name like :BOGUSVARIABLE". Then edit the report query once the wizard finishes and change the where clause to the constant string you wanted to use in the wizard (e.g. "system_role_name like 'MYSYSTEM%'")
    Apex: 3.2.0.00.27
    Database: Oracle Database 11g Enterprise Edition 11.1.0.7.0 64bit Production (Oracle EL5)

    Andy,
    It's a bug, all right. Thanks for the detailed problem description. We'll fix it when we can.
    Scott

  • Data Migration Opening Balances are not updating in the Report F.08

    Hi,
    We have uploaded the GL balances in 2008 for the year 2007. But they are not updating in the F.08 report when i executed for 2008.
    Why they are not updating in the report. In which table can i check the Data migration values in the system?
    Thansk
    Kishore

    Hi We have uploaded all the values in 2008 with 2008 date. fiscal year is K4.
    F.08 Report for the year 2008 is showing only 2008 accumulated values. But not showing the Opening balances which we have uploaded in 2008 for the before years like 2007.
    Why it is showing like that?
    Thansk
    kishore

  • How to Highlight the CURRENT RECORD in a Table with Report Form

    Hi,
    I have created a Table with Report Form....let suppose the table is - EMP
    Report page - 1
    Form page - 2
    Now, when I do Create / Update on Page 2,....the control is back on Page1.
    Suppose in the Report Page (Page1)..we have 10 records....NOW how should I highlight the CURRENT RECORD in Page 1 with some color to identify the record which I have updated/created just now...
    Thanks,
    Deepak

    Hi Deepak,
    You could do that with a custom report template. I've done that here: [http://apex.oracle.com/pls/otn/f?p=267:175]
    Go to Shared Components, Templates and create a new Report template as a copy of your existing one. Then edit your template. In the above example, the Column Template 1 setting was:
    &lt;td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t18data"&gt;#COLUMN_VALUE#&lt;/td&gt;I copied this into the Column Template 2 setting and updated the Column Template 1 setting to:
    &lt;td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t18data" style="background-color:red; color:yellow;"&gt;#COLUMN_VALUE#&lt;/td&gt;I then set the Column Template 1 Condition to: Use Based on PL/SQL Expression
    and the Column Template 1 Expression to: '#EMPNO#' = '&P178_EMPNO.'
    (In my example, P178_EMPNO is the single item on the linked to page.
    Save those changes and go to your report and change its template to the new one. As long as a selection has been made and P178_EMPNO has a value, the condition will make sure that the report uses the first template for the row with the matching EMPNO value. All other rows get the template from Column Template 2.
    Andy

  • Form on a Table with Report, 2 Pages

    I have a view and i am using this to create a page as follows for insert/update/delete .
    (1) create application from scratch
    (2) on page 1 using wizard choice "Form on a Table with Report, 2 Pages"
    (3) Follows the screens and create the 2 page where first page is a report and when i click on edit(in my case) it goes to next page for insert/update/delete.Everything like insert/update/delete works fine .
    Now this view has say three columns
    (1) element_type_id
    (2) element_name
    (3) yesnoflag
    changing element_name and yesnoflag column is ok but then i need to have element_type_id corresponding to the element_name from some other table.
    Question1
    How should i get the element_type_id corresponding to the element_name .so when i create a new record it goes to page 2 and i can provide LOV for element_name and enter into yesnoflag, how can i get the element_type_id populated corresponding to the element_name entered.
    Question2
    Also in my application i have name element_type_id as primary key .I am not sure if thats a good idea or should i make element_name as primary key ?
    please help.
    Thanks,
    Sachin

    hey rui--
    by "adjust your html", i simply meant that you should look at your page, think about the html that's being used, and adjust it as necessary to make your data wrap as desired. now that i'm pretty sure i understand your issue, i can tell you the adjustment. you're saying that your form shows your long column "correctly" with data broken up onto separate lines by carriage returns or linefeeds. when you display that same data in your report, those carriage returns ( chr(13) ) and/or linefeeds ( chr(10) ) aren't observed. that's because they don't mean much in regular html. two ways to approach this would be:
    a) replace your carriage returns with explicit <br> tags to get the breaks that you want...
    select test_id, replace(test_description,chr(13)) test_desc from my_table;
    b) wrap your column with <pre> tags to preserve all the original formatting of your data...
    select test_id, '<pre>'||test_description||'</pre>' test_desc from my_table;
    ...and you could, of course, do option B in your report row template if you'd like.
    hope this helps,
    raj

  • Update table problem

    Hello,
    I want to update table building_test from table buildings if name is null or if county_id or region_id is null or -1
    The below query works fine if my building_test table contains null values. if I add a test value with region or county -1, I get the error below.
    Note: table building are in a remote DB. I just make it simple to post it to the forum.
    Tha datatypes of the tables are OK.
    Oracle is 9i
    BEGIN
    FOR i IN (
    SELECT building_id, name, county_id, region_id
    FROM buildings
    WHERE building_id IN (SELECT building_id
    FROM building_test
    WHERE name IS NULL
    OR county_id IS NULL
    OR region_id IS NULL
    OR county_id = '-1'
    OR region_id = '-1'
    LOOP
    UPDATE building_test
    SET name = i.name
    WHERE building_id = i.building_id
    AND name IS NULL;
    UPDATE building_test
    SET county_id = i.county_id
    WHERE building_id = i.building_id
    AND county_id IS NULL
    OR county_id = -1;
    UPDATE building_test
    SET region_id = i.region_id
    WHERE building_id = i.building_id
    AND region_id IS NULL
    OR region_id = -1;
    END LOOP;
    END;
    Error starting at line 5 in command:
    Error report:
    ORA-01401: inserted value too large for column
    ORA-06512: at line 17
    01401. 00000 - "inserted value too large for column"
    *Cause:   
    *Action:
    Any help will be much appreciated.
    Thank you.

    it's not always clear, what AND and OR combinations really do:
    WHERE building_id = i.building_id
    AND county_id IS NULL
    OR county_id = -1;can mean
    WHERE (building_id = i.building_id AND county_id IS NULL) OR county_id IS NULL 
    *OR*
    WHERE building_id = i.building_id AND (county_id IS NULL OR county_id IS NULL)try with brackets and post the result.

  • Treasury deals without bank details not updated in CM report

    Hi all,
    when creating a deal in Transaction Manager via trans. code FTR_CREATE without Bank details the respective cash flows data are not transferred to Cash Management report FF70 due to some reason. please note, that planning level Bank unknown (Derived from Table T036V ) is specified per every financial instrument in question in Customizing ( TRM -> Transaction manager -> General settings -> Link to Cash Management -> Assign Planning Levels ).
    In this case I would expect an entry to appear in the Cash Management report FF70, in a respective Grouping and on earlier mentioned Planning Level Bank unknown  on the respective payment dates. However I cannot find those entries there.
    On the other hand update of CM report FF70 works fine when bank details are specified in the tab Payment details on a deal level.
    appreciate your suggestions/ solutions for this issue.
    BR,
    Renatas

    Hi Renatas,
    Yes, I believe so. As per my understanding, all transactions can be shown either under a bank or a customer in a CM report. (Keeping aside Vendors as we are not considering them at the moment).
    In your case, since you don't specify the bank details, the transaction is bound to appear under Customer.
    Until the transaction is posted, it will appear in the Customer row with planning level which you have maintained for Bank Unknown case. And after posting, it will move to planning group (thus level) which you have maintained in the customer master.
    The above explaination is solely based on my experience of testing various scenarios. You may try it in your development box before confirming.
    Hope it resolves your issue.
    Thanks and regards,
    Abhinav

  • Update Power View reports properties using custom code

    Is there any way to update power view reports uploaded in SharePoint 2013 shared data source link using custom code?
    Best Regards,
    Sameer Salunke
    MCTS-Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.

    Someone out here must have an answer????   I know that SharePoint 2013 saves the view created in Power View therefore the metadata must be accessible somehow?  Can someone explain
    how to find that metadata in the SQL tables maybe?  I would be surprised to find out I am the only one who needs this?
    Ken Craig

  • Form on a table with report

    HI all
    I have a page type : form on a table with report .
    the table is :
    CREATE TABLE  "SLIKA_USERS"
       (     "ID" NUMBER,
         "USER_NAME" VARCHAR2(20) NOT NULL ENABLE,
         "USER_PASSWD" VARCHAR2(4000),
         "COMPANY" NUMBER(10,0),
         "FORM_TYPE" NUMBER(2,0),
         "USER_NAME_DB" VARCHAR2(20),
         "USER_LOCK" NUMBER(1,0),
         "DATE_PASSWD_CHNG" DATE,
         "LOGIN_DIR" VARCHAR2(30),
          CONSTRAINT "SLIKA_USERS_PK" PRIMARY KEY ("ID") ENABLE,
          CONSTRAINT "USER_NAME_UNQ" UNIQUE ("USER_NAME") ENABLEthe table contain 500 rows.
    in addition , when new user entered there are few processes that give him the USER_NAME_DB automatically by executing a functions etc.
    in a few weeks , new table need to be active instead SLIKA_USERS table
    the new table will look like this :
    CREATE TABLE  "SLIKA_USERS_NEW"
       (     "ID" NUMBER CONSTRAINT "ID_NN" NOT NULL ENABLE,
         "USER_NAME" VARCHAR2(20),
         "USER_PASSWD" VARCHAR2(4000),
         "COMPANY" NUMBER(10,0) CONSTRAINT "COMP_NN" NOT NULL ENABLE,
         "FORM_TYPE" NUMBER(2,0),
         "USER_NAME_DB" VARCHAR2(20),
         "USER_LOCK" NUMBER(1,0),
         "DATE_OPENED" DATE,
         "DATE_PASSWD_CHNG" DATE,
         "LOGIN_DIR" VARCHAR2(30),
         "USER_ID_NUM" NUMBER(9,0) CONSTRAINT "USER_ID_NUM_NN" NOT NULL ENABLE,
         "USER_F_NAME" VARCHAR2(10) CONSTRAINT "USER_F_NAME_NN" NOT NULL ENABLE,
         "USER_L_NAME" VARCHAR2(15) CONSTRAINT "USER_L_NAME_NN" NOT NULL ENABLE,
         "USER_MNG_NAME" VARCHAR2(30) CONSTRAINT "USER_MNG_NAME_NN" NOT NULL ENABLE,
         "LAST_LOGIN_DATE" DATE,
         "DATE_CLOSED" DATE,
          CONSTRAINT "USER_NAME_PK" PRIMARY KEY ("USER_NAME") ENABLE,
          CONSTRAINT "ID_UNQ" UNIQUE ("ID") ENABLE,
          CONSTRAINT "USER_ID_NUM_UNQ" UNIQUE ("USER_ID_NUM") ENABLE,
          CONSTRAINT "USER_NAME_DB_UNQ" UNIQUE ("USER_NAME_DB") ENABLEproblem :
    before inserting new user to table SLIKA_USERS_NEW i need to check if the user_name alreay exists in SLIKA_USERS table .
    i need to take all his details and move them to the new table , in addition as you can see , i need to complete some details like the USER_ID_NUM,USER_F_NAME,USER_L_NAME.
    of curse if this user doesn't exist in the slika_users i need to create him as new user.
    i thought about trigger , unfortunately it won't be a good idea since i don't have in table slika_users
    the USER_ID_NUM" ,     "USER_F_NAME" , "USER_L_NAME"
    another problem is : even if i will manage to overcome the problem of moving data from table slika_users .
    to slika_users_new ,
    to manage it after the tables will switch won't be easy though.
    in a few weeks , the slika_users need to rename to slika_users_old .
    and slika_users_new will rename to slika_users,
    that is a necessary step because lots of pages in the application , relate to the table slika_users ,
    in addition if new user need to create i still need to look if it's exists in the SLIKA_USERS_OLD (after i'll switch between the tables )
    please give idea how to overcome those problems
    Thanks In Advanced
    Naama

    Hello,
    Basically it can be done, but you'll need to do it manually. You can create your basic report, and define two link columns, each to the proper form, which will include the desired columns.
    The problem I see in this kind of solution is a great risk for data integrity, especially in a multi-user environment. It will take time to update both forms, and in between, the table record will contains inconsistent data – the first columns can contains data updated by the first form, but the rest of the columns will still contains an old data.
    Regards,
    Arie.

  • Form on a Table with Report,SOS!!!!!!!!!

    I HAVE TWO TABLE'S AS
    TAB_SALES AS
    BRAND     SKIND     PRICE     SALES
    APPLE     PHONE     5000     
    SAMSUNG     PHONE     3000     
    SONY     PHONE     5600     
    PIONEER     PHONE     2300     
    SANYO     BATTERY     109     
    AND TAB_COUNTRY AS
    BRAND     CONUTRY
    APPLE     USA
    SONY     JAPAN
    SAMSUNG     KOREA
    SANYO     JAPAN
    AND I WANT TO CREATE A Form on a Table with Report to display the :
    BRAND     SKIND     PRICE     SALES     CONUTRY
    APPLE     PHONE     5000     USA
    SAMSUNG     PHONE     3000          KOREA
    SONY     PHONE     5600          JAPAN
    PIONEER     PHONE     2300          JAPAN
    SANYO     BATTERY     109          JAPAN
    I want to let end_user modify the sales
    but when I create the Form on a Table with Report,the apex give me the rowid error:
    Error creating form and report.
    ORA-20001: Unable to create query and update page. ORA-20001: Unable to create query and update page. ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved table
    who can help me ?

    Hi lily,
    I'm sure you are aware of these, but please have a look again at the "Welcome" page of the forum: https://forums.oracle.com/forums/ann.jspa?annID=1324 and think about changing the subject of your post.
    Please provide your APEX and DB version, along with the SELECT statement you are using in the form.
    Any chance to create an example on apex.oracle.com?
    This would probably be the quickest way to get help.
    Thanks
    Sandro

  • Form on Table with Report

    I vaguely remember if I add fields to a table that is being used in a form/report, even though I manually add the fields to the report query and update/insert statements on the form, there can still be a problem with the fields being picked up by the report upon filling them in on the form. Is this so? If so, is there a work around without recreating the whole thing?
    the form has two buttons that just redirect to the same page. Each just displays it's related field using REQUEST = EXPRESSION 1. Each has it's own request value. After the form is complete, the user clicks a submit button to update the report. All fields update except these conditionally displayed fields that display based on the request buttons.
    It feels like one of those things where I'm going to kick myself when it's figured out.
    Thanks in advance...
    Edited by: userRRRYB on Oct 19, 2010 9:01 AM

    Unfortunately not. I'm using the fields to update another field. This is a catalog form for our Document Control department. They create and save a document to a folder then catalog it so they have search capability. If they make a change to the doc, they have to go back to the catalog and make updates to the form as well. They will either tack on A,B,C etc. for a REVSION change, or v1,v2,v3, etc for a VERSION change. So...
    Buttons
    REVISION
    VERSION
    Fields
    DOCNO (for demo this displays F-100)
    REVISION
    VERSION
    NEW_DOCNO
    User clicks the REVISION button and the REVISION field displays F-100A.
    Source for the REVISION field is this:
    SELECT CASE
    WHEN
      ASCII(SUBSTR(:P51_DOCNO, LENGTH(:P51_DOCNO)-1, 1)) = 118 or
          ASCII(SUBSTR(:P51_DOCNO, LENGTH(:P51_DOCNO)-1, 1)) = 86
              THEN SUBSTR(:P51_DOCNO, 1, LENGTH(:P51_DOCNO) - 1) || CHR(ASCII(SUBSTR(:P51_DOCNO,LENGTH(:P51_DOCNO),1)) + 1)
    ELSE :P51_DOCNO || 'v' || 1
    end
    from doc_info
    where doc_info_id = :p51_doc_info_idSelect for the revision VERSION does the same thing, but checks for and adds v1, etc.
    Then the appropriate rev/ver gets dumped into NEW_DOCNO b/c I thought I could then use that to update the next time...but since none of these fiels are dumping into the report I've not gotten that far.
    Another note: all other fields update to the report fine.
    This is probably a very cumbersome way to do this, but I operate from my own neive creative problem solving base without any real formal training.
    Any ideas?
    Edited by: userRRRYB on Oct 19, 2010 9:23 AM
    Edited by: userRRRYB on Oct 19, 2010 9:29 AM

  • Need to create form on a table with report with a table has NO primary key

    Hi, I tried to created some insert/update/delete form+report in an application, it works fine only if the table has primary key. Does anyone know how to create the same functionality with a table with no primary key? I saw an application is built on older version of htmldb that is using tables with no primary keys at all.
    Here are the specific issues that I am facing:
    - I am building some Form on a table with Report, it requires the table with primary key for form to update. Is there a workaround that I can use tables that has no primary keys at all?
    - Say if primary key is necessary in the previous report+form, but the maximum number of columns that I can use to composed a primary is only 2 for that Form-Report, I cannot find anything handling > 2 primary key. Do you know if there are some ways to composite a primary key from many columns together?
    Your help is really appreciated.
    Thanks,
    Angela

    Sorry to ask response so late. I had no time to get back to that issue before.
    Regarding the triggers, I can make it work for the update, but not the insert.
    Here is my trigger:
    create or replace trigger STATUS_T1
    instead of insert on STATUS
    begin
    insert into STATUS ("LABEL", "AREA", "OWNER", "TEST_NAME", "STATUS", "REMARKS", "BUGS", "DEV_MGR", "TEST_BY_DATE")
    values(:new.LABEL, :new.AREA, :new.OWNER, :new.TEST_NAME, :new.STATUS, :new.REMARKS, :new.BUGS, :new.DEV_MGR, :new.TEST_BY_DATE);
    end;
    by any chance, you can notify what is wrong?
    I already skip the ROWID when inserting to the view STATUS, but I cannot figure out what is wrong when inserting a new record to that view.
    It gave me the following errors:
    ORA-06550: line 1, column 38: PL/SQL: ORA-00904: "ID": invalid identifier ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored
    Error Unable to process row of table STATUS
    Then, I turned to debug mode, I am thinking that maybe because I use a HIDDEN item to hold the value of ROW_ID as I use the rowid (called ID in the view) to retrieve the record as a column link from previous page. What do you think?
    Thanks again,
    Angela

  • DML(Update)  in a report

    I have a report, with a query that includes a ROWNUM,
    How can I do UPDATE of the table of the query with the printed rownum?
    For example, query report is:
    SELECT rownum, a.* from mytable a order by ......;
    I have to UPDATE one of column, say x of my mytable.
    UPDATE mytable Set x = rownum WHERE id_mytable = y;
    where (y is column of table mytable printed too)
    Thanks in advance for any help

    I forgot
    I could implement something like
    -- start report
    --check report progress
    LOOP
    l_report_status:= report_object_status(l_job_id);
    exit when (l_report_status not in('ENQUEUED', 'OPENING_REPORT', 'RUNNING'));
    END LOOP;
    -- report ended (with/without errors)
    IF (l_report_status='FINISHED')
    THEN
    -- Report run was successful: update database
    ELSE
    -- Report generation errors
    END IF;
    but how can i get back rownum printed?
    and If it were possible, I would not like to create a TEMP table.
    Thanks again

  • Slow running query on heavily updating table

    Hi,
    I am working on a live gps tracking project. The project is using SQL Server 2008 web edition. There are thousands of devices which are sending data packets in every 10 seconds or less depending on various settings to the server. On server there is a tcp
    server listener program which reads and parse data and insert it into a "Table-A". Table-A has a trigger which updates Table-B on each insertion (Table-B is used to show live updated status on website). Now Table-A has millions of records per day
    and high insertion rate per second.
    We also need to show the history reports and other reports using "Table-A". The problem is query on "Table-A" is very slow and affacts the insertion on "Table-A". Please help to overcome this problem.

    Since there are frequent inserts ,I believe you are selecting records using NOLOCK hint to avoid shared locks.
    Niting,
    I am pretty much sure in OP scenario NOLOCK will cause blunder. Please don't advise NOLOCK on forum where we have no or minimal information about OP database and infrastructure. Its not a good coding practice.
    Your comment to perform regular stats update also does not makes sense, are you sure stats is the issue I can sense some app design problem.
    Ganesh,
    I guess trigger on Table A is making things slow as it has to complete and I guess this is what taking time , I am not sure.
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • Failed to update table name (location): Failed to open connection.

    Folks,
    ENV : SQL Server 2005, CR 2008 SP3, Windows Server 2003
    All the reports are working fine except for 4 of them. All of them demonstrate the same symptoms.
    Failed to print/preview report with the error 'A Crystal Reports job failed: Failed to update table name (location): Failed to open connection. Failed to open connection. COA.rpt
    All the reports use OLE DB connection. I have verified the the DB Connection Information. It's the same across all the rpt files.
    Please help.
    Regards,
    Balaji K

    Hi,
    Additional Info:
    CR 2008 SP3 is called by an application using .net. The Application passes a couple of parameters to the CR report. I'm able to preview the report. All the reports use the same set of parameters.
    Balaji K

Maybe you are looking for