Converting PL/SQL report to Chart

All
how do i convert the following report to a chart.
declare
slimdate varchar(100);
begin
for c1 in (select DISTINCT(substr(logindate, 1, 13)) Users from tablename ) loop
     select count(*) into slimdate from tablename where logindate like ''||c1.Users||'%';
     dbms_output.put_line(c1.Users||','||slimdate);     
end loop;
end;

Combine the two SELECT statements into one:
SELECT c1.users, COUNT(*) slimdate
  FROM (select DISTINCT(substr(logindate, 1, 13)) Users from tablename) c1,
             tablename c2
WHERE c2.logindate LIKE c1.users||'%'Mike

Similar Messages

  • Converting SQL Report Region to PLSQL Function Body Returning SQL Query

    All:
    I want to convert my SQL Report Region to a PLSQL-generated SQL Report Region so that I can eliminate where clauses dynamically and speed up my app, and also so that I can provide additional sorting options.
    <br><br>
    My problem is that I have lots of embedded single quotes that already are coded as 3 single quotes in the SQL Report Region. I am not sure at all how to code them within the PLSQL.
    <br><br>
    As example, here is one column from my query:
    <br><br>
    select decode(nvl(g.date_sub_1,g.date_rec_1), null, decode(g.article, 0, 'E', 1, 'U'), '< a href="javascript:unElevate( ' ' ' || g.grid || ' ' ',' ' ' || g.natca || ' ' ')">' || decode(g.article, 0, 'E', 1, 'U') || '< /a>') "Reverse" from g_table g
    <br><br>
    (Note that I added spaces within the code so it would display properly in the browser.)
    <br><br>
    To clarify, that's a double quote before javascript, and then 3 single quotes before the first concatenation group, then 3 single quotes after the second concatenation group, then 3 single quotes before the third, 3 single quotes after the fourth followed by an end-paren followed by a double quote etc.
    <br><br>
    My question is, what do I do with these triple-single quotes within PLSQL? Probably a no-brainer for the experienced folks, but I am thinking like a mobius strip at this point.
    <br><br>
    Bill
    Message was edited by:
    [email protected]
    Message was edited by:
    [email protected]
    Message was edited by:
    [email protected]

    Scott,
    I think that feature was made for my situation! I keep getting
    Function returning SQL query: Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the generic columns checkbox below the region source to proceed without parsing.
    (ORA-20001: Unable to bind :43 verify length of item is 30 bytes or less. Use v() syntax to reference items longer than 30 bytes. ORA-01006: bind variable does not exist)
    I did chop the query up into little bits, i.e.
    p_sql := p_sql || q'! ... !';
    p_sql := p_sql || q'! ... !';
    p_sql := p_sql || q'! ... !';
    return p_sql;
    But I'm not sure what I'm supposed to do here.
    Thank you.
    Bill

  • Migration from SQL Reports to Oracle Reports

    Hello everybody,
    We have a requirement where we need to convert various SQL
    reports in .SQL format to Oracle reports ie rdf format. Is there
    a quick solution for this? Is there a tool available? Or is the
    straight forward approach of starting an entirely new report the
    only option available.
    Awaiting your replies,
    regs,
    pramodh

    [Oracle Migration Workbench|http://www.oracle.com/technology/tech/migration/workbench/index.html]
    You can post your questions Database and Application Migrations
    Edited by: Anantha R on Sep 10, 2009 2:56 PM
    Edited by: Anantha R on Sep 10, 2009 2:57 PM

  • How to Convert MM/DD/YYYY to YYYY/MM/DD in SQL Reporting Services

    i am having difficulty of converting a parameter field, called @startdate, on sql reporting services report to YYYY/MM/DD format.  the parameter @Startdate was set to Data/Time.  @Startdate is 6/1/2014 12:00:00 and I want to convert it
    to 2014/06/01.  I want to compare @Startdate with a column in database called Begindate which is in format of YYYY/MM/DD hh:mm:ss.  I tried the followings
    select * from Atable where cast(Atable.Begindate as date) >= cast(@Startdate as date)
    select * from Atable where cast(Atable.Begindate as date >= cast(convert(datetime, @Startdate) as date)
    SQL Reporting Services only gives me Text, Boolean, Date/Time, Integer and Float.
    Regards,

    Hi Elmucho,
    Sorry for the delay. I tested with the sample data you provided, however everything works well in-house. Could you please creste a new report and check the result. Here are the steps I performed:
    1.  Create a table and insert the following data:
    Name (varchar(50))    Begindate (datetime, not null)    
    Lastdate (datetime, not null)
    bob                          
    2008-01-01 08:08:08.000      2010-10-10  
    10:10:10.000
    alice                         
    2010-10-10 10:10:10.00       2011-11-11
      11:11:11.000
    smith                       
    2011-11-11 11:11:11.00       2012-12-12   
    12:12:12.000    
    2. Open SQL Server Data Tools, create the data source and add the dataset with the below query:
    SELECT     Name, Begindate, Lastdate
    FROM         [tablename ]
    WHERE     (CAST(Begindate AS date) >= CAST(@Startdate AS date)) AND (CAST(Lastdate AS date) <= CAST(@Enddate AS date))
    3. Then, click execute button, it prompts for inputting the parameter value.
    @Startdate        
    6/1/2008
    @Enddate          
    5/1/2014
    Enter the date and press OK.
    4. Here is the result in the query designer:
    Insert a table and fields. Save the report and preview:
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Convert SQL*Report Writer V1 to Reports V6

    Is there an Oracle utility to convert the old SQL*Report Writer REPs to Reports V6 RDFs? Also, will Reports V6 for Unix be able to use our REPs from SQL*Report Writer V1?
    We are moving to a new server and updating our Oracle software. As a test, we are attempting to rewrite / convert some of our reports from our Unix platform to a test NT server. Once we get to the new Unix server and Oracle, we will have to convert the old REPs to the new Reports for Unix.

    You can convert SQL*ReportWriter v1.1 reports to Oracle Reports 2.5/3.0 and then to Oracle Reports 6.0. I know there is a migration tool that comes with 2.5, though I'm not sure about 3.0.

  • Pl-sql report with parameter

    Hi
    I have created report with region source as pl-sql. In pl-sql block, calling package where i am passing query. In query's where clause i want to pass paramter value which user had selected.
    There are two regions on page. On upper part, there is select list, on lower part there is report with pl-sql region but value of select list is not found in query. I am trying to access with bind variable, select list of item :SL_TEXT. But it is not showing any value in it.
    How to use select list value in query of report? Or let me know how to use parameter in pl-sql report which is selected in other region?
    Thanks in advance

    I am attempting to define the variable as a date variable through Oracle BI and yes it does use a colon to signal variable substitution.
    So thank you the first way you stated should work.
    The only problem I'm running into now I believe steems from the date format that column that I am trying to filter on. It is in what appears to be the worst format possible.
    Is it common for dates to be stored in a DD-MON-YY format? (e.g. 01-JAN-08) I thought we as a community had moved past that post Y2K scare. lol.
    When I set up the bind variable in BI it allows me to define the date format, much similar to the TO_DATE function but then it says (must be java date format). So I'm thinking that maybe DD-MON-YY is not a java date format.
    In that case is there a way to cast or convert my date format in the sql so that it is a supported java date format?
    Or should I just give up and pass it as a varchar2?

  • Convert table linked report into a Command version - Howto?

    How can I convert hundreds of reports from table linked into a Command version?
    One way to do is to take the SQL syntax off the report, add a Command with that Syntax and manually replace the database fields by the Command fields.
    I can not believe that is the right way to this. Is there no hidden (re-)mapping fields button or another undocumented feature?
    If this is the way to do it... when will there be a one-button-click solution. The underlaying data keeps the same, could not be that hard to build..?
    Without that basic functionality Crystal Reports is not option for us anymore.
    Backgroud: We do have hundreds of reports that are created by an ODBC (RDO) database (SQL Anywhere database), created by linking the tables and select the fields we like to use in the report. This works fine at least as we used the RDC method in our application. Because we are moving to .NET we could not use RDC anymore and have to use the .NET methods. However the .NET SDK is very limited. The only way to add more complex WHERE statements is to use the Command functionality of Crystal Reports.

    Hi Hans,
    Let me explain, Command Objects are sent directly to the DB server as is. CR does not alter the SQL at all. As you know in SQL there are minor differences between the various servers and the SQL syntax can vary from DB to DB. Because of this CR could not build in the logic to handle the vast number of potential mappings, and not jsut SQL types but also PC databases.
    To be able to map reports based on connections directly to the DB through a Command object the current versions of CR do not have the ability. Possibly the next version may have this feature though but we can't say for sure until it's released. Check our WEB site for new versions and there functionality.
    Next question about moving off of the RDC to .NET, you are correct. CR no longer allows you to modify the SQL statement directly. The RDC was actually supposed to stop you also but it did work.
    One possible solution is to use .NET and inProc RAS ( Report Application Server) and using record sets. Your app can get the SQL from the report, process the query and appending the info onto the WHERE clause as well as other filtering and then set the existing reports data source to the record set. As long as your data is less than 5000 rows then no performance issues, over 5K and you may start to see slow report processing. Depends on other info and report complexity etc.
    If this is an option for you please post your question to the Crystal .NET development forum. Also, you will need to use 12.x.2000.x versions of the CR .NET assemblies and not use the basic version 10.5 or 10.2 that comes with .NET 2008 and 2005.
    Thank you
    Don

  • Group box vs SQL Reporting Services Bookmark box

    <p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Hi,</font></p><p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman" size="3">My name is Peter Mead. I have started a job where they have a bunch of Reports written using SQL Reporting Services. My job is to convert these reports in to Crystal Reports to be used in an Enterprise Reporting methodology.</font></p><font face="Times New Roman" size="3"> </font> <p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman" size="3">The first problem I have is that SQL Reporting Services viewer has a Bookmark box down the left hand side. This Bookmark box looks like a Group box but does not function in the same way. SQL Reporting Services designer allows for the creation of any definable bookmark to be placed in this Bookmark box. </font></p><font face="Times New Roman" size="3"> </font> <p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman" size="3">How can I replicate or emulate this Bookmark box?</font></p><font face="Times New Roman" size="3"> </font> <p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Thanks in Advance,</font></p><p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Peter Mead</font></p>

    In the grouping dialog, there is an option to create "Specified Groups". This should allow you to emulate that bookmark idea.Â
         - Kathryn Webster (Report Design Consultant)
               Kat&#39;s News: http://diamond.businessobjects.com/blog/279

  • Master detail relation in the sql report

    HI All
    I am using Oracle 10g and have a requirement where I need to generate the output in the following format
    Deptno 10
    Empno Ename
    1 ----------A
    2 ----------B
    Deptno 20
    Empno Ename
    3-----------C
    4-----------D
    5-----------E
    Deptno 30
    Empno Ename
    6-----------F
    7-----------G
    Can we do it throgh sql report in sqlplus.
    Thanks
    Edited by: user602329 on Sep 15, 2010 10:18 PM

    Hi,
    In pure SQL, you can get results like that using GROUP BY ROLLUP, and also using UNION. In this case, I suspect UNION would be a lot simpler.
    Using SQL*Plus fucntionality, you could also write a SQL-from-SQL script that writes (and runs) a separate query for each department, the output of which is exactly what you requested.
    I'd try UNION first.
    Write one query to get the rows like
    Deptno 10from your table, using GROUP BY deptno.
    Write another query to get the rows like:
    Empno Enamefrom your table, using GROUP BY deptno to get one such row per department. (It's possible to combine these two queries, but simpler not to.)
    Write another query to get the actual data, such as
    EMPNO  ENAME
    =====  =====
    1      A
    2      B
    3      C
    4      D
    5      E
    6      F
    7      GThen do a UNION of all three queries, with an ORDER BY clause to get them in the right order.
    Each branch of the UNION will need some extra columns, to make the sorting work right. That is, the result set of the UNION will look something like this:
    OUT1   OUT2        EMPNO     DEPTNO     QUERYNO
    Deptno 10               10     1          
    Deptno 20                   20     1
    Deptno 30                   30     1
    EMPNO  ENAME               10     2
    EMPNO  ENAME               10     2
    EMPNO  ENAME               10     2
    1      A        1          10     3
    2      B        2          10     3
    3      C        3          10     3
    4      D        4          10     3
    5      E        5          10     3
    6      F        6          10     3
    7      G        7          10     3If you're going to have text, like 'EMPNO' in the 1st column, but empno is a NUMBER, then you should convert the NUMBERs to VARCAHR2s, using TO_CHAR.
    You probably won't want to display those extra columns, so use the SQL*Plus "COLUMN ... NOPRINT" command to hide them, or do the UNION in a sub-query, and then do the ORDER BY in a super-query, where you can use columns in the ORDER BY clause without putting them in the SELECT clause alsio.
    Edited by: Frank Kulash on Sep 16, 2010 11:02 AM

  • Converting PL/SQL with OE S Fields for 11i

    We recently moved to 11i and I am having trouble converting a PL/SQL report. This is part of an exception report (below) that we have and I am not exactly sure how to convert it in 11i to do what it did in 11.0.3. Particularily I am not sure about how to convert the "S" fields, if someone could provide some guidance that would be great. I have marked the lines I am not sure of with DON'T KNOW. Thanks, Joe.
    SELECT
    soh.order_number
    , sol.s2_date --Pick Release Release Date  DON'T KNOW
    , usr.user_name
    , sol.line_number
    FROM oe.so_headers_all soh --WILL BE ONT.OE_ORDER_HEADERS_ALL
    , oe.so_lines_all sol --WILL BE ONT.OE_ORDER_LINES_ALL
    , apps.fnd_user usr
    WHERE 1=1
    AND soh.header_id = sol.header_id
    AND soh.created_by = usr.user_id
    AND (sol.s2 = 4 -- line is pick released DON'T KNOW
    AND sol.s4 = 18 -- ship confirm Eligible DON'T KNOW
    AND soh.s6 != 10 --not closed WILL BE AND SOH FLOW_STATUS_CODE != 'CLOSED'
    ) -- line is pick released, ship confirm confirmed, not closed
    AND soh.order_type_id != 1000
    AND SOL.S2_DATE < sysdate-5 --Pick Release Release Date  DON'T KNOW                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    You can use DML error logging approach or FORALL SAVE EXCEPTIONS.
    Since you didn't mention the version I assume you are using 11g.
    Below is the sample code for DML error logging mechanism
    SQL> select * from v$version;
    BANNER                                                                         
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production   
    PL/SQL Release 11.2.0.3.0 - Production                                         
    CORE 11.2.0.3.0 Production                                                     
    TNS for Linux: Version 11.2.0.3.0 - Production                                 
    NLSRTL Version 11.2.0.3.0 - Production                                        
    SQL> DROP TABLE tableA;
    Table dropped.
    SQL> DROP TABLE Err$_tableA;
    Table dropped.
    SQL>
    SQL> CREATE TABLE tableA
      2  (
      3     col1   NUMBER PRIMARY KEY,
      4     col2   NUMBER,
      5     col3   VARCHAR2 (10)
      6  );
    Table created.
    SQL>
    SQL> -- Create error log table
    SQL>
    SQL> BEGIN
      2     DBMS_ERRLOG.create_error_log (dml_table_name => 'TABLEA');
      3  END;
      4  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> BEGIN
      2     FOR i IN (SELECT 1 AS col1 FROM DUAL
      3               UNION ALL
      4               SELECT 1 FROM DUAL)
      5     LOOP
      6        INSERT INTO tableA (col1)
      7             VALUES (i.col1)
      8                LOG ERRORS INTO Err$_tableA REJECT LIMIT UNLIMITED;
      9     END LOOP;
    10 
    11     COMMIT;
    12  END;
    13  /
    PL/SQL procedure successfully completed.
    SQL> column column_name format a30
    SQL> set linesize 300
    SQL> select * from tableA;
    SQL> select * from err$_tablea;
    Thanks,
    GPU

  • Assist with my SQL Reporting Script

    I have started writing a HTML SQL reporting script based off of Jeffrey Hicks tutorial
    Here is my entire script:
    ###################START SCRIPT#####################################
    #requires -version 3.0
    #Create a SQL Server report of said SQL environment
    [cmdletbinding()]
    Param(
    [string]$computername=$env:computername,
    [string]$path="$env:temp\sqlrpt.htm"
    #define an empty array to hold all of the HTML fragments
    #the fragments will break apart each HTML section in the final output so that you can out whatever information you like
    $fragments=@()
    #save current location so I can set it back after importing SQL module
    $curr = get-location
    #import the SQL module
    Import-Module SQLPS -DisableNameChecking
    #change the location back
    set-location $curr
    #get uptime
    Write-Verbose "Getting SQL Server uptime"
    $starttime = Invoke-Sqlcmd -Query 'SELECT sqlserver_start_time AS StartTime FROM sys.dm_os_sys_info' -ServerInstance $computername -database master
    $version = Invoke-Sqlcmd "Select @@version AS Version"
    #create an object
    $uptime = New-Object -TypeName PSObject -Property @{
     StartTime = $starttime.Item(0)
     Uptime = (Get-Date)-$starttime.Item(0)
     Version = $version.Item(0).replace("`n","|")
    $tmp = $uptime | ConvertTo-HTML -fragment -AS List
    #replace "|" place holder with <br>"
    $fragments += $tmp.replace("|","<br>")
    #SQL Host Information
    $smo = new-object ('Microsoft.SqlServer.Management.Smo.Server') $computername
    $fragments += "<h3>SQL Host Information Details</h3>"
    $fragments += $smo | select ComputerNamePhysicalNetBios,Name, Processors, ProcessorUsage, PhysicalMemory, PhysicalMemoryUsageInKB, MasterDBPath, BackupDirectory | ConvertTo-HTML -Fragment
    #Get Status of all SQL related Services
    Write-Verbose "Querying services"
    $services = Get-Service -DisplayName *SQL* -ComputerName $computername |
    Select Name,Displayname,Status
    $fragments += "<h3>SQL Services</h3>"
    $fragments += $services | ConvertTo-HTML -Fragment
    #get databases
    #path to databases
    Write-Verbose "Querying datases"
    $dbpath = "SQLServer:\SQL\Localhost\default\databases"
    $fragments += "<h3>Database Utilization</h3>"
    $fragments += dir $dbpath | Select Name,Size,DataSpaceUsage,SpaceAvailable,
    @{Name="PercentFree";Expression={ [math]::Round((($_.SpaceAvailable/1kb)/$_.size)*100,2) }} |
    Sort PercentFree | ConvertTo-HTML -fragment
    #get database backup information
    # Create an SMO connection to the instance
    $smo = new-object ('Microsoft.SqlServer.Management.Smo.Server') $computername
    $dbbackups = $smo.Databases
    $fragments += "<h3>Last Database Backup Information</h3>"
    $fragments += $dbbackups | select Name,LastBackupDate, LastLogBackupDate | ConvertTo-HTML -Fragment
    #Login & Service Account Information#SQL Host Information
    $smo = new-object ('Microsoft.SqlServer.Management.Smo.Server') $computername
    $fragments += "<h3>Login & Service Account Information</h3>"
    $fragments += $smo | select ServiceAccount, Logins | ConvertTo-HTML -Fragment
    #volume usage
    Write-Verbose "Querying system volumes"
    $data = Get-CimInstance win32_volume -filter "drivetype=3" -ComputerName $computername
    $drives = foreach ($item in $data) {
        $prophash = [ordered]@{
        Drive = $item.DriveLetter
        Volume = $item.DeviceID
        Compressed = $item.Compressed
        SizeGB = $item.capacity/1GB -as [int]
        FreeGB = "{0:N4}" -f ($item.Freespace/1GB )
        PercentFree = [math]::Round((($item.Freespace/$item.capacity) * 100),2)
        #create a new object from the property hash
        New-Object PSObject -Property $prophash
    [xml]$html = $drives | ConvertTo-Html -fragment
    #check each row, skipping the TH header row
    for ($i=1;$i -le $html.table.tr.count-1;$i++) {
      $class = $html.CreateAttribute("class")
      #check the value of the last column and assign a class to the row
      if (($html.table.tr[$i].td[-1] -as [int]) -le 25) {                                         
        $class.value = "danger" 
        $html.table.tr[$i].Attributes.Append($class) | Out-Null
      elseif (($html.table.tr[$i].td[-1] -as [int]) -le 35) {                                              
        $class.value = "warn"   
        $html.table.tr[$i].Attributes.Append($class) | Out-Null
    $fragments += "<h3>Volume Utilization</h3>"
    $fragments += $html.innerxml
    #define the HTML style
    Write-Verbose "preparing report"
    $imagefile = "c:\scripts\db.png"
    $ImageBits = [Convert]::ToBase64String((Get-Content $imagefile -Encoding Byte))
    $ImageHTML = "<img src=data:image/png;base64,$($ImageBits) alt='db utilization'/>"
    $head = @"
    <style>
    body { background-color:#FAFAFA;
           font-family:Arial;
           font-size:12pt; }
    td, th { border:1px solid black;
             border-collapse:collapse; }
    th { color:white;
         background-color:black; }
    table, tr, td, th { padding: 2px; margin: 0px }
    tr:nth-child(odd) {background-color: lightgray}
    table { margin-left:50px; }
    img
    float:left;
    margin: 0px 25px;
    .danger {background-color: red}
    .warn {background-color: yellow}
    </style>
    $imagehtml
    <br><br><br>
    <H2>SQL Server Report: $Computername</H2>
    <br>
    #create the HTML document
    ConvertTo-HTML -Head $head -Body $fragments -PostContent "<i>report generated: $(Get-Date)</i>" |
    Out-File -FilePath $path -Encoding ascii
    Write-Verbose "Opening report"
    Invoke-Item $path
    ######################END SCRIPT##################################
    I have 2 questions for help in regards to the above script:
    1)  For the Login and Service Account portion I can't get my output to show up properly.  Here is the snip from the script:
    #Login & Service Account Information#SQL Host Information
    $smo = new-object ('Microsoft.SqlServer.Management.Smo.Server') $computername
    $fragments += "<h3>Login & Service Account Information</h3>"
    $fragments += $smo | select ServiceAccount, Logins | ConvertTo-HTML -Fragment
    Here is how the output shows for this portion:
    ServiceAccount
    Logins
    domain\svcAcct
                 Microsoft.SqlServer.Management.Smo.LoginCollection
    I would like top have the login information show in the above table of the all the different logins.  When I run the script without HTML for that portion and just output to console it shows the login info as I would expect.
    2)  The 2nd question is, how do I add a variable to the bottom of the script to email the report to said email address.  This is probably simple but can't get my head wrapped around this part.
    Thanks all in advance!

    Thanks AnnaWY, that resolved the portion on how to email the report.  I was also able to utilize the following code which does the same thing as well:
    #Send an email with the contents of the report
    $MailBody= Get-Content $path
    $MailSubject= "SQL Server Report"
    $SmtpClient = New-Object system.net.mail.smtpClient
    $SmtpClient.host = "smtp.server.com"
    $MailMessage = New-Object system.net.mail.mailmessage
    $MailMessage.from = "[email protected]"
    $MailMessage.To.add("[email protected]")
    $MailMessage.Subject = $MailSubject
    $MailMessage.IsBodyHtml = 1
    $MailMessage.Body = $MailBody
    $SmtpClient.Send($MailMessage)
    I still have not been able to resolve the portion regarding the login/service account information not showing up in the table correctly.  For the time being I have removed it from the environment report and instead included it as a script of its own
    in our Security Auditing process.

  • Byte Array from SQL Reporting Service

    I am calling the Render method of the Microsoft SQL Reporting
    Service's ReportExecution web service. It returns a Byte array in
    the lastResult object. I am having the hardest time figuring out a
    way to convert that byte array into something I can use in Flex.
    The byte array, once converted into a more user friendly format,
    will contain the rendered version of a SQL Report in whatever
    format I have specified...in this case it is XML. Any input or
    suggestions would be appreciated.

    This is a little late, I know. but I just spent the day
    struggling with this very issue. Hopefully this can help someone
    else in the future. Here's my solution...
    on MX:Operation -- result="fillXML()"
    then
    private function fillXML(): void {
    var x:XML = new
    XML(wsProps.GetDatasetData.lastResult.toString());
    ...do what you need with your xml...
    I use an XMLList node of the result as the source property
    for an XMLListCollection bound to a datagrid. Let me know if you
    need more help to get it working. It works like a charm now that I
    figured that out. I don't know if it's a slimy hack, or not, but it
    gets the job done.

  • SQL Report not Working

    We have this DCM report in SCCM 2007 and we want to migrate it to SCCM 2012. In SCCM 2007, this report is working when you run it in the sccm console, but does not work when you run it in sql management studio. The error that I am encountering in sql management
    studio is
    The EXECUTE permission was denied on the object 'fnBuildCICategories', database 'SMS_ABC', schema 'dbo'
    After importing this report in SCCM 2012, this report is giving me the same error when running from the sccm console as well as in sql management studio
    Can anyone help me resolve this issue. Here is the sql report
    declare
    @severity varchar(255)
    declare
    @cicontentversion varchar(255)
    declare
    @name varchar(255)
    declare
    @category varchar(255)
    set
    @severity =
    'Informational'
    set
    @name =
    '1.0 Compliance Baseline'
    set
    @cicontentversion =
    set
    @category =
    'Windows'
    if
    IsNumeric(@severity)<>1
    begin
    select @severity=Severity
    from v_CIValidationSeverity
    where
    Description=@severity
    end
    select
      loc
    .DisplayName
    as BaselineName,
      ci
    .SDMPackageVersion
    as BaselineContentVersion,
      cssev
    .Description
    as MaxNoncomplianceCriticality,
      summ
    .CountCompliant,
      summ
    .CountNoncompliant,
      summ
    .CountTargeted
    - summ.CountCompliant
    - summ.CountNoncompliant
    - summ.FailureCount
    as CountNotReporting,
      summ
    .FailureCount,
      summ
    .CountTargeted,
      summ
    .ActivatedCount,
    case
    when summ.CountTargeted>0
    then
    convert(numeric(5,2),
    100.0*summ.CountCompliant/summ.CountTargeted)
    else 0
    end
    as CompliancePercentage,
      dbo
    .fnBuildCICategories(ci.CI_ID)
    as Categories,
      ci
    .CI_UniqueID
    as Baseline_UniqueID,
    -- used for drillthrough
    from
    v_CIComplianceSummary summ
    left
    join v_CIValidationSeverity cssev
    on cssev.Severity=summ.Severity
    left
    join v_LocalizedCIProperties_SiteLoc loc
    on loc.CI_ID=summ.CI_ID
    inner
    join v_ConfigurationItems ci
    on summ.CI_ID=ci.CI_ID
    left
    join(select
    distinct CI_ID
    from
                v_CICategoryInfo cat
    where cat.CategoryInstanceName
    = @category
    or @category='')
    temp
    on
    temp.CI_ID=ci.CI_ID
    where
    CIType_ID=2
    and(loc.DisplayName
    = @name
    or @name='')
    and(ci.SDMPackageVersion
    = @cicontentversion
    or @cicontentversion
    =
    and(summ.Severity
    >= @severity
    or @severity='')
    and(temp.CI_ID
    is
    not
    null
    or @category='')
    order
    by summ.CountCompliant,
    summ.Severity,
    BaselineName, BaselineContentVersion

    I bet you have an SSRS exestuation account that has been given the correct permission within the CM12 db. Are you dbo for CM12 db? if not have you grant yourself db_reader and sms_report reader (local group) rights?
    Did you know that even if you do that this working, there is another issue with respect to converting varchar to int?
    http://www.enhansoft.com/

  • Displaing BINARY_DOUBLEs in a SQL Report

    I am trying to display BINARY_DOUBLEs in a SQL report and the vales display with scientific notation:
    1.0495999999999999E+002
    I would like to display them like this:
    1.04

    If you try to round to anything greater then 0 tenths and you have a NAN value you get an error. Oracle has a nanvl function to convert NAN to some other value. It has a bug in it if you try to convert NAN to NULL.
    So what I did.
    Created a function to pass in my BINARY_DOUBLE value check to see if it is NAN if it is pass back a NULL is it is not pass back the non-NAN value.
    Now I can use round(X,2)
    Thanks.

  • Convert to SQL Query

    Hi
    On a report there is a function "Convert to SQL Query", I have tryed the function and get the SQL statment for the report, is it the only thing to get in "text" instead of the more "graphic" way to show it?
    Best Regrads
    Jesper Vels

    Jesper,
    is it the only thing to get in "text" This is correct.The "Convert to SQL Query" link is available for report that are built using the Wizard. Selecting this will give you the underlying SQL Query that you can edit/modify if required.
    more "graphic" way to show itWhat do you mean by this? Please elaborate?
    -Amitabh

Maybe you are looking for

  • How to use Digital output to turn on sensor for Analog Input?

    I am trying to use a digital output to turn on an array of sensors that I then wish to read on 16 analog input lines. I have a 6024E DAQ card. I am planning to take data at 10-20 hz, so not terribly fast, but I will be acquiring for long periods of t

  • FCC For csv WITHOUT new lines

    Hello to everybody, I trying to do a file content conversion for the following file : a;b;c;d;a;b;c;d;a;b;c;d Problem : file has 4 fields meaning that there is not a nl after each line . The correct file for instance have to be a;b;c;d a;b;c;d a;b;c;

  • Resultset  relative method is not working

    how to change a resultset TYPE_FORWARD_ONLY to move in both direction

  • MS Word Attachment

    Hey Guys, Just wondering if anyone else has had this issue. If a word document is sent as an attachment to the iPhone with "track changes" turned on the iPhone does not distinguish the original text from the changes. The iPhone merges everything toge

  • JtextField.setText()

    im having problem with JTextField.setText()... let say i have a vector containing multiple strings and i wanna set the text of a jtextfield with one of my vector's element i do: JTextField.setText((String)Vector.firstElement()); but how come in my jt