Results 1 to 11 of 11

Thread: how to refresh data ?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2000
    Posts
    117

    how to refresh data ?

    hi!!

    i have a report that i am calling him by javascript
    now if i am calling him i am getting the right data, now if i am deleting a data from the database and call the report again
    i get the same data
    it isnt refreshing the report
    how can i refresh the report each time i call him?


    thanks
    thank you
    sharon

  2. #2
    Hyperactive Member Ed Lampman's Avatar
    Join Date
    Mar 2001
    Posts
    273
    If you're using Crystal Reports, make sure the option under the File menu to "Save Data With Report" is not checked.

    If you're using some other reporting tool, I don't know because I only use Crystal Reports

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2000
    Posts
    117
    hi!


    thank u for reply

    i want to know wich string to send to crystal report by javascript that will refresh it every time i calling him

    i am sending him


    url="red.rpt?init=&actx&sf=" + formula + "&user0=user&password0=pass"

    i need a string to refresh the rpt


    i hope i got my self clear
    thank you
    sharon

  4. #4
    New Member
    Join Date
    Nov 2002
    Posts
    1

    Refreshing Data Reports

    Hi Sharon,

    I'm not sure if you have figured out to refresh data reports without exiting out of the program. If not, here's how you do it:

    Type the following code where you have the data report load:

    Load DataEnvironment1 'Or the name of your Data Environment
    With DataEnvironment1
    If .rsImportError.State <> 0 Then .rsImportError.Close 'Or the name of your record source.
    End With
    ImportErrorReport.Refresh
    If ImportErrorReport.Visible = False Then ImportErrorReport.Show

    It works great for me.

  5. #5
    Lively Member
    Join Date
    May 2003
    Posts
    86

    Question

    I need to achieve something similar ;but with CR.
    Could you please specify how this can be done.
    Thanks

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Nov 2000
    Posts
    117

    trick with refresh

    i did it finaly with a trick

    cal=Math.random();
    url=document.getElementById("sesusemaoz").value;
    forma="({PRINTALL.maoz})" + "%3d" + url + " and ({PRINTALL.maonid})" + "%3e" + cal;

    * id is the row number in the sql
    now each time the formula is sent to the rpt the term id<a is cheacked and the data is always fresh
    thank you
    sharon

  7. #7
    Lively Member
    Join Date
    May 2003
    Posts
    86
    Can the same thing be achieved without using URL?
    Thanks

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Nov 2000
    Posts
    117
    the url is somthing that i use to get the session name

    you can remove it and not use it

    good luck
    thank you
    sharon

  9. #9
    Lively Member
    Join Date
    May 2003
    Posts
    86
    Originally posted by sharon
    the url is somthing that i use to get the session name
    you can remove it and not use it
    good luck
    Thank you Sharon for replying back.
    What I am not able to understand is where should I define "cal" and how can I pass this random value to CR ?

    I am not sure how and where exactly should I pass the " cal " field ?
    In my case ,I am passing parameters from a VB form to execute an SP. Once the SP is executed properly, a TTX file gets updated. Once the TTX file gets updated,it should display "refreshed" data . I am able to create TTX file and see new data ; but it needs to reflect newly populated fields properly.

    I tried to create a formula field "cal" in CR and set it to random . But then,though this field displays new random number ; it does not affect the other field values 'coz I am probably not concatenating any formula field with "cal" value.

    Could you please give more details ?

    Thanks

  10. #10
    Lively Member
    Join Date
    May 2003
    Posts
    86
    Originally posted by sharon
    the url is somthing that i use to get the session name
    you can remove it and not use it
    good luck
    Thank you Sharon for replying back.
    What I am not able to understand is where should I define "cal" and how can I pass this random value to CR ?

    I am not sure how and where exactly should I pass the " cal " field ?
    In my case ,I am passing parameters from a VB form to execute an SP. Once the SP is executed properly, a TTX file gets updated. Once the TTX file gets updated,it should display "refreshed" data . I am able to create TTX file and see new data ; but it needs to reflect newly populated fields properly.

    I tried to create a formula field "cal" in CR and set it to random . But then,though this field displays new random number ; it does not affect the other field values 'coz I am probably not concatenating any formula field with "cal" value.

    Could you please give more details ?

    Thanks

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Nov 2000
    Posts
    117

    hi again

    HI


    I BUILT MY DATABASE IN A WAY THAT THERE IS A

    ID TXT1 TXT2 TXT3 TXT4
    1 HHH VVV NNN LLLL
    2 . . . .
    3 . . . .



    cal=Math.random();
    forma="({PRINTALL.maoz})" + "%3d" + url + " and ({PRINTALL.id})" + "%3e" + cal;

    NOW I PUT A RND(between 0 to 1) VALUE INTO A VAR NAME CAL .
    now i compare this value to the ID in database . in this way i force the formula to check and send a "fresh" data to cr

    the id value will be alwayes greater than the cal value but this is a way to force "him" to check and send a "fresh" data to cr


    hope it help you
    thank you
    sharon

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width