Pass variable to subreport

I'm using SQL Server 2014 and Reporting Services and I've got a report containing a number of linked subreports. The main report I have will be different for each customer I produce the report for and will contain different text, but I need to pass a customerID
to the subreport in order to filter the following query:
SELECT V.vCenterName,
COUNT(DISTINCT M.VMName) *1.0/COUNT(DISTINCT M.Hostname) AS VMsPerHost
FROM
dbo.VMs M INNER JOIN dbo.vcenters V ON M.vCenterID = V.vCenterID
WHERE M.vCenterID LIKE V.vCenterID
GROUP BY V.vCenterName
ORDER BY VMsPerHost DESC
If I can declare a VARCHAR variable before the query and then pass the customerID from the main report to the subreport, I can filter the data by the specific customer only and do this for each main report. How would this be done though. I know there's an
option to work with parameters but I don't understand how it works.
Thanks in advance
Adam

Hi Adam,
create customerid parameter in sub-report.
In main report use subreport control and provide the subreport.
in subreport properties go to parameter section.set parameter value from your main report parameter which will give the customer id.
If you want to pass the value by dataset you can give the dataset field value.
Thanks
Prasad

Similar Messages

  • Passing variable values to the navigation block

    Hi WAD Experts,
      I have a requirement regarding passing variable values to the navigation block. User requirement is first give the selections on the selection screen and then after executign output should display in browser. In the output page we have a navigation block. So when user gives selections those selections should also populate in the navigation block. Your help will be appreciated.
    Prasad.

    Hi,
    if your variable is 'Changeable at Query Navigation' the chosen values will appear in the Navigationblock.
    Variables which are 'Not Changeable at Query Navigation'
    will not appear.
    You can set this Property when you create a Variable.
    Kind Regards,
    Alican Polat

  • How can I pass variables from one project to another using Javascript?

    Hi all, I am trying to do this: let learners take one course and finish a quiz. Then based on their quiz scores, they will be sent to other differenct courses.
    However, I wish keep track on their previous quiz scores as well as many other variables.
    I found this nice widge of upload/download variables by CPguru (http://www.cpguru.com/2011/05/18/save-and-load-data-widget-for-adobe-captivate-4-and-adobe -captivate-5/). However, this widget works by storing variables from one project in local computer and then upload it to another project.
    My targeted learners may not always use the same computer though, so using this widget seems not work.
    All these courses resided in a local-made LMS which I don't have access to their code. Therefore, passing variables to PHP html files seems not work.
    Based on my limited programing knowledge, I assume that using Javascript to pass variables may be the only possible way.
    Can someone instruct me how to do this?
    Thank you very much.

    If you create two MIDlet in a midlet suite, it will display as you mentioned means you can't change the display style.

  • Error when executing query without passing variable selection

    Hi Gurus
    I am getting an error while executing a query with out passing values for variables
    When executing the query by passing the filter values report returns the data
    When executing the query with out passing variable selections the error message is
    Unknown error in SQL interface
    Error reading the data of Info Provider ZCRM_O08
    Error while reading data; navigation possible
    System error in program SSAPLRS_EXCEPTION and form
    RS_EXCEPTION_TO_MESSAGE
    No Data Available
    can any one please help me in resolving this
    Thank you

    Hi Srini
    Thanks for your quick response
    When i am executing the query with selection it is returning the data
    giving error when executing with out passing the selection
    is there any other cause for this problem
    like any particular info object causes this sort of problem
    Thank you

  • Passing variable having value as whole SOAP request to command while invoking ODI WS call

    When passing variable in place of soap request message (variable value is whole SOAP request message prepared using procedure) in ODI Invoke WebService command like -->
    OdiInvokeWebService "-URL=url...." "-PORT_TYPE=..." "-OPERATION=..." "-RESPONSE_MODE=NEW_FILE" "-RESPONSE_FILE_CHARSET=UTF8" "-RESPONSE_XML_ENCODING=UTF-8" "-RESPONSE_FILE=..." "-RESPONSE_FILE_FORMAT=SOAP" "-HTTP_USER=..." "-HTTP_PASS=..."
    #SOAPREQUESTMESSAGE
    Gives error :
    ODI-1226: Step OdiInvokeWebService 1 fails after 1 attempt(s).
    ODI-1241: Oracle Data Integrator tool execution fails.
    Caused By: com.sunopsis.wsinvocation.SnpsWSInvocationException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '#' (code 35) in prolog; expected '<'
    at [row,col {unknown-source}]: [1,1]
        at com.sunopsis.wsinvocation.client.impl.AbstractMessageImpl.loadFromXML(AbstractMessageImpl.java:333)
        at com.sunopsis.wsinvocation.client.impl.AbstractMessageImpl.loadFromString(AbstractMessageImpl.java:348)
        at com.sunopsis.wsinvocation.client.impl.AbstractMessageImpl.fromString(AbstractMessageImpl.java:403)
        at com.sunopsis.wsinvocation.client.impl.AbstractJWSDLParserImpl.fromXML(AbstractJWSDLParserImpl.java:272)
        at com.sunopsis.wsinvocation.client.impl.AbstractJWSDLParserImpl.getWebServiceRequestByOperation(AbstractJWSDLParserImpl.java:260)
        at com.sunopsis.dwg.tools.common.WebserviceUtils.getSOAPMessage(WebserviceUtils.java:94)
        at com.sunopsis.dwg.tools.common.WebserviceUtils.invoke(WebserviceUtils.java:138)
        at com.sunopsis.dwg.tools.InvokeWebService.actionExecute(InvokeWebService.java:327)
        at com.sunopsis.dwg.function.SnpsFunctionBase.execute(SnpsFunctionBase.java:276)
        at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execIntegratedFunction(SnpSessTaskSql.java:3437)
        at com.sunopsis.dwg.dbobj.SnpSessTaskSql.executeOdiCommand(SnpSessTaskSql.java:1509)
        at oracle.odi.runtime.agent.execution.cmd.OdiCommandExecutor.execute(OdiCommandExecutor.java:44)
        at oracle.odi.runtime.agent.execution.cmd.OdiCommandExecutor.execute(OdiCommandExecutor.java:1)
        at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
        at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
        at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
        at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
        at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
        at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
        at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
        at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
        at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
        at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
        at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
        at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
        at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
        at java.lang.Thread.run(Thread.java:662)
    Thanks in anticipation...

    the used variable 'SOAPREQUESTMESSAGE' is being created in a procedure using jython.
    1. Can we use this variable (SOAPREQUESTMESSAGE) value in the next step that is while invoking web service request (can it persist) ?
    2. If not then how can we use this variable value to invoke ws request in next step ?
    Would like to appreciate help.
    Pls reply.

  • OBIEE 11g How to pass variable from one prompt to another prompt in dashboard page.

      How to pass variable from one prompt to another prompt in dashboard page.
    I have two prompt in dashboard page as below.
    Reporttype
    prompt: values(Accounting, Operational) Note: values stored as
    presentation variable and they are not coming from table.
    Date prompt values (Account_date, Operation_date)
    Note:values are coming from dim_date table.  
    Now the task is When user select First
    Prompt value  “Accounting” Then in the
    second prompt should display only Accounting_dates , if user select “operational”
    and it should display only operation_dates in second prompt.
    In order to solve this issue I made the
    first prompt “Reporttype” values(Accounting, Operational) as presentation
    values (custom specific values) and default presentation value is accounting.
    In second prompt Date are coming from
    dim_date table and I selected Sql results as shown below.
    SELECT case when '@{Reporttype}'='Accounting'
    then "Dates (Receipts)"."Acct Year"
    else "Dates (Receipts)"."Ops
    Year"  End  FROM "Receipts"
    Issue: Presentation variable value is not
    changing in sql when user select “operation” and second prompt always shows
    acct year in second prompt.
    For testing pupose I kept this presentation
    variable in text object of dashboard and values are changing there, but not in
    second prompt sql.
    Please suggest the solution.

    You will want to use the MoveClipLoader class (using its loadClip() and addListener() methods) rather than loadMovie so that you can wait for the file to load before you try to access anything in it.  You can create an empty movieclip to load the swf into, and in that way the loaded file can be targeted using the empty movieclip instance name.

  • Error produced when trying to pass variables to a Matlab script

    For some reason, LabVIEW produces an Error 1047 (Unable to pass variable to the script server) whenever I create an input variable to a Matlab code block.
    Outputs work fine (for example, connecting an output "a" to a Matlab code block that says "a=rand(50)" correctly produces a 50x50 array of random numbers that can be displayed in LabVIEW). However, creating any kind of input node, whether or not the associated variable is mentioned in the MATLAB script, brings up an error 1047.
    Any ideas what could be causing this? I'm using LabVIEW 7.0 and MATLAB 7 (R14). I've read the article
    >here and that's not the problem, and I've also updated my matscript.dll to the latest version, 7.0.0.2, which also made no difference.

    For what its worth,
    I work in a company with a lot of Matlab users, and I,m programming in Labview and Matlab.
    When I create a testrig measurement I always have to convert data into Malab format, so I used the script server a lot... exept we have a limited pool of Matlab
    licenses so my work was halted whenever the licences where gone.
    So I wrote a Write2Matlab vi.
    This vi can log data from a measurement and write it in a Matlab readable file format (Matlab6 R12).
    After logging you can append more data. It works with(Double,Single,Int32,Int16,U16,U8,String) matrix see for yourself in an example (Write2matlab_test.vi).
    Perhaps this is an alternative solution for your problem.
    Please send me a reply if you find it usefull.
    John
    Attachments:
    Write2Matlab.llb ‏1145 KB

  • How to pass variable form javacript to java BackingBean

    Hello,
    I am trying to pass variable from Javascript method (which is written in jspx) page to a Java BakingBean.
    here is the Javascript code:
    <SCRIPT type="text/javascript">
    function OnSave() {
    alert("The signature you have taken is the following data: " + SigPlus1.SigString);
    </SCRIPT>
    of course, this method will be called after the use press save button as follow:
    <INPUT id="submit1" name="Save" type="submit" value="Save" onclick="OnSave()"/>
    As you can see this Javascript will alert the result to the user. Instead I want to pass the object ( SigPlus1) to a Java Bean.
    I am using ADF technology with JDveloper 11.1.2.3

    here is the answer:
    ADF RichClient API - af:serverListener

  • Passing variables to loaded external movie

    Ok, this problem has beaten me for the last 2 days. It seems
    to be extremely simple, I am on main movie and I am using
    MovieClipLoader class to load external movie callMe.swf into movie
    holder called holder_MC, then from main using onLoadInit or
    onLoadProgress listeners I can target dynamic text inside
    callMe.swf as holder_MC.myTXT.text = "blablabla" or I can change
    frames in callMe.swf by holder_MC.gotoAndStop(5). But HOW TO PASS
    VARIABLE myVar to callMe.swf so it executes something there? Using
    holder_MC.myVar DOESN'T WORK!!!!!!!!!!!!!!
    Thanks for any help,
    Zbynek

    UPDATE... I copied the link to another page with my variables in the image attributes as I posted above. And it works using the values that are cached for those items. Is there any way to do this on the same page as my original link without my users having to change to a different page?

  • How to pass variables between loaders

    Hi,
    I am trying to load an image, with descriptive text and a back button on the click of a thumbnail of the image. I am using a MovieClipLoader instance to do this.
    Here are my problems:
    1. I tried loading the image, with the text(which is within an external swf), using the same loader, but since I am placing them dynamically, depending on the dimensions of the image, I need to pass variables between the two. The image loader is taking longer than the text (obviously) but I need the dimensions of the image before I can place the text. How do I do that??
    2. I tried using two loaders, with separate listeners, and the problem once again is that the text loads before the image, and is hence placed with default values instead of the values derived from the image. The code is within onLoadInit(). Is it possible for me to get the dimensions of the image from onLoadStart()???
    3. There is a back button within the text.swf. I want the image and the text.swf to be unloaded when this button is clicked. How can I achieve that? Can I call loader.unloadClip(target), from within this? Will it recognize the variable?
    4. Is there a much easier way to do this, which I am sadly unaware of?
    Any help will be appreciated.

    Tried the onloadstart() function, but it gives target._width and _height as 0. So that is ruled out...any other suggestions?

  • How to pass variables to Skin applied with skinClass?

    Hi all,
    I'm experimenting with new skin for a SkinnableContainer, and I would like to pass variables to that skin to dynamically change some elements.
    This is how I would like it to work, but it doesn't. Is there a way to make it work? (Or something similar... like defining new stylesheet-elements in the skin.)
    <s:SkinnableContainer skinClass="skins.SkinnableContainerBackground" gradient1="0xFFF000" gradient2="0x000FFF>
    <s:RichText id="rt1" width="400" height="200"  />
    </s:SkinnableContainer>
    Skin:
    <s:Skin xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:d="http://ns.adobe.com/fxg/2008/dt"
            xmlns:ai="http://ns.adobe.com/ai/2008"
            height="100%"
            width="590">
        <s:layout>
            <s:BasicLayout/>
        </s:layout>
        <s:states>
            <s:State name="normal"/>
            <s:State name="disabled"/>
        </s:states>
        <fx:Metadata>[HostComponent("spark.components.SkinnableContainer")]</fx:Metadata>
        <fx:Script>
            <![CDATA[
                [Bindable] public var gradient1:uint;
                [Bindable] public var gradient2:uint;
            ]]>
        </fx:Script>
        <s:Group top="0"
                 bottom="0"
                 left="-11"
                 right="0">
            <s:Group x="15"
                     top="0"
                     bottom="0"
                     id="kaft">
                <!--            <s:filters>
                     <s:DropShadowFilter alpha="0.4"
                     blurX="6"
                     blurY="6"
                     distance="4.24264"
                     quality="3" />
                     </s:filters>
                -->
                <s:Rect width="586"
                        ai:knockout="0"
                        d:userLabel="kaft"
                        top="0"
                        bottom="0">
                    <s:fill>
                        <s:LinearGradient y="82.3125"
                                          scaleX="585.975"
                                          rotation="-0">
                            <s:GradientEntry color="{gradient1}"
                                             ratio="0.466667"/>
                            <s:GradientEntry color="{gradient2}"
                                             ratio="1"/>
                        </s:LinearGradient>
                    </s:fill>
                </s:Rect>
            </s:Group>
        </s:Group>
        <s:Group id="contentGroup"
                 left="20"
                 right="20"
                 top="10"
                 bottom="20">
            <s:layout>
                <s:BasicLayout/>
            </s:layout>
        </s:Group>
    </s:Skin>

    ou can also define custom CSS styles:
    MySkinnableContainer.as
        [Style(name="gradientA", type="uint", format="Color", inherit="no")]
        [Style(name="gradientB", type="uint", format="Color", inherit="no")]
        public class MySkinnableContainer extends SkinnableContainer
            public function MySkinnableContainer()
                super();
    MySkinnableContainerSkin.mxml
    <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/halo"
                 xmlns:s="library://ns.adobe.com/flex/spark">
        <fx:Metadata>
            <![CDATA[
            [HostComponent("MySkinnableContainer")]
            ]]>
        </fx:Metadata>
        <s:states>
            <s:State name="normal" />
            <s:State name="disabled" />
        </s:states>
        <s:Group bottom="0" left="-11" right="0" top="0">
            <s:Group id="kaft" x="15" bottom="0" top="0">
                <s:Rect width="586" bottom="0" top="0">
                    <s:fill>
                        <s:LinearGradient y="82.3125" scaleX="585.975" rotation="-0">
                            <s:GradientEntry color="{getStyle('gradientA')}" ratio="0.466667" />
                            <s:GradientEntry color="{getStyle('gradientB')}" ratio="1" />
                        </s:LinearGradient>
                    </s:fill>
                </s:Rect>
            </s:Group>
        </s:Group>
        <s:Group id="contentGroup" bottom="20" left="20" right="20" top="10" />
    </s:SparkSkin>
    styles.css
    @namespace local "*";
    local|MySkinnableContainer {
        gradientA: #FF0000;
        gradientB: #000FFF;
        skinClass: ClassReference("MySkinnableContainerSkin");   
    main app:
        <fx:Style source="styles.css" />
        <local:MySkinnableContainer width="590" height="100%">
            <s:RichText id="rt1" width="400" height="200" color="#000000" text="test" />
        </local:MySkinnableContainer>

  • How can I pass variable to eventdriven startElement() function?

    I am new to java and SAX. Could anybody tell me how to pass variable to eventdriven startElement function? I tried the following code but didn't work.
    public class ReadXmlSax extends DefaultHandler
    String elementName;
    String requestName;
    Vector v = new Vector();
    public Enumeration getAttribute(String sFileName, String sTagName, String sAttrName)
         Enumeration e;
         elementName=sTagName;
    requestName=sAttrName;
    File f = new File(sFileName);
    // Use an instance of ourselves as the SAX event handler
    DefaultHandler handler = new ReadXmlSax();
    // Use the default (non-validating) parser
    SAXParserFactory factory = SAXParserFactory.newInstance();
    try {
    // Parse the input
    SAXParser saxParser = factory.newSAXParser();
    saxParser.parse(f, handler);
    } catch (Throwable t) {
    t.printStackTrace();
    e = v.elements();
    return(e);
    //===========================================================
    // SAX DocumentHandler methods
    //===========================================================
    public void startDocument()
    throws SAXException
    public void endDocument()
    throws SAXException
    public void startElement(String namespaceURI,
    String sName, // simple name
    String qName, // qualified name
    Attributes attrs)
    throws SAXException
              //System.out.println(elementName);
              if (qName.equals(elementName))
                   String serverName = attrs.getValue("",requestName);
                   v.addElement(serverName);
    }

    I attached the main call the ReadXmlSax class. I added the
    "system.out.println(elementName);" in the function getAttribute and startElement as well. I got printing out "name" for elementName from function getAttribute but got others printing out "null" for elementName from function startElement. Any suggestions? thanks
    import java.io.*;
    import java.util.*;
    import ReadXmlSax;
    public class ReadElement
         public static void main(String argv[])
              ReadXmlSax r = new ReadXmlSax();
              Enumeration e = r.getAttribute("dre.xml","server","name");
              try{
                   while (e.hasMoreElements()) {
                   System.out.println((String)e.nextElement());}
              }catch(Throwable t){
                   t.printStackTrace();
    <strong>test</strong>

  • Passing variable to the package

    Hi,
    I have package which is used to read the XML hirarerchy file and inserts the data into seven tables. Now i have one more different XML hirarerchy file which makes use of same package but just different table names and loads the data into another different seven tables.
    So i have to run the package two separate times with different table names and different file name. Is there any way i can just run the package by passing variables to select file names and tables to insert data into two sets of different tables.
    I hope i m not confusing you guys..
    say
    package A -- > XML file A --> seven Tables(part A)
    Package B(Same as package 'A', but just different table names) --> XML file B -- > Seven tables (Part B)
    My question can i make use of variables to select the file name and table names at run time of package ?? if so, how do i do it, any code example would be great ??
    Thank you so much !!! your assistance is greatly appreciated.

    I think you can change the table name with help of Dynamic Sql.
    Can you please send the example so that we can modify it with help of dynamic sql.
    Sandeep

  • Passing variable data into XSLT

    Hai all, I am trying to pass variable contents into a XSLT. I am trying the procedure given in the link below.I am not able to pass the parameter values into XSLT file.I am failing in the last step.
    Has anyone tried this example
    http://blogs.oracle.com/rammenon/2007/05/passing_bpel_variable_contents.html
    or
    Is there any other way to pass variable data into XSLT. Kindly help.
    Thank You

    True, the sample also uses the same function that I mentioned :
    <!-- convert Invoice to PO using XSLT service -->
              <assign name="transformVehicle">
              <copy>
                   <from expression="ora:processXSLT('InvToPo.xslt',bpws:getVariableData('input','payload') )"/>
                   <to variable="output" part="payload"/>
              </copy>                    
              </assign>

  • Passing variable trouble

    I have created a few arrays in a frame and am trying to pass
    a variable from the main array to choose a second array by passing
    a variable using a function after a button is clicked. I use this
    code to select the name of the new array:
    _root.m1[name].menuTwoID = homeMenu
    [0];
    from this array
    var homeMenu:Array = [["residential", "resMenu"],
    ["commercial", "comSubMenu"],.....
    That should produce a passed variable "resMenu" correct?
    It doesn't work later later in a new function when I put it
    into:
    _root.m2[name].main_text.text = menuTwoID[count-1][0];
    to get the names from the second array.
    If I put "resMenu" directly in the code (below) it works
    fine.
    _root.m1[name].menuTwoID = resMenu;
    Any ideas of what I'm doing wrong?
    Thanks

    Here's an example of the idea:
    I create a menu and when it's clicked try to use the
    menuTwoID to pass the name of the new array to create a new sub
    menu. But that doesn't work. Is it that's it's a string and not an
    array?
    var AllColors:Array = [["reds", "colorsOne"], ["blues",
    "colorsTwo"]];
    var colorsOne:Array = [["Fire Engine", "colors1a"],
    ["Sunset", "colors1b"]];
    var colorsTwo:Array = [["Sky Blue", "colors2a"], ["Cyan",
    "colors1b"]];
    function buildAllColors() {
    var spacing:Number = 20;
    for (var i = 0; i < 2; ++i) {
    var name:String = "flipper" + i + "_mc";
    var y:Number = i * spacing;
    _root.m1.attachMovie("flipper", name, i);
    _root.m1[name]._x = 0;
    _root.m1[name]._y = y;
    _root.m1[name].main_text.text = AllColors
    [0];
    _root.m1[name].menuTwoID = AllColors[1];
    _root.m1[name].item_btn.onPress = function () {
    itemClicked (this._parent.menuTwoID);
    for (var i = 0; i < 2; ++i) {
    _root.m1["flipper" + i + "_mc"].flipper_bg._alpha = 50;
    this._parent.flipper_bg._alpha = 100;
    buildAllColors();
    function itemClicked (menuTwoID:String){
    var spacing:Number = 20;
    for (i=0; i<2; i++){
    var y:Number = i * spacing;
    var name:String = "flipper" + i + "_mc";
    _root.m2.attachMovie("flipper", name, i);
    _root.m2[name]._x = 0;
    _root.m2[name]._y = y;
    _root.m2.attachMovie("flipper", name, i);
    _root.m2[name].main_text.text = menuTwoID
    [1];
    stop();

Maybe you are looking for