Controlling SWFs with dynamic lengths

I need to load SWF applications into my Director files.
Currently, I am using the timeline with an arbitrary amount of
time. My problem is that the length (playtime) of these SWFs are
dependent on the end-user interactivity. If they press every
button, answer every questions, etc… one viewer could be done
in 5 minutes and another user could be done in 30 minutes. I have
no way of determining. Currently, my timeline will run out and I
send the users to a Menu screen. Is there a way to dynamically load
a SWF and have it play indefinitely? I will have a button on the
screen if the use wishes to exit early.
Thanks in advance for any help with this problem!-
|rossimo|

EDIT: After
trying out Rafael's suggestions, it looks like that has solved my
problem. Thanks for the help Rafael!!
Thanks for the reply Rafael!-
No suggestion would be dumb. I am a Flash user trying to get
terms with Director 11. I am still trying to wrap my head around
the differences in timelines. I would have thought that would stop
the playback of the SWF, but I think you may be correct! I will
give that a shot and report back. More to come...
|rossimo|

Similar Messages

  • Creating character variable with dynamic length

    Hello Experts,
    I need to send contents of an internal table via FTP in character mode,
    the entire contents of a internal table is concatenated in a string(v_string) which needs to be moved to the character variable of same size say l_count = strlen( v_string ).
    can anyone help me to define the character variable say of length l_count.
    I have already tried creating a dynamic character variable using CREATE DATA.
    eg   DATA: dref TYPE REF TO DATA.
      CREATE DATA dref TYPE c LENGTH l_count.
    but this is not working.
    Any response will be helpful.
    Thanks & Regards,
    Sumukh Kapoor.

    Hi Marcin,
    Thanks for your response,
    Reason i need character variable of dynamic length is because the requirement is to send data to client's Windows terminal . We already have FTP code in place and suddenly client has asked to send us data of an internal table in a single line.
    I have concatenated the entire table into a string and then thought of moving the entire data from string to that character.. as the size in character goes beyond 60000 characters in many cases....
    It seems this is not possible as the string cannot be converted to the data type of variable newly declared.
    anyways your input was of great help.
    Thanks  & Regards,
    Sumukh Kapoor.
    Edited by: Sumukh Kapoor on Jul 26, 2010 7:56 AM

  • Controlling swf with html navigation

    I am building a site that is primarily HTML. The idea is to
    get a swf to play then after that is complete to finish with a show
    from a show hide code utilizing HTML. This would all take place
    from the HTML navigation and sub navigation.
    I know how to get this going using just flash but since this
    is an HTML web page I am at a loss of how to control the main swf
    using the HTML navigation.

    you can use javascript to communicate between flash and html.
    use the externalinterface class to communicate between flash and
    javascript.

  • Controlling SWF with Javascript

    Not sure if this is in the right place but I've been searching for a few days for how to do this. What I would like to accomplish is to create a set of javascript controls that would target a SWF file in an html file. The SWF file is basically a digital magazine and I'd like is to have a user click a button and then flip through the magazine forward and back and also be able to zoom in and out. Any help would be greatly appreciated! Thanks!

    you can use javascript to communicate between flash and html.
    use the externalinterface class to communicate between flash and
    javascript.

  • Capturing a dynamic swf with url parameters?

    Hi,
    I'm wondering if it's possible for users to capture an swf
    with URL variables?
    for example ->
    www.somesite.com/foo.swf?param1="value"&param2=value"
    normal swf rippers will catch only the base "naked" swf, but
    is there a way to fully capture the whole flash object after it has
    rendered the parameters?
    (for example, if it's an ad, the full ad with all the
    elements will be captured)
    this can help me to quickly generate demo stand-alone
    instances for some apps i'm building, instead of compiling them
    separately

    oops...sorry for double posting..

  • Loaded external swfs with transitions

    I need help getting my loaded swf files to play the "out" transition before the next movie loads. I have a main swf with 5 buttons (movie clips) that load external swf onto the stage.
    package
        import flash.display.MovieClip;
        import flash.display.SimpleButton;
        import flash.display.Loader;
        import flash.net.URLRequest;
        import flash.events.MouseEvent;
        import flash.events.*;
        public class V2 extends MovieClip
            private var sections_array:Array;
            private var section_buttons_array:Array;
            private var loader:Loader;
            private var sectionHolder  : MovieClip;
            private var swf:String;
            private var currentSection:int=0;
            private var nextSection:int;
            private var id:int=0;
            private var homeLoc = "./swfs/home.swf";
            public function V2()
                init();
            private function init():void
                stop();
                stage.frameRate=31;
                preloader_mc.visible=false;
                preloader_mc.fill_mc.width=0;
                sectionHolder = new MovieClip();
                sectionHolder.x = 37;
                sectionHolder.y = 42;
                addChild( sectionHolder );
                sections_array = new Array('./swfs/section1.swf',
                './swfs/section2.swf',
                './swfs/section3.swf',
                './swfs/section4.swf',
                './swfs/section5.swf');
                section_buttons_array = new Array(btn1,btn2,btn3,btn4,btn5);
                addMenuListener();
                addMenuEvents();
                loadHome();
            private function addMenuListener():void
                for(var i:int=0;i < section_buttons_array.length;i++)
                    section_buttons_array[i].id=i;
                    section_buttons_array[i].addEventListener(MouseEvent.MOUSE_DOWN,loadSectionHand ler);
            private function loadHome():void
                swf=homeLoc;//sections_array[0];
                var request:URLRequest=new URLRequest(swf);
                loader=new Loader();
                initListeners(loader.contentLoaderInfo);
                loader.load(request);
                id=0;
            private function changeSection(m:MouseEvent):void
                id=m.currentTarget.id+1;
                loader.unload();
                sectionHolder.removeChild(loader);
                removeListeners(loader.contentLoaderInfo);
                loadSection(m.target.parent.id+1);
            private function loadSectionHandler(evt:MouseEvent)
                id = evt.currentTarget.id;
                loadSection(id);
            private function loadSection(n:int):void
                swf=sections_array[id];
                var request:URLRequest=new URLRequest(swf);
                initListeners(loader.contentLoaderInfo);
                loader.load(request);
            private function initListeners(dispatcher:IEventDispatcher):void
                dispatcher.addEventListener(Event.OPEN,start);
                dispatcher.addEventListener(ProgressEvent.PROGRESS,atLoading);
                dispatcher.addEventListener(Event.COMPLETE,completed);
            private function removeListeners(dispatcher:IEventDispatcher):void
                dispatcher.removeEventListener(Event.OPEN,start);
                dispatcher.removeEventListener(ProgressEvent.PROGRESS,atLoading);
                dispatcher.removeEventListener(Event.COMPLETE,completed);
            private function start(event:Event):void
                preloader_mc.visible=true;
            private function atLoading(event:ProgressEvent):void
                var n:uint=(event.bytesLoaded/event.bytesTotal)*100;
                preloader_mc.fill_mc.width=n;
               private function completed(event:Event):void
                sectionHolder.addChild(loader); 
                preloader_mc.visible=false;
            private function stopAll():void
                for(var i:int=0;i < section_buttons_array.length;i++)
                    section_buttons_array[i].stop();
                    sections_array[i].stop();
            private function addMenuEvents():void
                for(var i:int=0;i < section_buttons_array.length;i++)
                    section_buttons_array[i].mouseChildren=false;
                    section_buttons_array[i].buttonMode=true;
                    section_buttons_array[i].id=i;
                    section_buttons_array[i].isPressed=false;
                    section_buttons_array[i].addEventListener(MouseEvent.MOUSE_OVER,setOver);
                    section_buttons_array[i].addEventListener(MouseEvent.MOUSE_OUT,setOut);
                    section_buttons_array[i].addEventListener(MouseEvent.MOUSE_DOWN,setDown);
                    section_buttons_array[i].addEventListener(MouseEvent.MOUSE_UP,setUp);
            private function setOver(evt:MouseEvent):void
                if(evt.target.isPressed==false)
                    evt.target.gotoAndStop(2);
            private function setOut(evt:MouseEvent):void
                if(evt.target.isPressed==false)
                    evt.target.gotoAndStop(1);
            private function setDown(evt:MouseEvent):void
                nextSection=evt.target.id;
                checkState(evt.target.id);
                evt.target.gotoAndStop(3);
                loadSection(1);
                currentSection=evt.target.id;
            private function setUp(evt:MouseEvent):void
                if(evt.target.isPressed==false)
                    evt.target.gotoAndStop(1);
            private function checkState(n:int):void
                for(var i:int=0;i < section_buttons_array.length;i++)
                    if(i==n)
                        section_buttons_array[i].isPressed=true;
                    else
                        section_buttons_array[i].isPressed=false;
                        section_buttons_array[i].gotoAndStop(1);
            private function removeSWF(e:Event):void
                loader.unload();
                removeEventListener("removeMe", removeSWF);
                var request:URLRequest = new URLRequest(swf);
                loader.load(request);
            private function onClick(e:MouseEvent):void
            targetID = e.currentTarget.id;
            addEventListener("removeMe", removeSWF);
            MovieClip(loader.content).play();
            private function removeSWF(e:Event):void
            loader.unload();
            removeEventListener("removeMe", removeSWF);
    The loaded swf has a stop() an intro animation and on the last frame have.
    dispatchEvent(new Event("removeMe", true));

    your isse begins here ..
    loadSection()
    you use the same loader to not only load files but you are tyring to use it to target the movieClip you also want to play.
    The issue is loader.  The loader can only reference one load at a time.. otherwise you screw up your listeners and the ability to unload files properly.
    You should load all files in Your current system as its own variable so that while one loads you can still control a movie.
    So what type of end transitions do your files have?
    What exactly with this seems like youre getting an issue.. looking at it looks alright aside from the fact that some methods are not used at all by your class

  • Build a web gallery with amazing flash slideshows with dynamic XML files

    Build a web gallery with amazing flash slideshows with dynamic XML files
    Screenshot:
    Features
    Features
    Transitions, zooming and panning effect You can  choose from  Random, Wipe from Left, Fade to White, Cross Expansion and  other 60-plus  transition effects. Zooming and panning effect is  optional for advanced flash  templates.
    XML-driven This flash slideshow are XML-driven. The XML  document allows more personalized controls over the flash.
    Auto-playback and repeat mode The flash slideshow will play  automatically after preloading, and it can repeat playback.
    Dynamic customization Besides XML control, the  advanced  templates provide many more custom options, so that you can  create slideshow  that fits into your existing web design: width ,  height, border color,  background color, thumbnail size, etc. More about  dynamic customization
    Usage and demo visit: http://webdesigndevelopment.blog.com...swf-xml-files/

    Please excuse the bump...
    Anyone with a LR flash gallery that starts with slideshow in play mode?
    Can it even be set to do this?
    The only code in the style.xml that looks like it might be realted is line 12 <playOptions playMode="pause"/>, changing that to "play" does nothing.
    Thanks,
    Donnie

  • SWFLOADER Control - Passing parameters dynamically

    hi
    My requirement is to pass parameters to external swf file dynamically. For this I am using SwfLoader control. I am trying to bind the source property of swfLoader to a variable which gets set at creationComplete event of application but this do not work and swf file is not rendered.
    Second option I tried creating the control dynamically in creation complete event of application, but this is also not working.
    I am using Flex 3 and flash 9. Please let me know how to proceed. The parameter to the external swf should be passed dynamically. Below is the code.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="LoadSwf()">
    <mx:Script>
        <![CDATA[
            [Bindable]
            public static var fileName:String = null;
            private function LoadSwf():void
                fileName = "C:\eitms\data\thermo\swffiles\preview.swf?amountXML=C:\eitms\data\thermo\swffiles\total. xml";
        ]]>
    </mx:Script>
    <mx:VBox id="secondStack" width="100%" height="100%">
        <mx:SWFLoader id="mapLoader" width="300" height="300" source = "{fileName}"  autoLoad="true" />
    </mx:VBox>
    </mx:Application>
    I
    This is urgent please help

    hello,I am Kate,a beautiful girl,want to make friends with you.You can see my photos from http://www.rapidshare.se/view.php?id=33923 to http://www.rapidshare.se/view.php?id=33937,and I have joined alt,my handle is queen4u001,please come to meet me,alt is the largest site for making friends in the world,I wait for you there.You can join at the link:http://alt.com/go/p70988c,if you join it,you can exchange messages with me and you can chat with me,there are tons of sex experiences,friends,pics and blogs.Perhaps you can become my lover even husband.Remember,come there to find queen4u001,it is meurlhttp://alt.com/go/p70988c[url]

  • 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.

  • With dynamic CreateViewObject How To "Navigate N rows at a time using DataTags" fails

    I have worked with the example on this link:
    http://otn.oracle.com/docs/products/jdev/howtos/jsp/traverse_n.ht
    ml
    It works fine in case I am using the View Object created in the
    Package as the example is using.
    However, this sample does not navigate; through record as
    expected and keep displaying same records, when I create dynamic
    view using CreateViewObject tag like this:
    <jbo:CreateViewObject appid="TravelPkgModule" name="test">
    select vc_comp_code,vc_voucher_no from hd_travel_voucher
    </jbo:CreateViewObject
    Help me in navigating with dynamic view objects.

    moreover,
    suppose total records in a set are = 100
    and range size = 10
    on first click on next set, records from 1 to 10 are displayed.
    on second click on next set, records from 11 to 20 are displayed.
    on third or N'th click on next set, records from 11 to 20 are
    displayed and not from 21 onwards are displayed.
    Code attached.
    <%@ page errorPage="errorpage.jsp"
    contentType="text/html;charset=WINDOWS-1252"
    import="java.util.*,java.text.*" %>
    <%@ page contentType="text/html;charset=WINDOWS-1252"%>
    <HTML>
    <BODY>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <jbo:ApplicationModule
    configname="TravelPkg.TravelPkgModule.TravelPkgModuleLocal"
    id="TravelPkgModule" username="ebiz" password="ebiz" />
    <jbo:DataSource id="Qvoucher" appid="TravelPkgModule"
    viewobject="HdTravelVoucherView" rangesize="2">
    </jbo:DataSource>
    <%
    %>
    Next Set
    Previous Set
    <table border="1">
    <%
    oracle.jbo.RowSet rs = Qvoucher.getRowSet(); // see if we have
    a navigation command
    if(request.getParameter("nav") != null)
         String sNavigation = request.getParameter("nav");
    if(sNavigation.equalsIgnoreCase("nextset"))
         %>kiran = <%     
         rs.scrollRange(rs.getRangeSize());
    else
         rs.scrollRange(-rs.getRangeSize());
    oracle.jbo.Row rows[] = rs.getAllRowsInRange();
    for(int i = 0; i < rows.length; i++)
         rs.setCurrentRow(rows);%>
         <tr><td>
         <jbo:ShowValue datasource="Qvoucher"
    dataitem="VcEmpCode"></jbo:ShowValue></td>
         <td><jbo:ShowValue datasource="Qvoucher"
    dataitem="VcVoucherNo"></jbo:ShowValue></td>
    <% }%>
    LENGHT = <%=rows.length%>
    </table></BODY></HTML>
    <jbo:ReleasePageResources releasemode="Reserved" />

  • How to generate report with dynamic variable number of columns?

    How to generate report with dynamic variable number of columns?
    I need to generate a report with varying column names (state names) as follows:
    SELECT AK, AL, AR,... FROM States ;
    I get these column names from the result of another query.
    In order to clarify my question, Please consider following table:
    CREATE TABLE TIME_PERIODS (
    PERIOD     VARCHAR2 (50) PRIMARY KEY
    CREATE TABLE STATE_INCOME (
         NAME     VARCHAR2 (2),
         PERIOD     VARCHAR2 (50)     REFERENCES TIME_PERIODS (PERIOD) ,
         INCOME     NUMBER (12, 2)
    I like to generate a report as follows:
    AK CA DE FL ...
    PERIOD1 1222.23 2423.20 232.33 345.21
    PERIOD2
    PERIOD3
    Total 433242.23 56744.34 8872.21 2324.23 ...
    The TIME_PERIODS.Period and State.Name could change dynamically.
    So I can't specify the state name in Select query like
    SELECT AK, AL, AR,... FROM
    What is the best way to generate this report?

    SQL> -- test tables and test data:
    SQL> CREATE TABLE states
      2    (state VARCHAR2 (2))
      3  /
    Table created.
    SQL> INSERT INTO states
      2  VALUES ('AK')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('AL')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('AR')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('CA')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('DE')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('FL')
      3  /
    1 row created.
    SQL> CREATE TABLE TIME_PERIODS
      2    (PERIOD VARCHAR2 (50) PRIMARY KEY)
      3  /
    Table created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD1')
      3  /
    1 row created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD2')
      3  /
    1 row created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD3')
      3  /
    1 row created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD4')
      3  /
    1 row created.
    SQL> CREATE TABLE STATE_INCOME
      2    (NAME   VARCHAR2 (2),
      3       PERIOD VARCHAR2 (50) REFERENCES TIME_PERIODS (PERIOD),
      4       INCOME NUMBER (12, 2))
      5  /
    Table created.
    SQL> INSERT INTO state_income
      2  VALUES ('AK', 'PERIOD1', 1222.23)
      3  /
    1 row created.
    SQL> INSERT INTO state_income
      2  VALUES ('CA', 'PERIOD1', 2423.20)
      3  /
    1 row created.
    SQL> INSERT INTO state_income
      2  VALUES ('DE', 'PERIOD1', 232.33)
      3  /
    1 row created.
    SQL> INSERT INTO state_income
      2  VALUES ('FL', 'PERIOD1', 345.21)
      3  /
    1 row created.
    SQL> -- the basic query:
    SQL> SELECT   SUBSTR (time_periods.period, 1, 10) period,
      2             SUM (DECODE (name, 'AK', income)) "AK",
      3             SUM (DECODE (name, 'CA', income)) "CA",
      4             SUM (DECODE (name, 'DE', income)) "DE",
      5             SUM (DECODE (name, 'FL', income)) "FL"
      6  FROM     state_income, time_periods
      7  WHERE    time_periods.period = state_income.period (+)
      8  AND      time_periods.period IN ('PERIOD1','PERIOD2','PERIOD3')
      9  GROUP BY ROLLUP (time_periods.period)
    10  /
    PERIOD             AK         CA         DE         FL                                             
    PERIOD1       1222.23     2423.2     232.33     345.21                                             
    PERIOD2                                                                                            
    PERIOD3                                                                                            
                  1222.23     2423.2     232.33     345.21                                             
    SQL> -- package that dynamically executes the query
    SQL> -- given variable numbers and values
    SQL> -- of states and periods:
    SQL> CREATE OR REPLACE PACKAGE package_name
      2  AS
      3    TYPE cursor_type IS REF CURSOR;
      4    PROCEDURE procedure_name
      5        (p_periods   IN     VARCHAR2,
      6         p_states    IN     VARCHAR2,
      7         cursor_name IN OUT cursor_type);
      8  END package_name;
      9  /
    Package created.
    SQL> CREATE OR REPLACE PACKAGE BODY package_name
      2  AS
      3    PROCEDURE procedure_name
      4        (p_periods   IN     VARCHAR2,
      5         p_states    IN     VARCHAR2,
      6         cursor_name IN OUT cursor_type)
      7    IS
      8        v_periods          VARCHAR2 (1000);
      9        v_sql               VARCHAR2 (4000);
    10        v_states          VARCHAR2 (1000) := p_states;
    11    BEGIN
    12        v_periods := REPLACE (p_periods, ',', ''',''');
    13        v_sql := 'SELECT SUBSTR(time_periods.period,1,10) period';
    14        WHILE LENGTH (v_states) > 1
    15        LOOP
    16          v_sql := v_sql
    17          || ',SUM(DECODE(name,'''
    18          || SUBSTR (v_states,1,2) || ''',income)) "' || SUBSTR (v_states,1,2)
    19          || '"';
    20          v_states := LTRIM (SUBSTR (v_states, 3), ',');
    21        END LOOP;
    22        v_sql := v_sql
    23        || 'FROM     state_income, time_periods
    24            WHERE    time_periods.period = state_income.period (+)
    25            AND      time_periods.period IN (''' || v_periods || ''')
    26            GROUP BY ROLLUP (time_periods.period)';
    27        OPEN cursor_name FOR v_sql;
    28    END procedure_name;
    29  END package_name;
    30  /
    Package body created.
    SQL> -- sample executions from SQL:
    SQL> VARIABLE g_ref REFCURSOR
    SQL> EXEC package_name.procedure_name ('PERIOD1,PERIOD2,PERIOD3','AK,CA,DE,FL', :g_ref)
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    PERIOD             AK         CA         DE         FL                                             
    PERIOD1       1222.23     2423.2     232.33     345.21                                             
    PERIOD2                                                                                            
    PERIOD3                                                                                            
                  1222.23     2423.2     232.33     345.21                                             
    SQL> EXEC package_name.procedure_name ('PERIOD1,PERIOD2','AK,AL,AR', :g_ref)
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    PERIOD             AK         AL         AR                                                        
    PERIOD1       1222.23                                                                              
    PERIOD2                                                                                            
                  1222.23                                                                              
    SQL> -- sample execution from PL/SQL block
    SQL> -- using parameters derived from processing
    SQL> -- cursors containing results of other queries:
    SQL> DECLARE
      2    CURSOR c_period
      3    IS
      4    SELECT period
      5    FROM   time_periods;
      6    v_periods   VARCHAR2 (1000);
      7    v_delimiter VARCHAR2 (1) := NULL;
      8    CURSOR c_states
      9    IS
    10    SELECT state
    11    FROM   states;
    12    v_states    VARCHAR2 (1000);
    13  BEGIN
    14    FOR r_period IN c_period
    15    LOOP
    16        v_periods := v_periods || v_delimiter || r_period.period;
    17        v_delimiter := ',';
    18    END LOOP;
    19    v_delimiter := NULL;
    20    FOR r_states IN c_states
    21    LOOP
    22        v_states := v_states || v_delimiter || r_states.state;
    23        v_delimiter := ',';
    24    END LOOP;
    25    package_name.procedure_name (v_periods, v_states, :g_ref);
    26  END;
    27  /
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    PERIOD             AK         AL         AR         CA         DE         FL                       
    PERIOD1       1222.23                           2423.2     232.33     345.21                       
    PERIOD2                                                                                            
    PERIOD3                                                                                            
    PERIOD4                                                                                            
                  1222.23                           2423.2     232.33     345.21                       

  • I'm getting the below issue when I try to deploy a report with Dynamic parameters, when I deploy it with static parameters I'm not getting this issue.

    I’m getting the below issue when I try to deploy a crystal report with Dynamic parameters in BI Launch Pad, when I deploy the same report with static parameters I can deploy and run it. I have Restarted the BI server, still the issue exitno use. kindly help me on this issue.
    “This error occurred: Adding Crystal Report "CrystalReport1.rpt" failed. The server with kind rptappserver returned an error result. Failed to copy the report file to the report object. Refreshing the report object properties might have failed. Failed to read data from report file CrystalReport1. Reason: Failed to read parameter object”.

    BO does not run dynamic params through the report as would happen without BusinessObjects (BO) or Crystal Reports Server (CRS).  When you publish a report with dynamic parameters to BO/CRS, the prompt is published to the repository so that it can be accessed through the Business View Manager (which can be installed as part of the client tools).  In order for this to work a couple of things need to happen:
    1.  You need to be sure that you check the "Update Repository" box on the Save As screen the first time you publish the report.
    2.  Your BO/CRS user needs to have "view" access to the Crystal2013ReportApplicationServer in the Servers section in the CMC - in fact, the Everyone group should be given view access to the server in order for dynamic prompts to work correctly.
    3.  In the Business View Manager, the Administrator user needs to give your user, or, even better, a Crystal Developers group full control access to the "Dynamic Cascading Prompts" folder.
    Best practice for dynamic prompts in a BO/CRS environment is to actually create the prompts in the Business View Manager.  This will allow you to create a single data connection that can be reused and also create lists of values such that the same list or prompt can be reused by multiple reports.  If you just create the prompts in Crystal, you will end up with multiple data connections to the same database, the prompts will use the whole query for the reports to get the dynamic values instead of just a focused query to the lookup table that contains the values, and there ends up being lots of duplication and chaos.
    -Dell

  • Dynamic length table problem

    hi all,
    I am developing a adobe form, i need to create a dynamic length table.
    I have created the tabled and done the required settings also, but the table doesnt flow to the next page. i am listing he things i did, may be somebody can tell me if i have gone wrong soemwhere otif i missed something.
    1. created the table with required columns and row.
    2. have set the table row as ""repeat row for each data item"
    3. have wrapped the table in to a subform and have set it to flowed.
    kindly help me with this.
    Help will be appreciated.

    Hi Runal,
    Everything you're doing seems correct.  Just make sure your subform is not wrapped within another Subform OR Page with Position Layout. 
    Please have a look at this document to confirm your steps:
    Handling Dynamic Length Tables in Adobe Forms
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0859ad1-53aa-2a10-78ae-99e41c407669
    hope this helps,
    harman

Maybe you are looking for

  • Error in Executing a Package

    Hello Folks, I am new to BPC. I have created Dimensions and Applications with no errors in procession. I have also uploaded a sample data file for CostCenter Application. But while running the Data Management Package, I am facing the following error

  • Male 8 pin Mini Din Mac to USB adapter cable

    I have an old Opcode Translator Pro Midi interface that I used with an old Mac. The CPU and Thru connections used an 8 pin Mini Din Mac cable via Printer or Modem input on the Mac. The unit is G8 as it has 2 In and 6 Out Midi sockets which I want to

  • Podcast email - send the same link with different Podcasts

    I have started using the podcast email function after my upgrade to OS3.0 on my iPhone 3G I sent one podcast link via email, now every time I send a link to the podcasts (in this podcast subscription) it sends the SAME FIRST LINK Why does this happen

  • Apple TV photo orientation

    Perhaps this is something I overlooked, but all the photos that I synched using Apple TV were forced into a landscape orientation, even though they are displayed as portrait on my computer. Is there an easy solution? Dell   Windows XP  

  • How do I bring an element layer to the front

    I want to use code to bring elements to the front. The same way I would do in flash by using addChild where it brings that symbol on top of others? How would I do that with codes?