Client Management Suite

 View Only
Expand all | Collapse all

Report with variable for Table name

  • 1.  Report with variable for Table name

    Posted Feb 25, 2014 06:57 AM

    so I know a little sql - enough to get some things done... with that I have used variables in the where statement....

    but what I am looking to do is see if I can use 1 report to have a drop down list for the table name.

    We archive computers out and sofware delivery records out. I would like to have 1 report called Altiris NS6 and NS7 Archived Records. You would simply select NS6 systems or NS6 SWD or either for NS7.x.

    With this the report would show the records for either table...

    thoughts?



  • 2.  RE: Report with variable for Table name

    Posted Feb 25, 2014 01:25 PM

    Could you perhaps provide a graphical interpretation of what you want to achieve.

    In 6.x you could create a pararmeter based off of a query; however, to do the same in 7.x you will need to create seperate reports and have them as drilldowns from the main report.



  • 3.  RE: Report with variable for Table name

    Posted Feb 25, 2014 02:36 PM

    sure... i have 4 tables..

    NS6_SWD_Execution_archive

    NS6_SYSTEMS_archive

    NS7_SWD_Execution_archive

    NS7_SYSTEMS_Execution_archive

     

    it is the simplest of code to get what I want.. we export data into these tables so no need to combine them.. what we want is what is in each as individual reports but I would like a way for it to be a single report to choose a dropdown or drilldown to select the item... 

    if not 4 individual reports will work... 

    select *
    from [NS6_SWD_Execution_archive]
    order by Name


  • 4.  RE: Report with variable for Table name

    Posted Feb 25, 2014 02:42 PM

    Like I said before, for 7.x you will need to create four seperate reports.

    Either use the "SELECT * FROM" statement for each, and then remove unwanted columns via the dit stage, or target only the wanted columns directly via the SELECT statement.



  • 5.  RE: Report with variable for Table name

    Broadcom Employee
    Posted Feb 25, 2014 02:50 PM

    You can have  a drop down parameter that will allow you to select the table you want to hit. The parameter value will be the table name to use.

    You would need to use create a SQL query that looks like this:

    select ...
      from %SelectedTable%
     where ...

    If the tables are exactly the same then it'll work quite nicely, as you won't have to tweak the selected columns.

    Are you familiar with report parameters?



  • 6.  RE: Report with variable for Table name

    Posted Feb 28, 2014 09:20 AM

    yes i will try the report paramaters. thought I tried it and it wasnt working but I am now running into a different issue...

     

    so one table has 2.5 million records at this point. Our exports will put 1mil-3mil records into the table each time which is about 2-3x a year. The report will only show 50,000 rows and while I know the fix for that.. this report will just take way too long to run. 

    not sure why NS reports take so long as in SQL Management Studio the report takes 3 minutes but in NS it times out after 8 minutes... ughhh



  • 7.  RE: Report with variable for Table name

    Broadcom Employee
    Posted Feb 28, 2014 09:31 AM

    May I ask why you would be using a report to export data?

    We have the Connector solution that doesn't have the same type of limitations, and you also have SQL tools to do bulk export.

    The SMP console reports are there for human consumption of the data, not really for data export albeit we have a few element that allow users to save the data ;)



  • 8.  RE: Report with variable for Table name

    Posted Mar 03, 2014 02:47 PM

    The NS takes longer as it interrogates SL via .Net, and has timeouts set via its own database settings as well as IIS's APS Script settings.



  • 9.  RE: Report with variable for Table name

    Posted Mar 03, 2014 02:48 PM

    I have to agree with Ludo here in that a report is not there to display millions of rows, as there is no way a user would be able to make any use of it.



  • 10.  RE: Report with variable for Table name

    Posted Mar 05, 2014 10:57 AM

    so here is the deal... we are a pharmaceutical company and due to fda regulations need to keep ALL records to regulated machines. So every now and then we export all system information and all swd records for those systems to tables. If an audit was to come up I can use SQL Management Studio to rip through the tables but management just asked me to make " A " report.. thus why choice of 4 in 1.

    but with the amount of rows I have not attempted it...



  • 11.  RE: Report with variable for Table name

    Posted Mar 05, 2014 02:55 PM

    You may wish to have a seperate reporting server just for that data, so that it would at least have a chance to render data; however, you would need to create reports in such a way that they would not need to display all rows in the database, so perhaps some criterion parameters should be used.



  • 12.  RE: Report with variable for Table name

    Posted Mar 05, 2014 02:56 PM

    In fact, what ypou could possibly do is first have thos data tables on a seperate SQL server, and then create views that will narrow down the search realm for the reports.