Simple copy of reports not working - help please

Hello
I have this function that was written to copy a given report object to a given folder. The code is not working - the copyObj = col.Copy(obj,2) appears to be failing.
Can anyone shed some light on this? Thank you in advance!
- Russell
My function:
function CopyReport (objID, DestFolder, iStore)
dim col
dim obj
dim copyObj
on error resume next
'QUERY FOR OBJECT TO COPY
str = "SELECT * FROM CI_INFOOBJECTS WHERE SI_ID = " + objID
set col = iStore.Query ( str )
obj = col.Item(1)
'COPY THE OBJECT
copyObj = col.Copy(obj,2)
'SET THE PARENTID OF THE COPIED OBJECT
copyObj.Properties.Item("SI_PARENTID").Value = DestFolder
'SET THE PARENT FOLDER OF THE COPIED OBJECT
copyObj.Properties.Item("SI_PARENT_FOLDER").Value = DestFolder
'COMMIT THE COLLECTION
iStore.Commit(col)
end function

Hi All
I've resolved the problem with the copy and am posting the code below. I'd appreciate it if it could be placed in the appropriate forum so that it may be a resource for other developers in the future. I've left in all of my debugging/error checking code for reference as well.
- Russell
The working copy function (with loads of debugging code) is this:
function CopyReport (objID, DestFolder, iStore)
'Function CopyReport
'Parameters:
'  objID - the ID of the report to copy
'  DestFolder - the ID of the destination folder for the copy
'  iStore - the InfoStore to use
'Returns: A text string that is displayed in a web page via response.write that includes the
'  name of the report if copied or the error information as appropriate.
dim col
dim obj
dim copyObj
dim newCol
on error resume next
'QUERY FOR OBJECT TO COPY
str = "SELECT * FROM CI_INFOOBJECTS WHERE SI_ID = " + objID
set col = iStore.Query ( str )
If Err.Number <> 0 Then
  CopyReport = "iStore.Query failed<br>"
  CopyReport = CopyReport + "<br>Error: " & Err.Number & " - " & Err.Description
  CopyReport = CopyReport & "<br>" & str
  Exit Function
End If
set newCol = iStore.NewInfoObjectCollection()
If Err.Number <> 0 Then
  CopyReport = "newCol creation error"
  CopyReport = CopyReport + "<br>Error: " & Err.Number & " - " & Err.Description
  CopyReport = CopyReport & "<br>" & str
  Exit Function
End If
set obj = col.Item(1)
If Err.Number <> 0 Then
  CopyReport = "OBJ = col.item(1) error<br>"
  CopyReport = CopyReport & "<br>" & str
  CopyReport = CopyReport & "<br>Error: " & Err.Number & " - " & Err.Description
  Exit Function
End If
'COPY THE OBJECT
set copyObj = newCol.Copy(Obj, 2)
If Err.Number <> 0 Then
  CopyReport = "copyOBJ error"
  CopyReport = CopyReport & "<br>Count: " & col.Count
  CopyReport = CopyReport + "<br>Error: " & Err.Number & " - " & Err.Description
'  Exit Function
End If
'SET THE PARENTID OF THE COPIED OBJECT
copyObj.Properties.Item("SI_PARENTID").Value = DestFolder
If Err.Number <> 0 Then
  CopyReport = "Error setting SI_PARENTID to " & DestFolder
  CopyReport = CopyReport + "<br>Error: " & Err.Number & " - " & Err.Description
  Exit Function
End If
'SET THE PARENT FOLDER OF THE COPIED OBJECT
copyObj.Properties.Item("SI_PARENT_FOLDER").Value = DestFolder
If Err.Number <> 0 Then
  CopyReport = "Error setting SI_PARENT_FOLDER to " & DestFolder
  CopyReport = CopyReport + "<br>Error: " & Err.Number & " - " & Err.Description
  Exit Function
End If
'COMMIT THE COLLECTION
iStore.Commit(newCol)
If Err.Number <> 0 Then
  CopyReport = "Commit error"
  CopyReport = CopyReport + "<br>Error: " & Err.Number & " - " & Err.Description
  Exit Function
End If
'Return the object info
CopyReport = copyObj.Title
end function
Edited by: Russell L Magidson on Dec 11, 2008 5:12 PM
Edited by: Russell L Magidson on Dec 11, 2008 10:28 PM
Edited by: Russell L Magidson on Dec 11, 2008 10:29 PM

Similar Messages

  • HP pavilion dv6 microphone not working . help please . . .

    HP pavilion dv6 microphone not working . help please . . .

    Hi,
    DV6 is a series of hundreads of models, what is yours ? To help us answer question quicker, please read this:
       http://h30434.www3.hp.com/t5/First-Time-Here-Learn-How-to/Welcome-Get-started-here/td-p/699035
    You may wat to try this first:
    1. Right click speaker icon (right hand corner)
    2. Select Microphone devices
    3. Right click Microphone
    4. Enable it
    5. Click Apply/Ok
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • On my iPhone 5 camera photographed not clear. blurry pictures, autofocus does not work. help please!

    on my iPhone 5 camera photographed not clear. blurry pictures, autofocus does not work. help please!

    Could you please describe how you are trying to delete a single text message and it will not work? What are you seeing in place of the trash can icon?

  • When i go in my settings on my ipod touch 3gen it says no wi-fi as in i cant connect to any wi-fi at all i tried to restore but did not work HELP PLEASE

    when i go in my settings on my ipod touch 3gen it says no wi-fi as in i cant connect to any wi-fi at all i tried to restore but did not work HELP PLEASE

    See:
    iOS: Wi-Fi or Bluetooth settings grayed out or dim
    If not successful, an appointment at the Genius Bar of an Apple store is usually in order.
    Apple Retail Store - Genius Bar

  • After update.. i can not start the ipad, when i press agree in the terms ...it will freeze and the screen not working///help please

    after update.. i can not start the ipad, when i press agree in the terms ...it will freeze and the screen not working///help please

    What to Do When Your iPad Won't Turn On
    http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
    iOS: Resolving update and restore alert messages
    http://support.apple.com/kb/TS1275
    iPad: Unable to update or restore
    http://support.apple.com/kb/ht4097
     Cheers, Tom

  • HT201210 I can not restore my iPhone 4S itunes error says I have 29 and I put it in DFU mode and not working help please

    Hello

    I can not restore my iPhone 4S itunes error says I have 29 and I put it in DFU mode and not working help please

  • TS2755 When trying to open my mail, it opens then closes immediately, I've deleted the account and re-created it 3 times and also done a reset but still not working, help please

    When trying to open my mail, it opens then closes immediately, I've deleted the account and re-created it 3 times and also done a reset but still not working, help please

    Try closing all apps in Multitask Window
    1. Double tap the home button to bring up the multi-tasking view
    2. Swipe up on the screenshot of the app you want to exit.
    3. The app will fly off the screen

  • HSRP on 2 3550's not working, HELP please

    Hello Everyone,
    I am attempting to run and test HSRP but there seems to be some errors.
    My first switch is a Catalyst 3550 - 48 Port with SMI image
    My second switch is a Catalyst 3550 - 48 Port with EMI image.
    I configured HSRP on Vlan12 to try and see if my second switch will take over once I pull the cable out of the first one but it seems like it doesn't.
    In the "show standby" command, the second switch shows as "Active router" because I gave it higher priority and it sees the neighbor switch which shows as standby router, so hsrp sees both the switches, knows which one is active and which one is standby but yet when I pull the plug on the first one, network is down, as if it did not revert to the second switch.
    My cabling is as follows.
    First switch has the first GIG (over fiber) uplink to my provider, the second GIG port is connected to the second gig port on the second switch over fiber as well. The first gig port of the second switch is NOT connected to anything as I only have one provider.
    The two ports communicate since hsrp seems the neighbor switches.
    The two are configured like this 10.0.0.1 s virtual gateway. 10.0.0.2 is the address of first switch. 10.0.0.3 is address of second switch (backup one). Those IP's are on a MANAGEMENT VLAN which I gave as VLAN ID 100
    Now for the VLAN12 I am testing HSRP on, it has VALID INTERNET IP's and not local internal IP's.
    Once again, the virtual IP finishes with 225, and I configured 226 as IP on switch1, 227 as IP on switch2.
    I am NOT using the track option as I am not sure what it does, I only use the standby priority and preempt options.
    So to put it in brief, I am trying to make VLAN12 work with HSRP so that all traffic from VLAN 12 enters switch 1 (from the provider uplink) goes to switch2 since I set vlan12 with higher priority (hsrp) on switch2 goes to the servers, then comes back to switch2, routes to switch1 (since it has to uplink to provider) and out to the internet.
    I hope my formatting is not very bad and pretty much understandable.
    Can someone please tell me what I am doing wrong and why is hsrp not working for me?
    PS: I am suspecting the routing is not done well between one switch and the other so they cannot communicate the traffic, but I am not sure
    Please help me
    Thank You

    Hello,
    Ok I am copy and pasting the configs of INTERFACE FASTETHERNET 12, VLAN12 and SHOW STANDY on BOTH 3550's...
    NOTE: Port 12 is not connected at this point on standby 3550 to the 2950t anymore as I have disconnected the cable since it was not working, this is why there are less details for interface fast ethernet port 12 on standby switch, if you need full details I can give you more details once I connect it again, even with it disconnected, show standby shows the standby 3550 as active for Vlan12, but yet vlan12 operates out of active 3550 even when port 12 was active on standby one.
    For privacy reasons, I have XXX'ed the IP's
    Here is the data:
    --- ACTIVE 3550 -----------------
    interface FastEthernet0/12
    description Switch 8 Uplink
    switchport trunk encapsulation dot1q
    switchport trunk native vlan 12
    switchport trunk allowed vlan 1,3,12,100
    switchport mode trunk
    mls qos trust cos
    macro description cisco-switch
    auto qos voip trust
    wrr-queue bandwidth 10 20 70 1
    wrr-queue min-reserve 1 5
    wrr-queue min-reserve 2 6
    wrr-queue min-reserve 3 7
    wrr-queue min-reserve 4 8
    wrr-queue cos-map 1 0 1
    wrr-queue cos-map 2 2 4
    wrr-queue cos-map 3 3 6 7
    wrr-queue cos-map 4 5
    priority-queue out
    spanning-tree link-type point-to-point
    interface Vlan12
    ip address 2XX.XX.XX.226 255.255.255.224
    no ip redirects
    standby 12 ip 2XX.XX.XX.225
    standby 12 priority 95
    standby 12 preempt
    Vlan12 - Group 12
    State is Standby
    4 state changes, last state change 1d08h
    Virtual IP address is 2XX.Xx.XX.225
    Active virtual MAC address is 0000.0c07.ac0c
    Local virtual MAC address is 0000.0c07.ac0c (v1 default)
    Hello time 3 sec, hold time 10 sec
    Next hello sent in 0.068 secs
    Preemption enabled
    Active router is 2XX.XX.XX.227, priority 110 (expires in 7.508 sec)
    Standby router is local
    Priority 95 (configured 95)
    IP redundancy name is "hsrp-Vl12-12" (default)
    Vlan100 - Group 10
    State is Active
    2 state changes, last state change 2d03h
    Virtual IP address is 10.0.0.1
    Active virtual MAC address is 0000.0c07.ac0a
    Local virtual MAC address is 0000.0c07.ac0a (v1 default)
    Hello time 3 sec, hold time 10 sec
    Next hello sent in 0.064 secs
    Preemption enabled
    Active router is local
    Standby router is 10.0.0.3, priority 100 (expires in 9.608 sec)
    Priority 150 (configured 150)
    IP redundancy name is "Hsrp-Vlan100" (cfgd)
    ---- STANDBY 3550 -------------------------
    interface FastEthernet0/12
    switchport trunk encapsulation dot1q
    switchport trunk allowed vlan 1,3,12,100
    switchport mode trunk
    interface Vlan12
    ip address 2XX.XX.XX.227 255.255.255.224
    no ip redirects
    standby 12 ip 2XX.XX.XX.225
    standby 12 priority 110
    standby 12 preempt
    Vlan12 - Group 12
    Local state is Active, priority 110, may preempt
    Hellotime 3 sec, holdtime 10 sec
    Next hello sent in 0.126
    Virtual IP address is 2XX.XX.XX.225 configured
    Active router is local
    Standby router is 2XX.XX.XX.226 expires in 7.756
    Virtual mac address is 0000.0c07.ac0c
    2 state changes, last state change 1d08h
    IP redundancy name is "hsrp-Vl12-12" (default)
    Vlan100 - Group 10
    Local state is Standby, priority 100, may preempt
    Preemption delayed at most a further 0 secs for syncs
    Hellotime 3 sec, holdtime 10 sec
    Next hello sent in 2.348
    Virtual IP address is 10.0.0.1 configured
    Active router is 10.0.0.2, priority 150 expires in 7.752
    Standby router is local
    1 state changes, last state change 2d03h
    IP redundancy name is "Hsrp-Vlan100" (cfgd)
    Hope this helps you experts to help me :)
    Thanks

  • Youtube not working help please

    i am using macbook pro retina for 1 year now but just a few days ago youtube stopped working suddenly and i thought it was because the site was down or something but i have checked that and found that it is not working just in my macbook
    when i open youtube it shows a html format  please help guys i have attached the photo ive reinstalled google chrome ,and also flash player with no respite

      Go step by step by step and test.
    1. Power off the router. Unplug it from the wall. Wait a while.
        Plug it back to the wall. Power the router on. Wait until all the lights are lit properly. It will take a while.
        Restart the computer.
        Start up in Safe Mode.
        http://support.apple.com/kb/PH14204
    2. Delete Caches.db
        Close all windows and quit all applications.
        Hold "option" key down and click "Go" menu in the Finder menu bar.
        Select "Library" from the dropdown.
        Library > Caches > com.apple.Safari > Caches.db
        Right click the Caches.db file and select "Move To Trash.
        Close windows and relaunch Safari.
    3. Empty Caches
        Safari > Preference > Advanced
        Checkmark the box for "Show Develop menu in menu bar".
        Develop menu will appear in the Safari menu bar.
        Click Develop and select "Empty Caches" from the dropdown.
    4. Delete Cookies
        Safari > Preferences > Privacy > Cookies and other website data:
        Click “Remove All Website Data”.
    5. Safari > Preferences > Extensions
        Turn off Extensions if any and launch Safari again to test.
        Turn on those one by one and test.

  • TS3274 What woud I do if my screen is not responding? I can't unlock my mini ipad because the touchscreen is not working. help please.

    Hi guys, please help me. my son's mini ipad cannot be unlocked because the touchsreen is not responding.. help please. thank you.

    A reset should help. Tap and hold the Home button and the On/Off buttons for approximately 10-15 seconds, until the Apple logo reappears. When the logo appears, release both buttons.
    No content is affected by this procedure.

  • Wireless not working HELP PLEASE

    Just today my wireless was working perfectly not problems at all. And then i get back from college 4 hrs later and it seems to not work anymore i called cisco and they want to charge me to fix it, and i dont have the money for it. I have tried reseting the router (pressing the small button with a paper clip for 30 seconds). And i have also unplugged it and plugged it back in and still nothing. I called my internet provider and my modem is working fine (im actually writing this with my laptop plugged straight into the modem via ethernet).  Could you guys help me out? exams are coming up and i cant keep taking turns using the internet with other people in my house, and i cant keep going to the library to study and do homework. Thanks, you have no idea how thankful ill be if this gets resolved    btw i have a cisco linksys E2500 series wireless router
    Solved!
    Go to Solution.

    If you have an extra ethernet cable you may reconfigure the router manually. For step-by-step instructions you may check it out from homesupport.cisco.com. You may also download the setup wizard from this website.

  • Ipod mini not working HELP PLEASE!!!!!

    my ipod mini is showing the apple logo, a sad face and then a battery sign with a fire bolt when i try plugging it into the computer. also, my computer wont recognize it at all. I've tried resetting and restoring it many times but its not working. what should i do!?!?!?!?! I've tried to make an appointment with the Genius Bar but they are too busy and my warrenty expires really soon!!
    HELP!!!!!!
    ipod mini   Windows XP  
    ipod mini   Windows XP  

    Hi Ssh,
    Welcome to Apple Discussions
    You may want to look at...
    Knowledge Base Document #61711 on iPod missing in "My Computer" or in iTunes on Windows
    Knowledge Base Document #93499 on Windows confuses iPod with network drive and may keep iPod from mounting or songs may seem to disappear
    Knowledge Base Document #61003 on iPod shows a folder icon with exclamation point when you turn it on
    Knowledge Base Document #61584 goes over When the iPod Only Shows an Apple Logo and Doesn't Start Up
    Jon
    Mac Mini 1.42Ghz, iPod (All), Airport (Graphite & Express), G4 1.33Ghz iBook, G4 iMac 1Ghz, G3 500Mhz, iBook iMac 233Mhz, eMate, Power Mac 5400 LC, PowerBook 540c, Macintosh 128K, Apple //e, Apple //, and some more...  Mac OS X (10.4.5) Moto Razr, iLife '06, SmartDisk 160Gb, Apple BT Mouse, Sight..

  • Iphone 3G 2.2 earpiece not working HELP PLEASE

    Hi, suddenly my iphone earpiece it´s not giving me sound. When I recieve a call people can hear, but I can´t. Also with the voicemail, I have to use the head phones, or the bluetooh. The only way to speak in a conversation with out the head phones it´s to use it in speaker mode. I have tried everything, plug and unplugged many times the headphones (it recognize the it doesn´t have it because when I put it out it says ringer and no headphones ringer in the iphone when I change the volume). The ipod part is working correctly, when I recieve a call or make a call, it stops. The mic is working fine.
    Can somebody help me to find where can be the problem? I already reset it, two times, try the plug and unplugged thing, clean the jack trail

    No, I restore the phone to factory setting already, I didn´t make the back up, I put as a new iphone, and try to use it with no extra apps, and still not working, how does this part can get damage and everything still working correctly?, I still using it as a phone with the headphones when I not alone and with the speaker when nobody is around, I don´t have an apple store near me, so I have to send it to them by mail, so, I want to do everything I can before to do that.

  • Can not install windows 7 pro using boot camp as mouse and keyboard will not work Help please

    I have a new iMac and trying to install Windows 7 Pro using boot camp. I have reached the stage of starting to load windows from the DVD then discovered the mouse and the keyboards not working so I could not interact with windows installation.

    Open, if not so already, the Windows formatter. Identify the BC Windows partition. It will be the one listed with the proper size you created and/or will be labeled as a C: drive. Be careful you select the right one or you may be corrupting the entire drive.
    Format the partition as NTFS.

  • My iphone 4 automatic lock is not working help please

    hi there
    my iphone run out of charge very rapidaly and also turn it self off time to time , and when i set auto lock for example 1,2,5 ect minutes it does not work at all

    Do you have a protective case on the iPhone, maybe it's interfering with the auto-lock?
    If that isn't it, try restarting or restoring the iPhone.

Maybe you are looking for

  • Can my wife and i share music and apps if we are synced to the same computer but have different apple id's?

    I recently authorized my iphone to my wife's imac and synced them so we could share music and apps. Can we both still use separate apple id's to purchase apps and music and still share them?

  • Data source cannot be created : MAPVIEWER-00011: Error creating a map data

    Hi everyone, i am getting an error meaasge while creating datasource " Data source cannot be created : MAPVIEWER-00011: Error creating a map data source." pls help

  • BPM - Async/Sync Bridge

    I'm trying to implement the scenario in this blog - http://www.riyaz.net/blog/a-step-by-step-guide-to-bpm-asynch-sync-bridge/technology/sap/170/ It involves a File  - RFC - File scenario using BPM . File Async Receive  -> Sync Send to RFC ->  Transfo

  • Inserting SOH and EOT into stream

    Hi all, I have a problem , I need to my socket client to bind and establish a socket connection to a remote server. Once the port has bounded the server expects a start of header, some text and end of text. The networking code work fine but I cant in

  • FINAL CUT HD (4,5) IN TIGER

    I just installed tiger and then updated to 10.4.4 Now my capture feature in FCP HD will not recognize my video deck. says that video source is missing. IMOVIE will run properly with the deck and captures but FCP does not. Does anyone know if there is