IR with dynamic pivot

Hi all
We have been designing resource management system and want to provide flexible way to extend resource properties at runtime. So we are storing resource properties in a single table, e.g.
select * from _kv
ID K V
  1  name Bob
  1  age  30
  1  gender male
  2  name Susan
  2  status married
convert to
+-----+-------+--------+----------+
| key | color | height | whatever |
+-----+-------+--------+----------+
| 1   | green | 15     | ---      |
| 2   | ---   | ---    | lol      |
+-----+-------+--------+----------+
example of dynamic pivot Dynamic SQL Pivoting – Stealing Anton’s Thunder</title> //<title>AMIS Technology Blog…
Is it possible to create interactive report with dynamic columns updated when _kv will be changed?
Is it possible to create add/edit dynamic form depends on key set if we add value type description?
Thanks

make sure you put some thought into your database design before you go too far.
There are many horror stories about EAV based schema designs. (which this design seems to be heading.)
Read up on them before you go too far.
-- back to being on topic --
AFAIK you can not do dynamic SELECT with an Interactive Report.
However, you can with a Basic Report.  But, it is non-trivial. (ie it is difficult to do)
Basic Report can use a "function returning SELECT statement".
You will also need to name the columns based on a different function.
In order to 'synchronize' the column names with the SELECT statement, you will need a 3rd function that properly generates them.
This 3rd function MUST have an 'ORDER BY' clause.
Both the generateSELECT() function and the generateCOLUMN_NAMES() function will call that 3rd function.
From a code management standpoint, you will need to create a package that contains all three functions.
are you sure you want to go this route?
are you ready to go this route?
Again, think about your table designs.
MK

Similar Messages

  • Dynamic pivot error

    Hi,
    I know work with dynamic pivot,this is my query
    DECLARE @listCol VARCHAR(2000)
    DECLARE @query VARCHAR(4000)
    SELECT @listCol = STUFF(( SELECT DISTINCT
    '],[' + CONVERT(VARCHAR, MONTH(t0.docdate) , 102)
    FROM dbo.ORDR T0 inner join OUSR T1 on T0.UserSign = T1.INTERNAL_K
    ORDER BY '],[' + t0.docdate
    FOR XML PATH('')
    ), 1, 2, '') + ']'
    SET @query =
    'SELECT * FROM
    (SELECT T1.U_NAME as [Owner],t0.docnum,t0.doctotal
    FROM dbo.ORDR T0 inner join OUSR T1 on T0.UserSign = T1.INTERNAL_K
    WHERE (T0.docdate) between [%1] and [%2]
    GROUP BY T1.U_NAME
    ) S
    PIVOT (Sum(t0.doctotal) FOR Date
    IN ('@listCol')) AS pvt'
    EXECUTE (@query)
    when i enter the date and OK it will show this error
    '  Incorrect Syntax near 20110101  '
    Hopefully expert can help me.
    Regards,
    Arif

    actually i want to edit this query to be dynamic in monthly for doctotal and grosprofit
    SELECT T1.[U_NAME] 'Owner',count(t0.docnum) as 'Sales Order', sum(t0.doctotal) 'Total Sales Order', sum(t0.grosprofit) 'Gross Profit' FROM ORDR T0  INNER JOIN OUSR T1 ON T0.UserSign = T1.INTERNAL_K WHERE (T0.[DocDate] between '[%0]' and '[%1]') GROUP BY T1.[U_NAME]
    i already try to put  like this but still syntax error
    Declare @FromDate Datetime
    Declare @ToDate Datetime
    SET @FromDate = '20110101'
    SET @ToDate = '20110101'
    maybe got another way or type of query easier to me for dynamic pivot.hopefully expert can help me.

  • How to Handle Dynamic Pivoting with a single SQL?

    I was searching for a single SQL who can dynamically understands the pivoting members in the data, I saw several ways of doing Pivoting depending on the version, some are really hard to understand but just two options upto now seams to be flexable enough to do dynamic pivoting, right?
    1- For this option you have to write PL/SQL block to build up the dynamic single SQL query, I also find this approach very easy to understand. :)
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::NO::P11_QUESTION_ID:766825833740
    2- 11.1 's PIVOT new feature with PIVOT XML and ANY clause, a SINGLE SQL and easy to understand but returns XMLTYPE data, another step to parse to produce the report is needed.
    http://www.oracle-developer.net/display.php?id=506
    Below is a 10g Model Clause example, but here instead of pivoting by A1-A2-A3 staticly I want to have these values by a distinc subquery for example;
    create table test(id varchar2(2), des varchar2(4), t number);
    INSERT INTO test values('A','a1',12);
    INSERT INTO test values('A','a2',3);
    INSERT INTO test values('A','a3',1);
    INSERT INTO test values('B','a1',10);
    INSERT INTO test values('B','a2',23);
    INSERT INTO test values('C','a3',45);
    commit;
    SELECT * FROM test;
    ID DES T
    A a1 12
    A a2 3
    A a3 1
    B a1 10
    B a2 23
    C a3 45
    select distinct i, A1, A2, A3
    from test c
    model
    ignore nav
    dimension by(c.id i,c.des d)
    measures(c.t t, 0 A1, 0 A2, 0 A3)
    rules(
    A1[any,any] = t[cv(i),d = 'a1'],
    A2[any,any] = t[cv(i),d = 'a2'],
    A3[any,any] = t[cv(i),d = 'a3']
    I A1 A2 A3
    C 0 0 45
    B 10 23 0
    A 12 3 1 Any advice is appreciated, thank you.

    Hi,
    You can do dynamic SQL in SQL*Plus, also.
    [Thid thread|http://forums.oracle.com/forums/thread.jspa?messageID=2744039&#2744039] shows how to pivot a table with a dynamic number of columns.

  • Dynamic Pivot with Select Into

    I have this Dynamic Pivot which works fine.
    DECLARE @query VARCHAR(4000)
    DECLARE @years VARCHAR(2000)
    SELECT @years = STUFF(( SELECT DISTINCT'],[' + [factor_label]
    FROM [TEMP_lacp_factors]
    ORDER BY '],[' + [factor_label]
    FOR XML PATH('')
    ), 1, 2, '') + ']'
    SET @query =
    'SELECT * FROM
    SELECT [date_],[issue_id],[cusip],[Factor_value],[factor_label]
    FROM [TEMP_lacp_factors]
    )t
    PIVOT (MAX([factor_value]) FOR [factor_label]
    IN ('+@years+')) AS pvt'
    EXECUTE (@query)
    I'm trying to take the results of that and do a SELECT INTO, so I can move the results to another table.  Is this possible?  I didn't find a whole lot online.
    The error that I'm getting is this.
    Caused by: Column name or number of supplied values does not match table definition.
    How can I do this?  Is it even possible?
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Sure, you can create a table with SELECT INTO, but it cannot be a #temptable. Well, it can be a #temptable, but it will disappear as soon as you exit the scope it was created it, that is the dynamic SQL.
    The question is only, what would you do with this table later? Since you don't know the column names, about all work will have to be done through dynamic SQL.
    A dynamic pivot is a non-relational operation. A SELECT statement produces a table, and a table describes a distinct entity, of which the column are distinct and well-defined attributes. Something which your dynamic pivot does not adhere to.
    There is only one thing you can do with your dynamic pivot: returning the data to the client. I don't know what you want to do with that table, but probably you should do that manipulation before the dynamic pivot, because as I said: that is always your
    last step.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • DYNAMIC PIVOT - Problem with variables

    Dear All,
    I'm working on a Query that makes use of Dynamic Pivot
    It is intented to give a summarized list of Income and Expenses month by month
    I have adapted the foll. Query from SAP B1 Forum to my problem:
    Re: Date Wise Production Report
    Unfortunately my adaptation does not work.
    When I run it, the following Selection Criteria screen appears. I input the dates as below:
    Query - Selection Criteria
    Posting Date        Greater or Equal            01.01.11
    Posting Date        Smaller or Equal            31.12.11
    [OK]      [Cancel]
    On pressing [OK], I receive this error message:
    Incorrect Syntax near 20110101
    Grateful if anybody could help me spot my mistake (It's likely to be within Section 2)
    Thanks
    Leon Lai
    Here's my adapted SQL
    /*Section 1*/
    DECLARE @listCol VARCHAR(2000)
    DECLARE @query VARCHAR(4000)
    /*Section 2*/
    SELECT @listCol =
    STUFF(
    ( SELECT DISTINCT
    '],[' + CONVERT(VARCHAR, MONTH(T0.RefDate), 102)
    FROM JDT1
    FOR XML PATH('')
    , 1, 2, '') + ']'
    /*Section 3*/
    SET @query =
    SELECT * FROM
    SELECT
    T0.Account,
    T1.GroupMask,
    T1.AcctName,
    MONTH(T0.RefDate) as [Month],     
    (T0.Debit - T0.Credit) as [Amount]
    FROM dbo.JDT1 T0
    JOIN dbo.OACT T1 ON T0.Account = T1.AcctCode
    WHERE
    T1.GroupMask IN (4,5,6,7) AND
    T0.[Refdate] >= '[%1]'AND
    T0.[Refdate] <= '[%2]'
    ) S
    PIVOT
    Sum(Amount)
    FOR [Month] IN ('+@listCol+')
    ) AS pvt
    /*Section 4*/
    EXECUTE (@query)

    Hi,
    try to update where condition as  :
    T0.[Refdate] >= ' + cast ([%1] as nvarchar) + ' AND
    T0.[Refdate] <= ' + Cast([%2] as Nvarchar) + '
    Thanks,
    Neetu

  • Advanced query with dynamic columns

    Hi All,
    I have a table with structure shown below. I need to pull data out of this table and the output should be in a format indicated by the select statement below. I have the following questions and I appreciate if someone could help.
    1. I need to extract 3 years(current year + 2 historical years) worth of data out of this table dynamically(I can't hardcode year). How can I modify the code below so that the select statement returns 3 years worth of data dynamically?
    2. Should I instead calculate each quarter in the select statement using "CASE"? Would this be a good idea and i wouldn't have to deal with the PIVOT function?
    3. The reason I am asking about #2 is because our application requires the out field names to be as CYQ1, CYQ2, CYQ3, CYQ4, LYQ1, LYQ2, LYQ3, LYQ4 etc.(LY = last year). I am not sure if this is possible to do in Pivot table. Could the method outlines
    in #2 be the best practice in my situation?
    Thanks in advance for your thoughts.
    DECLARE @Trans_Summary TABLE(
    [Account_ID] [int] NULL,
    [End_Date] DATE NULL,
    [Amount] [float] NULL,
    [Customer_ID] [int] NULL)
    INSERT @Trans_Summary VALUES(1, '03/31/2013', 100, 123)
    INSERT @Trans_Summary VALUES( 1, '01/31/2013', 200, 123)
    INSERT @Trans_Summary VALUES( 1, '06/30/2013', 100, 123)
    INSERT @Trans_Summary VALUES( 1, '09/30/2013', 100, 123)
    INSERT @Trans_Summary VALUES( 1, '12/31/2013', 100, 123)
    SELECT *
    FROM @Trans_Summary
    PIVOT(SUM([Amount])FOR End_Date IN ([2013-01-31], [2013-03-31], [2013-06-30], [2013-09-30], [2013-12-31])) AS TT

    Yes, you should always use CASE for pivots and never use the PIVOT keyword. The latter gives you somewhat shorter query text, for very little gain.
    As I understand what you are asking for, you can easily do it with CASE without dynamic SQL:
    DECLARE @year char(4) = '2013',
            @q1 = char(4) = '0331',
            @q2 = char(4) = '0630',
            @q3 = char(4) = '0930',
            @q4 = char(4) = '1231'
    SELECT Account_ID,
           SUM(CASE WHEN End_Date = @year + @q1 THEN Amount END) AS CYQ1,
           SUM(CASE WHEN End_Date = dateadd(YEAR, -1, @year + @q1) THEN Amount END) AS LYQ1,
    FROM   tbl
    GROUP  BY Account_ID
    Well, maybe that can be done with PIVOT as well, but I have never learnt how to use the keyword. It just looks difficult to me. And useless.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Dynamic PIVOT in T-SQL or somewhere else?

    In a
    recent thread on dynamic SQL, the issue of dynamic PIVOT came up.
    Dynamic PIVOT can be implemented in T-SQL with dynamic SQL:
    Pivots with Dynamic Columns in SQL Server 2005
    http://sqlhints.com/2014/03/18/dynamic-pivot-in-sql-server/
    http://stackoverflow.com/questions/10404348/sql-server-dynamic-pivot-query
    http://www.sqlusa.com/bestpractices2005/dynamicpivot/
    Alternatives:
    1. Enhancement by MS to the current static PIVOT which has limited use since it is not data-driven
    2. Use SSRS which has built-in dynamic columns
    3. Use client app
    What is your opinion? Is it OK to use dynamic SQL for dynamic PIVOT?
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

    solution elsewhere, for instance with Tablix in SSRS. Pivoting a result set in C# should not be too difficult
    But I could do it much faster in T-SQL with dynamic SQL. 
    If your shop has a reporting system like SSRS and the request is for permanent report, then by all means, SSRS is the choice with built-in dynamic columns.
    C#? I used to know C/C++. So that is not a choice for me. On the other hand, if you are competent in C#, then it may be a better choice, or it may not.
    I'm not sure why people tend to shy away from dynamic SQL, for me, I've never had any problems or issues. Is there any specific reason for this?
    Maybe the multiple single quotes like '''' in concatenation of the dynamic SQL string? When one looks at the following example, it is easy to see that dynamic SQL adds a new level of complexity to static SQL. Yet, the complexity pays off with incredible
    dynamic SQL programming power.
    BLOG: Building Dynamic SQL In a Stored Procedure
    Code example from the blog:
    /* This stored procedure builds dynamic SQL and executes
    using sp_executesql */
    Create Procedure sp_EmployeeSelect
    /* Input Parameters */
    @EmployeeName NVarchar(100),
    @Department NVarchar(50),
    @Designation NVarchar(50),
    @StartDate DateTime,
    @EndDate DateTime,
    @Salary Decimal(10,2)
    AS
    Set NoCount ON
    /* Variable Declaration */
    Declare @SQLQuery AS NVarchar(4000)
    Declare @ParamDefinition AS NVarchar(2000)
    /* Build the Transact-SQL String with the input parameters */
    Set @SQLQuery = 'Select * From tblEmployees where (1=1) '
    /* check for the condition and build the WHERE clause accordingly */
    If @EmployeeName Is Not Null
    Set @SQLQuery = @SQLQuery + ' And (EmployeeName = @EmployeeName)'
    If @Department Is Not Null
    Set @SQLQuery = @SQLQuery + ' And (Department = @Department)'
    If @Designation Is Not Null
    Set @SQLQuery = @SQLQuery + ' And (Designation = @Designation)'
    If @Salary Is Not Null
    Set @SQLQuery = @SQLQuery + ' And (Salary >= @Salary)'
    If (@StartDate Is Not Null) AND (@EndDate Is Not Null)
    Set @SQLQuery = @SQLQuery + ' And (JoiningDate
    BETWEEN @StartDate AND @EndDate)'
    /* Specify Parameter Format for all input parameters included
    in the stmt */
    Set @ParamDefinition = ' @EmployeeName NVarchar(100),
    @Department NVarchar(50),
    @Designation NVarchar(50),
    @StartDate DateTime,
    @EndDate DateTime,
    @Salary Decimal(10,2)'
    /* Execute the Transact-SQL String with all parameter value's
    Using sp_executesql Command */
    Execute sp_Executesql @SQLQuery,
    @ParamDefinition,
    @EmployeeName,
    @Department,
    @Designation,
    @StartDate,
    @EndDate,
    @Salary
    If @@ERROR <> 0 GoTo ErrorHandler
    Set NoCount OFF
    Return(0)
    ErrorHandler:
    Return(@@ERROR)
    GO
    LINK:
    http://www.codeproject.com/Articles/20815/Building-Dynamic-SQL-In-a-Stored-Procedure
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Having a problem with writing pivoting query.

    Hi All,
    I have a query with one input parameter. It gives different result based on the input provided.
    For example
    1. If i give input as date1 the output would be as follows.
    Col1     Col2     Col3
    name1     v1     10
    name1     v2     14
    name2     v1     15
    name3     v3     202. If i give input as date2 the output would be as follows.
    Col1     Col2     Col3
    name2     v1     14
    name2     v2     10
    name3     v1     8
    name3     v2     14
    name1     v1     10
    name1     v2     34
    name1     v4     23
    name1     v5     10
    name4     v1     12
    name4     v2     14
    name4     v4     18
    name4     v5     20
    name5     v1     14
    name5     v2     10and so on for diff inputs, I get diff output.
    Now, I am trying to write a query which would give me the pivot data on the outputs shown above.
    For Example
    1. For the first output on the top, the pivot query should return the data as follows:
          name1     name2     name3
    v1     10     15     0
    v2     14     0     0
    v3     0     0     202. For the second output on the top, the pivot query should return the data as follows:
          name1     name2     name3     name4     name5
    v1     10     14     8     12     14
    v2     34     10     14     14     10
    v3     0     0     0     0     0
    v4     23     0     0     18     0
    v5     10     0     0     20     0and so on...
    I would be greatly thankful for any kind of input provided since.
    Regards
    Sapan

    Hi Frank,
    Thanks for your response, I did have a look at the thread which had the options for both static as well as the dynamic pivoting.
    But as you said this scenario needs a dynamic SQL. The only constraint is, I need to plug in the SQL into HTML-DB and spooling would not be feasible. That's the reason I am trying to frame a query around the current query which gives me the base data to be pivoted. I am also keeping my options open on coming up with PL/SQL block, which can integrate well with HTML-DB.
    Any thoughts/suggestions would be helpful.
    Thank you.

  • Order columns in dynamic pivot

    I have the following query that works well, except that the columns (hours) are not sorted. 
    --Get distinct values of the PIVOT Column
    SELECT @ColumnName= ISNULL(@ColumnName + ',','')
    + QUOTENAME([hour])
    FROM (SELECT DISTINCT [hour] FROM #temp) AS Courses
    --Prepare the PIVOT query using the dynamic
    SET @DynamicPivotQuery =
    N'SELECT EmpId, ' + @ColumnName + '
    FROM #temp
    PIVOT(SUM(Total)
    FOR [hour] IN (' + @ColumnName + ')) AS PVTTable'
    --Execute the Dynamic Pivot Query
    select @DynamicPivotQuery
    EXEC sp_executesql @DynamicPivotQuery
    The resultset for the following dynamic pivot, the [hours] are the top:
    EmpId [23] [15] [12] [21] [18] [10 [19] [13] [22]...
    704 9 2.43 8.5 3.2 29 1.2 2.3 29 1.2 ...
    As you can see the hours are not sorted. I would like to display them sorted descending.
    thanks
    VM

    Using the method I posted in your previous question, there is sorting built in:
    CREATE TABLE #table (name VARCHAR(20), date DATE, hr CHAR(2), min CHAR(20), amt INT)
    INSERT INTO #table (name, date, hr, min, amt) VALUES
    ('Joe ', '20150320', '08', '00', 5),('Joe ', '20150320', '08', '15', 3),('Carl', '20150320', '09', '30', 1),
    ('Carl', '20150320', '09', '45', 2),('Ray ', '20150320', '13', '00', 8),('Ray ', '20150320', '13', '30', 6),
    ('Patrick', '20150320', '14', '30', 6),('Patrick', '20150320', '15', '30', 6),('Patrick', '20150320', '16', '30', 6)
    DECLARE @dSQL NVARCHAR(MAX), @pivotCols NVARCHAR(MAX)
    ;WITH base AS (
    SELECT CAST('['+hr+']' AS NVARCHAR(MAX)) AS string, ROW_NUMBER() OVER (ORDER BY CAST(hr AS INT) DESC) AS seq
    FROM #table
    GROUP BY hr
    ), rCTE AS (
    SELECT string, seq
    FROM base
    WHERE seq = 1
    UNION ALL
    SELECT a.string +',' + r.string, a.seq
    FROM base a
    INNER JOIN rCTE r
    ON r.seq + 1 = a.seq
    SELECT @pivotCols = string
    FROM rCTE
    WHERE seq = (SELECT MAX(seq) FROM rCTE)
    SET @dSQL = 'SELECT name, date, '+@pivotCols+'
    FROM (
    SELECT name, date, amt, hr
    FROM #table
    ) s
    PIVOT (
    SUM(amt) FOR hr IN ('+@pivotCols+')
    ) p
    GROUP BY name, date, '+@pivotCols
    EXEC sp_executeSQL @dSQL
    DROP TABLE #table
    The columns are sorted by:
    ROW_NUMBER() OVER (ORDER BY CAST(hr AS INT) DESC)
    It produces:
    name date 08 09 13 14 15 16
    Carl 2015-03-20 NULL 3 NULL NULL NULL NULL
    Joe 2015-03-20 8 NULL NULL NULL NULL NULL
    Patrick 2015-03-20 NULL NULL NULL 6 6 6
    Ray 2015-03-20 NULL NULL 14 NULL NULL NULL
    Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question.

  • Xcelsius Engage: Issue with dynamic visibilty of data in dashboard

    Hi,
    We have a requirement for a dashboard where data for 5 Sites need to be displayed as per 17 KPIs and 12 different rolling months.
    Raw sample data looks like below-
    SITE  KPI        ActYTD  Act(Pre Month) PlanYTD  Plan(Prev Month)  VarianceYTD Variance(Pre Month)
    A       On-Time   76.7         82.92                  111.50       109.50             -1                    -1
    B       Delay       73.70       80.00                   79.75        77.75             -1                     1
    There are 5 different Sites and 17 different KPIs.
    Based on the raw data that we get from BI (7.0 query output), we manipulate it in MS excel, using some lookups and formulae to obtain certain values, store them in designated sheets and then Xcelsius (different components) use these sheets as source.
    We are having three levels of navigation-
    1. Main screen listing all KPIs site wise and months ( the site and months could be selected from Combo boxes at the top). The KPIs are bind to a list view, each row is a selectable KPI leading to level two navigation.
    2. Level two contains the details for each KPI ( values and trend chart). Selection in the chart for a Site leads to level 3 navigation.
    3. Level 3 screen contains data by KPI and by Site for 12 rolling months ( The sites could be changed from a drop-down).
    There are custom navigation buttons (home/back) to enable navigations between the screens.
    We are using 3 panel containers, 2 list views, 4-5 combo boxes and some hidden button ( with dynamic visibilty).
    The workbook has 8-9 different sheets, though the Xcelsius componets are bound to only 3 sheets.
    Things work fine till we select 14th KPI , but Xcelsius starts behaving awkwardly when we select 15th KPI and further.For the selected KPI, the level two screen would load for a flash of a second and then the control comes back to level 1 screen. We do not face this issue till 14th KPI.
    In-order to eliminate possibiltes we did the following-
    1. Changed the order of KPIs - issue persists
    2. Changed the Excel option " Max. no of Rows" to 4000- issue persists
    3. Decreased the amount of data to be loaded - issue persists ( though at max we are loading data for 2000 rows)
    4. Decreased the no. of KPIs to 14 in level 1 list view - all works fine.
    We have not noticed any gradual decrease in performance/load time till 14th KPI but everything goes for a toss when the 15th KPI is displayed.
    We are on the latest Xcelsius patch ( patch 3).
    We would appreciate any pointers/help to resolve this issue.
    Thanks in advance for your time.
    Best Regards,
    Bansi.

    How many total rows are you dealing with in your spreadsheet?
    -Dell

  • Unable to get the data from a website with dynamically filled textboxes when accessing through myWb.Document.GetElementById("num1").InnerText;

    Hi Team,
    I am learning on webbrowser control and during the learning phase i have the following issue:-
    My webbrowser [mywb in this case] is successfully navigating and displaying the website content in webbrowser control. However; that site has three textboxes with dynamically allocated text from asp script
    code behind; I have tried to display these textboxes values by providing the correct id of these textboxes in my visual studio 2013 code; but I am not receiving any data except null. Can you help me on this as early as possible.
    asp code written to dynamically assign the data to textbox:-
    <%
    myvar=Request.form("some")
    Response.write("<input type=text id=num1 value=" + myvar+ ">")
    %>
    The code written in VS 2013 to access the textbox  by its id when the DocumentCompleted event is triggered:-
    string mystr ="";
    mystr = myWb.Document.GetElementById("num1").InnerText;
    MessageBox.Show(mystr);
    Thank You in Advance.
    Regards, Subhash Konduru

    Hello,
    Thank you for your post.
    I am afraid that the issue is out of support range of VS General Question forum which mainly discusses
    the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    Because the issue is related to website, I suggest that you can consult your issue on ASP.NET forum:
    http://forums.asp.net/
     for better solution and support.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Problem with Dynamic Node & UI Elements

    Hi,
                                            The scenario is to create an Questioaire.Since the number questions which I get from R/3 may vary, I have created the Dynamic Node which is mapped with Dynamic set of Radio button Group by index for options & Dynamic text view for displaying Questions..  A New Dynamic Node will be created for each set of Questions .The Number of questions displayed per page is controlled by the Static Counter Variable....
                                              Now the issue is ,if i click back button the count will be initialized so again it needs to trigger the DoModifyView(). at that time It is arising an exception "Duplicate ID for view & Radio button ..." because while creating Dynamic node i used to have "i" value along the Creation of node name...
    for(i=Count;i<i<wdContext.nodeQuestions().size();i++)
                   customnod=<b>nodeinfo.getChild("Questionaire"+i);</b>
                        if(customnod==null)
    Its not possible to create a new node whenever i click the Back button.
    At the same time i am not able to fetch the elements which had already created Dynamically...
    How do i make the Next & back button work?
    If anyone  bring me the solution It would be more helpful to me.
    Thanks in advance..
    Regards,
    Malar

    Hi,
          We can Loop through the Node Elements but how can we do Option Button Creation for each set of question Options?. At design time we can not have the radio buttons,because we do not know how many set of questions are available at the Backend.

  • Creating Report using EPM Functions with Dynamic Filters

    Hi All,
    I am new to BPC, In BPC 7.5 i seen like we can generate EPM report using EVDRE function very quickly and easy too. Is the same feature is existing in BPC 10.0 ? if no how can we create EPM reports using EPM Functions with Dynamic Filters on the Members of the dimension like in BPC 7.5.
    And i searched in SDN, there is no suitable blogs or documents which are related to generation of Reports using EPM Functions. All are described just in simple syntax way. It is not going to be understand for the beginners.
    Would you please specify in detail step by step.
    Thanks in Advance.
    Siva Nagaraju

    Siva,
    These functions are not used to create reports per se but rather assist in building reports. For ex, you want to make use of certain property to derive any of the dimension members in one of your axes, you will use EPMMemberProperty. Similary, if you want to override members in any axis, you will make use of EPMDimensionOverride.
    Also, EvDRE is not replacement of EPM functions. Rather, you simply create reports using report editor (drag and drop) and then make use of EPM functions to build your report. Forget EvDRE for now.
    You can protect your report to not allow users to have that Edit Report enabled for them.
    As Vadim rightly pointed out, start building some reports and then ask specific questions.
    Hope it clears your doubts.

  • Running a SQL Stored Procedure from Power Query with Dynamic Parameters

    Hi,
    I want to execute a stored procedure from Power Query with dynamic parameters.
    In normal process, query will look like below in Power Query. Here the value 'Dileep' is passed as a parameter value to SP.
        Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData 'Dileep'"]
    Now I want to pass the value dynamically taking from excel sheet. I can get the required excel cell value in a variable but unable to pass it to query.
        Name_Parameter = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
        Name_Value = Name_Parameter{0}[Value],
    I have tried like below but it is not working.
    Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData Name_Value"]
    Can anyone please help me with this issue.
    Thanks
    Dileep

    Hi,
    I got it. Below is the correct syntax.
    Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData '" & Name_Value & "'"]
    Thanks
    Dileep

  • Submit report with dynamic selections

    Hi All,
    I am trying to Submit a report with dynamic selections. I am using the option SUBMIT REPORT WITH FREE SELECTIONS.
    But the dynamic selections are not getting passed.
    Request you to kindly provide some inputs
    My code is
    DATA: trange TYPE rsds_trange,
          trange_line LIKE LINE OF trange,
          trange_frange_t_line LIKE LINE OF trange_line-frange_t,
          trange_frange_t_selopt_t_line LIKE LINE OF trange_frange_t_line-selopt_t,
          texpr TYPE rsds_texpr.
    trange_line-tablename = 'PA0002'.
    *trange_frange_t_line-tablename = 'PA0002'.
    trange_frange_t_line-fieldname = 'GBJHR'.
    trange_frange_t_selopt_t_line-sign   = 'I'.
    trange_frange_t_selopt_t_line-option = 'EQ'.
    trange_frange_t_selopt_t_line-low    = '1987'.
    trange_frange_t_selopt_t_line-high   = '1987'.
    APPEND trange_frange_t_selopt_t_line TO   trange_frange_t_line-selopt_t.
    APPEND trange_frange_t_line TO trange_line-frange_t.
    APPEND trange_line TO trange.
    CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
      EXPORTING
        field_ranges = trange
      IMPORTING
        expressions  = texpr.
    submit RPCADVQ0
    VIA SELECTION-SCREEN
                    WITH SELECTION-TABLE rspar_tab
                    WITH FREE SELECTIONS it_texpr
                    and returN.
    Kindly provide your inputs
    Regards
    Reshma

    Hi Reshma,
    Use the FM - RS_REFRESH_FROM_DYNAMICAL_SEL before FREE_SELECTIONS_RANGE_2_EX.
      data: trange  type rsds_trange,
              g_repid type sy-repid.
    g_repid = 'RPCADVQ0'.
      call function 'RS_REFRESH_FROM_DYNAMICAL_SEL'
        exporting
          curr_report        = g_repid
          mode_write_or_move = 'M'
        importing
          p_trange           = trange
        exceptions
          not_found          = 1
          wrong_type         = 2
          others             = 3.
      if sy-subrc eq 0.
    " Do the changes to the trange
    CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
    EXPORTING
    field_ranges = trange
    IMPORTING
    expressions = texpr.
    submit RPCADVQ0
    VIA SELECTION-SCREEN
    WITH SELECTION-TABLE rspar_tab
    WITH FREE SELECTIONS it_texpr
    and returN.
    endif.
    Cheers,
    Kothand

Maybe you are looking for

  • Old version of Numbers document after updating to iOS 8 and iCloud Drive

    After updating my iPhone to iOS 8 and activating iCloud Drive, some of my number documents are now just older versions of what they used to be. Does someone know how to convert these documents to their last version?

  • Parse an XML of size greater than 64k using DOM

    Hi, I had a question regarding limitation of parsing a file of size greater than 64k in Oracle 10g. Is the error "ORA-31167: XML nodes over 64K in size cannot be inserted" related to this ? One of the developers was telling that if we load an XML doc

  • SOS;;; my Hp truevision webcam couldn't be detected by cyberlink youcam that i installed from hp sup

    My Hp truevision webcam couldn't be detected by cyberlink youcam  the 3rd virsion software that i installed from hp support, indeed i have done all their suggetions from reinstall that software to forced reset, but i dont want to get a back up for my

  • How to I get my iphone for work not linked to itunes acct?

    My son's friend linked my work iphone to my itunes acct.  I do not want this info on my phone? Now my work number shows up when I make calls or text instead of my personal iphone 6  number. Does anyone know how to fix this problem??

  • JDeveloper on Mac

    Hi when i tried to download JDeveloper i got three options 1 for windows, 1 for Linux and 3 for other platforms so if i use Mac should i download the third option ? and does it have same features ? does it have UML Features, data base Engineering Fea