QCommand to delete report

Last post 01-10-2019, 2:30 AM by Wwong. 5 replies.
Sort Posts: Previous Next
  • QCommand to delete report
    Posted: 01-03-2019, 5:43 PM

    I have a scenario where each month I run a custom report (Reports > My Reports > General) which has a date range in it for the current month. I am trying to run a QCommand which will edit the report and update the date range to the current month to save me having to edit the report.

    I don't believe there is an qcommand to edit a report (correct me if I'm wrong!) so I'm trying to find a qcommand which will delete the current report and then recreate it with the new dates.

    Is what I am trying to do possible with qcommands?

  • Re: QCommand to delete report
    Posted: 01-04-2019, 5:49 AM

    Hi Benjani

    I am not too sure if there is a qoperation that will help to delete a report, but you should be able to use standard Batch script to achieve that. 

    On the other hand you can use the following method to generate reports:

    • Create a XML of the reporting (http://documentation.commvault.com/commvault/v11/article?p=45335.htm)-> depending on the XML structure, you might need to make one XML per month
    • Then use qoperation to execute the XML (http://documentation.commvault.com/commvault/v11/article?p=45435.htm)
     
    So once you are able to generate a report using the above method, you can then create a Batch Script, which will delete any old report (following a specific naming convention), and then execute the above qoperation, with the correct XML. 
     
    The above method does require multiple steps and setup, but will achieve what you want. 
     
    Otherwise you might consider using Workflow to automate the report generation (http://documentation.commvault.com/commvault/v11/article?p=49513.htm) 
     
    Hopefully that helps 
     
    Thank you 
     
    Winston
  • Re: QCommand to delete report
    Posted: 01-07-2019, 5:54 PM

    Hi Wwong,

    Thanks for the useful advise.

    Could you elaborate on how I would be able to delete a report using a batch script?

    I did look at running a workflow however I was unable to find any entry in the SQL Commserv DB tables which contains information about the a custom report. Do you know which table these are located in?

    Thanks,

    Benjani

  • Re: QCommand to delete report
    Posted: 01-07-2019, 9:02 PM

    Hi Benjani

    I am not 100% sure in terms of the exact process for workflow creation, and it could incorproate multiple "Stored Procedure" for the Report generation.  

    In regards to the deletion of the report, this would be a normal Windows Command ("del “D:\Test_1\Test\*.txt”) -> incorporated into the Batch Scritp; the purpose is to clear up all the Reports (generated in PDF) in the directory, before you make subsequent qoperation to generate the new report. 

    Hopefully that helps 

    Thank you 

    Winston 

  • Re: QCommand to delete report
    Posted: 01-09-2019, 4:33 PM

    I've decided to use the qoperation command to create a report on the fly as I need it. I am currently building this into a workflow however the report gets saved into the Reports folder on the Commserve, meaning that the user will have to manually open the file.

    Is there a way of the report automatically opening in the users browser once the report is generated? This is the default behavour when running reports through the GUI.

    Regards,

    Benjani

  • Re: QCommand to delete report
    Posted: 01-10-2019, 2:30 AM

    Hi Benjani

    You are correct, when running the qoperation the report gets generated but does not open. 

    I beleive within the GUI we invoke additional process to open up the PDF.

    I do not believe it will be possible it won't be possible, unless you build the batch script to navigate to the /Report Directory and open the PDF after creation. 

    Thank you 

    Winston 

The content of the forums, threads and posts reflects the thoughts and opinions of each author, and does not represent the thoughts, opinions, plans or strategies of Commvault Systems, Inc. ("Commvault") and Commvault undertakes no obligation to update, correct or modify any statements made in this forum. Any and all third party links, statements, comments, or feedback posted to, or otherwise provided by this forum, thread or post are not affiliated with, nor endorsed by, Commvault.
Commvault, Commvault and logo, the “CV” logo, Commvault Systems, Solving Forward, SIM, Singular Information Management, Simpana, Commvault Galaxy, Unified Data Management, QiNetix, Quick Recovery, QR, CommNet, GridStor, Vault Tracker, InnerVault, QuickSnap, QSnap, Recovery Director, CommServe, CommCell, SnapProtect, ROMS, and CommValue, are trademarks or registered trademarks of Commvault Systems, Inc. All other third party brands, products, service names, trademarks, or registered service marks are the property of and used to identify the products or services of their respective owners. All specifications are subject to change without notice.
Close
Copyright © 2019 Commvault | All Rights Reserved. | Legal | Privacy Policy