Crystal Report Viewer 11.5 Java SDK - How to set sub report parameter value

Good day!
I have a report with 3 sub-reports in the detail section. Main report has two parameters and each sub-report has one parameter in turn. We have our own JSP to receive parameter values from the user. I am using the following code to do the parameter value setting later into the report. Parameter value setting works for main report, but not for the sub-report.
I get an Error, for the first sub-report, from the viewer saying:
The parameter 'parametername' does not allow null values
On this article: [article link|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap%28bd1lbizjptawmq==%29/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313337333233323331%7D.do]
It says to set the report name of the parameter field to the name of the sub report. On this aspect, assuming this tip/solution works, I would like to read the names of the sub-reports and their parameter names. I do not want to hard-code them into our application.
Here is my current code:
sdk.occa.report.data.Fields parameterFields = new Fields();
I have a HashMap of <parameterName, parameterValue>
Iterate through the map
report.data.ParameterField aParameterField = new ParameterField();
aParameterField.setReportName(""); //main report
report.data.Values theValues = new Values();
ParameterFieldDiscreteValue aParameterFieldDiscreteValue = new ParameterFieldDiscreteValue();
aParameterFieldDiscreteValue.setValue (aValue);
theValues.add(aParameterFieldDiscreteValue);
aParameterField.setName(parameterName)
aParameterField.setCurrentValues(theValues);
parameterFields.add(aParameterField);
viewer.setParameterFields(parameterFields);
Please look at the line:
aParameterField.setReportName(""); //main report
Here's where I would like to say
if (parameter is subreport's parameter) then setReportName(subreport name);
Thx

It was little difficult to navigate down the objects to find the sub reports and their parameters. I am attaching the code:
May be there are other ways to do the same.
public String getReportNameForParameter (String parameterName, ReportClientDocument reportClientDoc)
        String result = "";
        boolean found = false;
        try {
            SubreportController src = reportClientDoc.getSubreportController();
            DataDefController ddc = reportClientDoc.getDataDefController();
            IDataDefinition idd = ddc.getDataDefinition();
            Fields fs = idd.getParameterFields();
            Iterator fiter = fs.iterator();
            while (fiter.hasNext()) {
                IField ifld = (IField) fiter.next();
                if (parameterName.equals(ifld.getName())) {
                    found = true;
                //System.out.println ("\t Field Name/Description/HeadingText: " + ifld.getName() + "/" + ifld.getDescription() + "/" + ifld.getHeadingText());
            if (!found) {
                IStrings reportNames = src.getSubreportNames();
                //System.out.println ("  Sub Reports If Any ...");
                if (reportNames != null) {
                    Iterator iter = reportNames.iterator();
                    while (iter.hasNext()) {
                        String repName = (String) iter.next();
                        //System.out.println ("\t Sub Report Name " + repName);
                        ISubreportClientDocument srcd = src.getSubreport(repName);
                        ddc = srcd.getDataDefController();
                        idd = ddc.getDataDefinition();
                        fs = idd.getParameterFields();
                        fiter = fs.iterator();
                        while (fiter.hasNext()) {
                            IField ifld = (IField) fiter.next();
                            if (parameterName.equals(ifld.getName())) {
                                result = repName;
                                break;
                            //System.out.println ("\t\t Field Name/Description/HeadingText: " + ifld.getName() + "/" + ifld.getDescription() + "/" + ifld.getHeadingText());
        //System.out.println ("********************************************************** ");
        catch (Exception exc) {
            System.out.println ("Error/Exception while trying to find the report name for parameter [" + parameterName + "]");
            System.out.println ("*******************************************************************************************");
            exc.printStackTrace();
        return result;

Similar Messages

  • How to create sub report in BI Publisher

    Hi,
    i have created sample report in BI Publisher .But I do not know how to create sub report in BI Publisher.
    How to create parent-child report?
    Can you provide details through example?
    Thanks

    This blog post seems to be quite useful: http://blogs.oracle.com/xmlpublisher/2007/01/formatting_html_with_templates.html
    Also, there is a whitepaper: http://www.oracle.com/technology/products/xml-publisher/docs/BIP-SubTemplate.pdf
    The focus is on formatting template for your report, but should have the same principals.

  • How to set the report path in a model plugin

    I am trying to figure out how to set the report path in a process model plug-in. I can seem to figure out how to get access to it. It seems like this would be a reasonable thing to do since the plug-ins are for results processing. Does anyone know how to do this? We typically use the Sequential process model but I am trying to keep my plug-in as independent of that as possible. 
    Thanks.
    Solved!
    Go to Solution.

    If I understand, you want your plug-in, when enabled, to alter the settings of any other instances of the NI report plug-in such that their reports share the same directory as your plug-in is configured to use.
    If so, your plug-in can access and modify the settings of all other plug-in instances. All instances are passed to all plug-in entries point in the plugins array sub-property of the ModelConfiguration parameter. You can iterate through this array. Any element of the array with a Base.SequenceFilename equal to "NI_ReportGenerator.seq" is an instance of the NI report plug-in. Its report options are stored in the element under PluginSpecific.Options.
    You can change the report options to what ever you want. Note that the ReportOptions model callback is called from the Initialize model-plugin entry point, so you might want to ensure that your changes are applied after that, so they aren't overwritten. To do that, you could make your changes in the the Initialize entry point of your plug-in, and ensure that your plugin runs last. To make it run last, you could set the FileGlobals.ModelPluginComponentDescription.Default.Base.RunOrder in your plug-in file to a value greater than 0, such as 1.0 (see TestStand Help>>Fundamentals>>Process Model Architecture>>Process Model Plug-in Architecture>>Structure of Plug-in Sequence Files>>Model Plug-in Entry Points>>Order of Entry Point Execution at Run Time).

  • How to set this DATS parameter

    Hi Pros,
            I am calling function 'HR_FORMS_TIM_GET_B2_RESULTS' in the program , its input parameter is BEGDA, I transfer a date variable to BEGDA, but does not work. can not get any data. but if I run this function in SE37, I input date '20140807', successfully get result.  please tell me how to set this DATS parameter?

    Hi,
    You might be passing the date in '12.12.2014' or '12/12/2014' format. Please
    use the function module 'CONVERSION_EXIT_BEGDA_INPUT' to convert the date
    to internal format and then pass it to the function module.
    Thanks

  • Report call failing from JAVA SDK

    Hi All,
    I am getting strange issue. Report works fine in BO InfoView when we ran the report by using java SDK it is getting some formula error.
    Here are the details
    1. Report is working fine in DEV, QA and PROD InfoView
    2. Report is not working with PROD JAVA SDK
    3. Finding below errors when we ran through Java SDK.
    Errors :
    Error1:
    2014-07-01 10:51:47 com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Error in File Cardholder Activity Fleet_Account: Error in formula Acct Code: '//If({?acctCD} = "%") then "ALL" ' A subscript must be between 1 and the length of the string. Details: errorKind---- Error code:-2147215357 Error code name:internal at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(Unknown Source) at com.crystaldecisions.sdk.occa.managedreports.ps.internal.f.a(Unknown Source) at com.crystaldecisions.sdk.occa.managedreports.ps.internal.f.getPage(Unknown Source) at com.businessobjects.report.web.event.q.a(Unknown Source) at com.businessobjects.report.web.event.q.a(Unknown Source) at com.businessobjects.report.web.event.bq.a(Unknown Source) at com.businessobjects.report.web.event.bt.broadcast(Unknown Source) at com.businessobjects.report.web.event.ak.a(Unknown Source) at com.businessobjects.report.web.a.p.if(Unknown Source) at com.businessobjects.report.web.e.a(Unknown Source) at com.businessobjects.report.web.e.a(Unknown Source) at com.businessobjects.report.web.e.if(Unknown Source) at com.crystaldecisions.report.web.viewer.CrystalReportViewerUpdater.a(Unknown Source) at com.crystaldecisions.report.web.ServerControl.processHttpRequest(Unknown Source) at com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet.do(Unknown Source) at com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java:282) at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java:459) at com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java:265) at com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java:262) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
    Error 2:
    2014-07-01 08:07:37
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Error in File Transaction Listing_Account:
    Error in formula Prompt Date:
    '(Propercase({?dtTyp}) & " between ") &
    Bad date format string.
    Details: errorKind---- Error code:-2147215357 Error code name:internal
    at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(Unknown Source)
    at com.crystaldecisions.sdk.occa.managedreports.ps.internal.f.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.managedreports.ps.internal.f.getPage(Unknown Source)
    at com.businessobjects.report.web.event.q.a(Unknown Source)
    at com.businessobjects.report.web.event.q.a(Unknown Source)
    at com.businessobjects.report.web.event.bq.a(Unknown Source)
    at com.businessobjects.report.web.event.bt.broadcast(Unknown Source)
    at com.businessobjects.report.web.event.ak.a(Unknown Source)
    at com.businessobjects.report.web.a.p.if(Unknown Source)
    at com.businessobjects.report.web.e.a(Unknown Source)
    at com.businessobjects.report.web.e.a(Unknown Source)
    at com.businessobjects.report.web.e.if(Unknown Source)
    at com.crystaldecisions.report.web.viewer.CrystalReportViewerUpdater.a(Unknown Source)
    at com.crystaldecisions.report.web.ServerControl.processHttpRequest(Unknown Source)
    at com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet.do(Unknown Source)
    at com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet.doPost(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java:282)
    at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java:459)
    at com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java:265)
    at com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java:262)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
    at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
    at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:792)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
    Anyone having similar issue
    Thanks
    Satish

    It is giving error in formula  even though formula is correct.

  • SAP BO 4.0 Web i report author name cange - Java SDK steps

    Hello All,
    One of our Developer created a template and handed over to client but client doesn't want show show the Developer details to Business and he want to change the name of Web i report author name. is there any way in BO 4.0 to change the name of web i report ?
    I see, there is only way is that i need to write some Java SDK code to change effect of the Author name, unfortunately i have never worked Java Bo SDK. can you please let me know how can we execute this SDK part step by step please ?
    Thank.. Sai

    Hi Mahi,
    Thank you for your kind information.
    I’m not sure how I can implement this Java script since I have never worked on the JAVA sdk.
    Could you please let me know step by step how I can implement this ?
    Best Regards,
    Saidi Reddy

  • CR 2008 SDK: how to set custom paper size?

    Dear forum users, I'm trying to use Crystal Reports 2008 SDK to print barcode labels to a Datamax Printer.
    The printer uses a custom page size. Can anyone tell me how to set custom page size and margins using C# and CR2008 SDK?
    Best regards
    Alessandro

    I'm experiencing this problem: I need to print barcode labels which are 4 x 9 cm each (a custom paper size). The report has been build correctly, orientation is right but when I print the labels programmatically by an application I made the label gets printed in a wrong way.
    In particular, orientation and paper size are not correct.
    So I would like to try to force both of them (both the orientation and the custom paper size). How can I do that?
    Best regards
    Alessandro

  • How to include input user parameter values in XML report output?

    How can i include input user parameter values in XML report output. I a have a report which can be run by providing start date and end date. I would like to include value of these parameters in XML output to enable me to figure out dates for report, just by looking at XML output.
    Rgds,
    manish

    I think all the XML attributes can contain lexicals. If you bring up the property palette against the report object you can just set the following:
    XML Tag Attributes: myParameter="&<P_1>"
    where P_1 is your user parameter.

  • JAAS in Java StoredProcedures: How to set up LoginModule

    Hi,
    has anyone tried to use JAAS in a Java StoredProcedure on Oracle9i?
    I couldn't find out how to set up the JVM to find the login configuration. Here the error I get, whenn I run the StoredProcedure:
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.SecurityException: Unable to locate a login configuration
    Here is what I did so far:
    1. copy jaas.jar into the $JAVA_HOME/lib/ext directory
    2. add to $JAVA_HOME/lib/security/java.security
    login.config.url.1=file:C:/my_jaas.config
    3. provide configuration file my_jaas.config
    Test {
    auth.MyLoginModule required debug=true;
    4. loadjava for jaas.jar (TEST schema)
    5. setup of the database security:
    dbms_java.grant_policy_permission( 'JAVA_ADMIN', 'TEST', 'javax.security.auth.AuthPermission', '*' );
    dbms_java.grant_permission( 'TEST', 'TEST:javax.security.auth.AuthPermission', 'createLoginContext', null );
    dbms_java.grant_permission( 'TEST', 'TEST:javax.security.auth.AuthPermission', 'getLoginConfiguration', null );
    dbms_java.grant_permission( 'TEST', 'SYS:java.security.SecurityPermission', '*', null );
    6. loadjava for the StoredProcedure (TEST schema)
    LoginContext lc = new LoginContext( "Test", new TestCallbackHandler() );
    lc.login();
    How can I tell the database where to look for the login configuration. Am I missing something here?
    Thanks for any help
    Regards,
    Christian

    Hi,
    has anyone tried to use JAAS in a Java StoredProcedure on Oracle9i?
    I couldn't find out how to set up the JVM to find the login configuration. Here the error I get, whenn I run the StoredProcedure:
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.SecurityException: Unable to locate a login configuration
    Here is what I did so far:
    1. copy jaas.jar into the $JAVA_HOME/lib/ext directory
    2. add to $JAVA_HOME/lib/security/java.security
    login.config.url.1=file:C:/my_jaas.config
    3. provide configuration file my_jaas.config
    Test {
    auth.MyLoginModule required debug=true;
    4. loadjava for jaas.jar (TEST schema)
    5. setup of the database security:
    dbms_java.grant_policy_permission( 'JAVA_ADMIN', 'TEST', 'javax.security.auth.AuthPermission', '*' );
    dbms_java.grant_permission( 'TEST', 'TEST:javax.security.auth.AuthPermission', 'createLoginContext', null );
    dbms_java.grant_permission( 'TEST', 'TEST:javax.security.auth.AuthPermission', 'getLoginConfiguration', null );
    dbms_java.grant_permission( 'TEST', 'SYS:java.security.SecurityPermission', '*', null );
    6. loadjava for the StoredProcedure (TEST schema)
    LoginContext lc = new LoginContext( "Test", new TestCallbackHandler() );
    lc.login();
    How can I tell the database where to look for the login configuration. Am I missing something here?
    Thanks for any help
    Regards,
    Christian Hi, this is not supported yet - although some guys, on the forum, successfully implements JSSE but i am not allowed to disclose how they did it.
    we hope to provide formal support for JAAS, JSSE and JCE in upcoming major database release
    Kuassi

  • Java Callout - how to set Sender Name by InstanceName

    I have a following code on Java Callout executed on Listening Channel:
    import oracle.tip.b2b.message.InstanceMessage;
    import oracle.tip.b2b.model.instance.Instancemessage;
    // some other imports //
    public class GetPartner implements Callout {
      public void execute(CalloutContext calloutContext, List input,
      List output) throws CalloutDomainException,
      CalloutSystemException {
      Logger log = Logger.getLogger(TransportCallout.class.getName());
      DiagnosticService.log("MKRTransportCallout: Init");
      try {
      log.setLevel(Level.INFO);
      CalloutMessage message =
      (CalloutMessage)input.get(0); 
      Instancemessage inst = new Instancemessage();
      InstanceMessage instance = new InstanceMessage(inst);
      String name = instance.getSenderId();
      String name2 = instance.getSenderName();
      log.info("SENDER ID FROM JAVA CALL " + name);
      log.info("SENDER NAME FROM JAVA CALL " + name2);
    Both logged values are null.
    My question is - how to connect CalloutMessage variable with Instancemessage variable via Java code?
    My variable "inst" is null, because the context from variable "message" is not related with it - there is no connection between CalloutMessage and Instancemessage. How to set connection like this?

    just a short addition. At the moment i use the following code to generate a MimeMessage:
    try
                // Get session
                Session session = Session.getDefaultInstance(MailQueue.props, null);
                // Define message
                this.message = new MimeMessage(session);
                message.setFrom(new InternetAddress(from));
                message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to, false));
                message.setSubject(subject);
                // pass the mail content and set the Mime Typ
                message.setContent(msg, MimeTyp);   
            catch (MessagingException me)
            } 

  • How to set rdlc report tablix to show record in one page

    hi all,
    i am in trouble to solve this.
    i want to show the report in the manner in which the tablix column 1 record should continue in the
    same page in column 2.
    LIKE THIS:
    column1      column 2
    1                      6
    2                     7
    3                     8
    4                     9
    5                     10
    and if their is space in the page just continues.
    and if not go to next page.
    i am filling my report with this code:
    Conn.Open()
    Dim sReportDataSource As New ReportDataSource
    Dim drow As DataRow
    Dim row As DataRow = Nothing
    Dim DS As New DataSet
    Dim dt As New DataTable
    DS.Tables.Add("tblstudentsregistrationBA")
    drow = dt.NewRow
    'ADD THE COLUMNS TO THE TABLE
    With DS.Tables(0).Columns
    .Add("BA_I_roll_number", Type.GetType("System.String"))
    End With
    For Each dr As DataGridViewRow In DGVfinal.Rows
    row("BA_I_roll_number") = dr.Cells("rollnumber").Value.ToString
    DS.Tables(0).Rows.Add(row)
    Next
    'Create a report parameter for the sales order number
    sReportDataSource.Name = "DataSet1"
    sReportDataSource.Value = DS.Tables(0)
    RDLCreportview.ReportViewer1.LocalReport.ReportPath = Application.StartupPath & "\Reports\classsubjectlistBA.rdlc"
    RDLCreportview.ReportViewer1.LocalReport.DataSources.Add(sReportDataSource)
    Dim rpEmployeeSSN As New ReportParameter()
    rpEmployeeSSN.Name = "course"
    rpEmployeeSSN.Values.Add(" Course :- " & cmbcourse.Text & "")
    'Set the report parameters for the report
    Dim parameters() As ReportParameter = {rpEmployeeSSN}
    RDLCreportview.ReportViewer1.LocalReport.SetParameters(parameters)
    RDLCreportview.ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)
    RDLCreportview.ReportViewer1.RefreshReport()
    DS.Dispose()
    DS = Nothing
    RDLCreportview.ShowDialog()
    RDLCreportview.Dispose()
    Conn.Close()
    kindly help me for this.
    thanks in Advance

    Hi sanny007,
    Based on my further research, we can use the following method to word around the issue so that the first table will print every odd row and the second table will print every even row, effectively giving you multiple column output. For more details, we can
    refer to the following steps:
    Add two tables to design surface.
    On the Detail row of the first table, insert two fields, then use the following expression to control the row visibility:
    =iif((RowNumber(Nothing) Mod 2) = 1, False, True)
    On the Detail row of the second table, insert the same two fields, then use the following opposite expression to control the row visibility:
    =iif((RowNumber(Nothing) Mod 2) = 1, True, False)
    If there are any other questions, please feel free to let me know.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to use different default parameter value for different report subscriptions

    In ssrs is it possible to define different default parameter values for different subscriptions? In the following example I have a report which has two subscriptions with different start date and end date values:
    Report name – Testsubscription.rdl
    Subscription-1
    Input parameter (default values):
    start_date = first day of current Month
    end_date = till date
    Subscription-2
    Input parameter (default values):
    start_date = first day of current Quarter
    end_date = till date
    I know an alternative way of doing this would be to copy the rdl file with a different name but I am curious whether this can be done within a single report definition file. I am using SQL Server 2008 R2 Standard Edition.
    Thanks!
    spp

    Hi sppdba,
    As per my understanding, there is a report with two parameter: start_date and end_date, you want to configure subscription for the report, and set different default values for start date and end date. And you want to know if it is possible to achieve you
    goal by using a single report definition file.
    Since you are using SQL Server 2008 R2 Standard Edition, we need to achieve your goal by configuring two subscriptions for the report. For detail information, please refer to the following steps:
      1. In design surface, right click start_date and open Parameter Properties dialog box.
      2. In General pane, type Name and Prompt, set Data Type to Date/Time.
      3. Click Available Values in left pane, select Specify Values.
      4. Click Add button, in Label text box, type “First day of Current Month”, click (fx) button in Value section, then type the expression like below:
    =DateSerial(Year(Now()), Month(Now()), 1)
      5. Click Add button, in Label text box, type “First day of Current Quarter”, click (fx) button in Value section, then type the expression like below, then click OK.
    =DateSerial(Year(Now()), (3*DatePart("q",Now()))-2, 1)
      6. Right click end_date and open Parameter Properties dialog box.
      7. In Available Values pane, select Specify Values.
      8. Click Add button, in Label text box, type “Today”, click (fx) button in Value section, then type the expression =Today(), then click OK.
    Now that the parameters are created, we need to configure subscription for the report. For detail information, please follow these steps:
      1. Open Report Manager, and locate the report for which you want to create a new subscription.
      2. Hover over the report, and click the drop-down arrow.
      3. In the drop-down menu, click Manage. This opens the General properties page for the report.
      4. Select the Subscriptions tab, and then click New Subscription.
      5. Select the delivery extension and data source for the subscription.
      6. Select a method of delivery, then choose report delivery options.
      7. Specify conditions that cause the subscription to process and delivery to occur.
      8. Set start_date to First day of Current Month, end_date to Today, then click OK.
      9. Create a new subscription as step4 to 7, set start_date to First day of Current Quarter, end_date to Today, then click OK.
    The following screenshots are for your reference:
    For detail information about Creating Standard Subscriptions, please refer to the following document:
    http://msdn.microsoft.com/en-us/data/ms156307(v=sql.105)
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.

  • Set sub report Logon Info without prompting

    I have a crystal report that i am displaying using a ReportSource from crystal enterprise server 10.
    This report has On Demand Sub Reports in it. When a user clicks on the web viewer to view that sub report it prompts for Database logon information. How do i set this information server side so the user is not prompted?

    I wanted to follow up on this question, since it was not properly answered. If you are using the enterprise SDK, and veing a report Stored on the server you must change the properties of the report on the server itself for what I needed to work.
    Once the report is saved to crystal enterpise go into the report's properties.
    go to Process->Database and set the following setting:
    In Crystal 10 - Make sure 'Prompt the user for database logon when viewing' is
    NOT checked.
    In Crystal XI - under 'When viewing report:' make sure the radio button for
    'Use same database logon as when report is run' is checked.
    Also, the SDK has a 'Prompt on refresh' optoin when scheduling the report programmatically that you can set to false to make this work without having to change the base report in the crystal enterprise server. (This goes for Crysal XI and Crystal 10)

  • How to set the tables parameter to a BAPI using adaptive RFC model

    Hi,
    I have a BAPI ZBAPI that has a tables parameter ZPernr of type ZTable with two elements pernr and name.
    I used adaptive RFC model and created model classes for the BAPI.
    My question how do i set list of pernr and name to the tables parameter in the webdynpro for java.
    I have the following methods available
    ZBAPI input = new ZBAPI();
    1.ZTable table = new ZTable();
    table.setPernr(pernr);
    table.setname(name);
    input.addZPernr(table);
    how do i set the table parameter for multiple pernr and name
    2.
    add all the pernr and name to list and set that list to input in the following way
    input.setZPernr(list) and list of typecom.sap.aii.proxy.framework.core. AbstractList
    out of two methods mentioned which one is correct.
    Please let me know the solution
    Thanks
    Bala Duvvuri

    Hi Bala,
                In your code:
    List pernrList = new ArrayList();
    pernrList  should be declared as the  type of class HROBJECT   ( The structure name in the model  e.g. the node PERFWARN type is Zhrecmfm_002_Perfrat_Warning_Input )
    Try this:
    HROBJECT  pernrList = new HROBJECT();
    pernrList.setPernr(pernr);
    input.setPernr_List(pernrList);
    // call BAPI execute method
    If you want to pass list of pernrs, you can pass in alternate way
    IPrivate<viewname>.I<nodeame>Node prNode = wdContext.node<node>();
    IPrivate<viewname>.I<nodeame>Element prEle;
    for (int i = 0; i < table.size(); i++) {
    HROBJECT  pernrList = new HROBJECT();
    pernrList.setPernr(pernr); // Set the pernr from current record
    prEle = prNode.create<nodeame>Element(pernrList);
    prNode.addElement(prEle);     
    // call BAPI execute method
    Once I execute the BAPI how do i iterate thru second table parameter PERNR_PERFRAT to get pernr and performance rating text
    Say your node name is  PERNR_PERFRAT
    for (int i = 0; i < wdContext.nodePERNR_PERFRAT().size(); i++) {
    wdContext.nodePERNR_PERFRAT().getPERNR_PERFRATElementAt(i).getPernr();
    wdContext.nodePERNR_PERFRAT().getPERNR_PERFRATElementAt(i).getPerfrat();
    Regards,
    Siva

  • Iowagie - How do I pass in parameter values to an event handler -onEndPage?

    Hi,
    I have spent a while on this and is getting quite frustrating, so any help much appreciated.
    I am trying to create a footer on each of my PDF pages that will contain an image and a table. I have successfully created a separate class to my servlet, EndPage.java that contains an onEndPage() method. The problem is, I need to pass in three parameter values into this method, storeNo, langId and transNo.
    How do I go about doing this?
    PDFPrint.java
    public class PDFPrint extends HttpServlet {
        private ByteArrayOutputStream getDoc(ByteArrayOutputStream baos, HttpServletRequest requ, String transNo, String storeNo, String langId)     {
            HttpSession session = requ.getSession();
            Document document = new Document();                    
            PdfWriter writer = PdfWriter.getInstance(document, baos);
            writer.setPageEvent(new EndPage());     
            document.open();
    }EndPage.java
    public class EndPage extends PdfPageEventHelper {
        public void onEndPage(PdfWriter writer, Document document) {
            try {
                Rectangle page = document.getPageSize();
                PdfPTable head = new PdfPTable(3);
                PdfPCell cell1 = new PdfPCell(new Phrase("Pueblo Nativo S.A. de C.V", FontFactory.getFont(FontFactory.HELVETICA, 17f)));
                cell1.setHorizontalAlignment(Element.ALIGN_LEFT);
                cell1.setBorder(0);
                for (int k = 1; k <= 1; ++k)
                     head.addCell(cell1);
                head.setTotalWidth(page.width() - document.leftMargin() - document.rightMargin());
                head.writeSelectedRows(0, -1, document.leftMargin(), page.height() - document.topMargin() + head.getTotalHeight(),
                          writer.getDirectContent());
                PdfPTable foot = new PdfPTable(1);
                PdfPCell cell = new PdfPCell(new Phrase("Disclaimer to go here.", FontFactory.getFont(FontFactory.HELVETICA, 17f)));          
                cell.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell.setBorder(0);
                for (int k = 1; k <= 1; ++k)
                     foot.addCell(cell);
                foot.setTotalWidth(page.width() - document.leftMargin() - document.rightMargin());
                foot.writeSelectedRows(0, -1, document.leftMargin(), document.bottomMargin(),
                writer.getDirectContent());
            catch (Exception e) {
                throw new ExceptionConverter(e);
         public static void main(String[] args) {
    }Thanks!

    Try adding that information data as properties to the HTTP session.
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ExternalContext externalContext = facesContext.getExternalContext();
    HttpSession session = (HttpSession)externalContext.getSession(false);
    session.setAttribute("stornNo", storeNo);
    session.setAttribute("langId", langId);
    session.setAttribure("transNo", transNo);In PDFPrint, you can get those properties using session's getAttribute method, and pass them to the constructor or as parameters to onEndPage.

Maybe you are looking for

  • Sound working on some programs but not others (Pavilion dv6 Notebook PC)

    The sound is working for some programs (iTunes) on my laptop, but will not work with Chrome, Internet Explorer or BBC iPlayer Downloads. I'm at a loss to explain why. When I open up the Sound settings on the laptop, I can see that iTunes output plays

  • JSP Newbie

    Hi, I want to know when we include this statement import java.sql.*; import java.io.*; in our scriplet...Where does this statement look for the class file? is it in C:\jdk1.3.1_04 or in one of the classes file in Tomcat folder?

  • Deffered tax node not available in General Ledger Accounting

    Hello, I want to custumize deffered tax programme but the node :General Ledger Accounting  Business Transactions  Report  Sales/Purchases Tax Returns  Deferred Taxes is not availabe. Please suggest what steps are needed to make it available. ours

  • How to install games without a data connection

    have a curve 8520. i do not have a data connection, no service provider. i only use wifi and connect to my desktop via usb. how is the best way to install games. can i download from bb app world? i have tried downloading from other places but the gam

  • How to make a wall for a game

    hello developers I'm sharing a long time to find out how to make a wall for my game but now where is it. Can someone help me? its a wall for an iphone/ipod game. It must be a wall that a sprite will stop walking it's not a killer object but a stop ob