Create a filename based on form content

Hello,
I always have a hard time explaining my question's but here goes.
I have a button which saves a form once filled out. I would like to take the thinking out of this when it comes to naming the file and it create the name based on a numerical field in the form (in this case a serial number). The example would be something like 00000_Inspection Form.pdf. I am certain this can be done with  javascript but not being a programmer, I have no idea where to begin with this. I have a variable set up but no idea how to act upon it.
thanks in advance.
Brad

Hi
try this syntax
Sum(HrsWorked)/(Count(Payperiod) In Report)
Regards,
Stratos

Similar Messages

  • Create a group based on file contents

    Hello!
    I'm investigating options to create a dynamic group based on periodic check of file content. I have a Shavlik updater which is patching custom groups based on file contents. I would like to create a dynamic group which should return all Windows Computer
    classes that are found from this file. Anything close to sensible was found at https://www.youtube.com/watch?v=gxASdzHFTOU where author created an attribute of based on "SELECT * FROM CIM_DataFile" and then created a group out from it - but it checks
    file existence, not content, would launch against all Windows Clients (and we have 1000+ of these monitored) - certainly not a valid way.
    Is there any way I could do that in a simple, straightforward way?
    Thanks in advance

    Ok, I got it. Have you tried modifying the group membership with powershell?
    Modifying Explicit Group Membership in SCOM 2012 with PowerShell
    http://blogs.msdn.com/b/rslaten/archive/2013/06/27/modifying-explicit-group-membership-in-scom-2012-with-powershell.aspx
    Automate your group creation with Powershell
    http://blog.coretech.dk/kra/automate-your-group-creation-with-powershell/
    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.

  • Using javascript to save a pdf to a different directory and generating a new filename based on form fields in the document.

    I have built the following script in an attempt to create a submit button that will automatically save the document in a different directory on my computer. It will also use the form field data "customer" and "date" to generate the filename. I printed out the variable myPath and it looks like it printed the correct string. I keep getting the following error:
    TypeError: redeclaration of const path
    any help would be much appreciated.
    var customer = this.getField("Customer").value;
    var date = this.getField("Date").value;
    var path = "C:/Users/awilliams/My Documents/Test/"
      var reg = date.match(/(\d+)\/(\d+)\/(\d+)/);
    var myPath= "C:/Users/awilliams/My Documents/Test/" + customer + "_" + reg[1] + "." + reg[2] + "." +
    reg[3] + ".pdf";
    this.saveAs(myPath);

    "path" is a keyword within a PDF you should not use keywords as a name for any other object as a general rule.
    Have you checked the PDF Reference to see how to create a file path name within a PDF,  3.10.1 File Specification Strings page 118?
    Did you carefully read the Acrobat JavaScript Reference for the saveAs method?
    The notes following the description:
    Note: This method can only be executed during a batch or console event. See Privileged versus non-privileged context for details. The event object contains a discussion of JavaScript events.
    (Adobe Reader S): This method is available in Adobe Reader for documents that have Save usage rights.
    How to Save a PDF with Acrobat JavaScript

  • Dynamically assign email submission target based on form content

    We need to be able to assign the email target on a given form dynamically based on user selection out of a pre-defined set - drop-down.  Currently, you can only target the submissions to an email manually entered into the email field or have a separate form for each unique email submission target.
    We have a branch-office model company and each office interacting with a given form is going to need some things on that form to change based on which office the person filling out the form is with.
    Thanks.

    Thanks Randy.
    Say we had an Agent Sales Information Form online in our intranet/portal - embeded, and it was visable by 20 branch offices.  When a user fills out the form it needs to go to a single central office person as well as the administrative assistant and manager in the specific branch office that the user (form filler) is based out of.
    Example:
    Agent Sales Information Form
    --> user selects 'I'm with Office A' from the drop-down menu --> form needs to go to: Central Office, Admin Assistant in Office A, Manager in Office A
    --> user selects 'I'm with Office B' from the drop-down menu --> form needs to go to: Central Office, Admin Assistant in Office B, Manager in Office B
    In FormsCentral I can put an email field on the form and direct the form submission to that email address or I can share a given form with a pre-defined set of people.  What I can't do is have a single form with a drop-down menu for which branch office that user (form filler) is from and change the people the form submits to based on that choice.  Having the users manually enter the email addresses of the people the form needs to be submitted to is a deal breaker.
    While we're at it, other things on my list for an embeddable paperless forms solution:
    - user can print the form -- automatically on submission or by 'print button' on the form
    - user can download pdf copy of the form
    - user can save a form for later completion (across browser sessions)
    - upload pictures and have them display on the form (not just as attachments)
    - API functionality to allow fields to be auto-populated with data from another system (eliminating the office selection drop-down menu in this example -- our portal knows what office the logged-in user is from and can tell the form if it would listen )
    Thanks Randy.  I appreciate your taking a look at this for me. 

  • Creating a filename based upon entered fields

    Using Acrobat 7, I have two fields that I would like to draw upon to create a unique filename under which the document will be stored.
    Field #1: Name.Last (no formatting)
    Field #2: Date.From (formatted as mm/dd/yyyy)
    If #1 = "Smith" and #2 = "02/03/2008", the unique name created would be "080203-smith".
    So I need to concatenate and then store.
    Any suggestions?
    Steve

    As Earlierly suggested, the Outputs PS from the ReadPropSet method does not match the fields defined in the init method.
    And One More thing as i observed
    var fileLoc = "c:example.xml"; ( As u Declared)
    should be
    var fileLoc = "c:\example.xml";
    Just Try Once :-)

  • How to create Discussions Task Flow Based on Oracle Content Server

    Hi,
    I need to create an ADF application consisting of the following aspects:
    1) Upload, Download and Share documents (I'm using Documents Services provided by WebCenter Jdeveloper Extensions)
    2) Create discussion threads and forums (I'm trying to use Discussion Services provided by WebCenter Jdeveloper Extensions)
    3) User should be able to do an universal search i.e search both documents and discussions forums. (I'm using Search Services provided by WebCenter Jdeveloper Extensions)
    I'm using "Oracle Content Server 10g for WebCenter" to manage my documents and discussions. While logging into GUI of OCS, I'm able to create and post discussion threads.
    But, I'm unable to create discussions adf task flow based on Oracle Content Server.
    The demos/tutorials/dev guides provided at http://webcenter.oracle.com have only described using WLS_Services managed server which is created and setup using WC Suite 11g.
    But I couldn't find any information to develop these discussion services using Jdeveloper WebCenter Extensions and Oracle Content Server.
    Please let me know, if anyone has tried this or if you have any idea of how to go about it.
    Thanks in Advance,
    Harikiran.
    Edited by: harikiran on Jul 13, 2010 3:23 PM

    Hi.
    You have official documentation introducing ADF Task Flows here: http://docs.oracle.com/cd/E23943_01/web.1111/b31974/taskflows.htm
    And you have next step by step tutorials to learn how to implement Task Flows:
    http://yonaweb.be/webcenter_tutorial/part_6_building_taskflow_and_consuming_it_webcenter_portal (Yannick blog post).
    http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_57/jdtut_11r2_57.html (official JDev samples).
    http://danielmerchanoracle.blogspot.com.es/2011/08/integrar-adf-task-flows-propios-en-una.html (My spanish blog with "how to add a Custom Task Flow into WebCenter Portal Application", 3 different and possible ways).,
    Probably Yannick Blog post if you need to understand how to integrate Bounded Task Flows with WebCenter Portal's.
    Regards.

  • Read contents of excel and create new List based on excel

    HI,
    I have a excel file, which is uploaded in a document library. I am using C# and VS 2010.
    The excel file contains multiple sheets. I want to read the contents of the excel file and create a new List based on the contents of the excel file.
    How to achieve this programmatically?
    Thanks

    Hi.
    You can user OpenXML SDK to read excel Data.
    http://msdn.microsoft.com/en-us/library/office/bb448854.aspx
    Here an example of use.
    http://zsvipullo.blogspot.it/2011/08/excel-helper-leggere-un-file-xlsx.html
    Regards,
    Bubu
    http://zsvipullo.blogspot.it
    Please mark my answer if it helped you, I would greatly appreciate it.

  • How to create table for XML schema-based Interface form

    Hi All,
    With tcode SFP to crate  a XML schema-based Interface form, how to create a defined table can be listed in "Data View"?
    Just like APAP Dictonary- Based Interface form, that we can drag  a defined table from data view to the panel.

    Hi,
    Just follow these steps:
    1. Create interactive form UI element in your view.
    2. Now provide Datasource and PDFSOURCE to it in form properties.
    3. Now give a template name prefix with 'Z' or 'Y'.
    4. Double click on it. It will prompt for interface name.
    5. Provide interface name prefixed with 'Z' or 'Y'.
    6. Click on Context button in the Pop up window and provide the node you have selected as DATASOURCE.
    7. Click ok and it will open the form designer.
    8. In this way you can create a XML Schema based Form.
    9. Activate the interface and design the form providing layout type and other details.
    Hope it will help.
    Regards,
    Vaibhav

  • How to create a tree based on directory structure

    I want to create a hierarchical tree in Forms 6i based upon a file system directory structure (similar to Windows Explorer). How can I populate a tree with this information, is there something that I can call or write that would return the file system structure in a format that I can populate my tree?
    Any advice would be greatly appreciated.
    Thanks
    Richard

    Your link does not seem to work.They're re-jigging all the links to accomodate the hot poop on Oracle's latest and greatest, 10G. So at least the website is on schedule even if the actual software delivery dates have slipped :P
    We can still get D2KWUTIL from here: http://te chnet.oracle.com/software/products/forms/content.html
    Cheers, APC

  • Using JSP based PCR forms in ERP2005 rather than Adobe interactive forms

    We are currently upgrading from EP5.0 business package 50 to EP7.0 with ERP2005 (ECC 6.0) and are trying to configure our existing custom personal change request forms with our scenarios.
    Originally our custom PCR scenarios where JSP iView and we are hoping to use these again as part of ERP2005. The customisation seems to support this – transaction QISESCENARIO for each scenario you have the option ‘Entry Type in Web’ and you can set it to ‘Entry Using JSP iView’. We can configure the internet link and the portal component also for our JSP view.
    When we try to run this however we get the exception ‘No Adobe Form Is Assigned to the Scenario’. After a quick debug it seems that you always need the Adobe form to be configured.
    None of the documentation for ERP2005 suggests that you can use anything other than Adobe forms, which contradicts the configuration in QISESCENARIO.
    The ISR cookbook (written July 2004) details the creation and configuration of JSP request forms but not what versions they are compatible with.
    Developing you own PCRs for ERP2004 (Can’t find an ERP 2005 version) does not mention JSP iViews at all.
    The release notes for ERP2005 don’t give this a specific mention.
    So, my question is are the use of JSP based request forms permitted with ERP2005 ?

    Hi Phil,
       Interesting - I have a similar issue.  We want to use the Request for Transfer scenario in ERP 2005, but it has not been developed in Adobe forms by SAP yet (it isn't available in 2004 either)!  So, we have decided to use the old JSP PCRs instead.
    Your issue is probably because you're using the same 2005 iviews to create your PCRs.  The 2005 PCR iviews are written in WebDynpro, and appear to assume that each one will be an Adobe form!  If you assign the old PCR iviews to your manager (give them the old MSS role under Migrated Content->EP5.0... in the pcd if you have it installed), you will be able to create a PCR with the JSP forms (regardless of the "Entry in Web" setting in QISRSCENARIO).
    The next issue is the approval.  In 2005, transaction SWFVISU has task TS50000075 configured as Java Webdynpro.  You'll need to change that to iView, and specify ID = com.sap.pct.hcm.isrdispatcher.default.  I'm following the UWL item type guide for this at:
    http://help.sap.com/saphelp_nw04s/helpdata/en/b1/cc1357eead454bb144face4a66be7d/content.htm
    Having said this, my approval is not working!  The item type has clearly changed, because the workitem name is no longer a hyperlink (rather annoying), but when I hit the "Launch Task Page" button (default name I think) I get the error:
    "Unable to perform action because the system returned an invalid URL"
    I can't see this "invalid url" anywhere in the logs, so I can't see where it is getting it from, or what path, etc I'm meant to put!  In your old system, what did you have as the "Server for ISR call" under "Additional Data for Scenario" in QISRSCENARIO?  Also, what did you have in the "URL" box that appears under the Additional Data for Scenario button when you change the Entry Type to JSP?
    Many thanks,
    Russell.

  • Posted Form contents Problem

    I had this problem with 4.5.1 SP 5 and WebLogic told me it would be
    fixed in 5.1 SP 1 (I believe the issue number was 10214). I've just
    tried my simple test case again with 5.1 SP 3 on NT and it still fails.
    The problem is when text is posted from an HTML form to a servlet in
    WebLogic, WebLogic assumes the posted data is ALWAYS encoded in
    ISO-8859_1. So if your form posts Shift-JIS, WLS still incorrectly
    converts the text to unicode using the ISO8859 code page. The only
    work arround I can find is to take the bad JAVA unicode strings, get the
    bytes with the ISO8859 code page, and then create a new string using
    those bytes and the Shift-JIS code page. This is what the
    fixStringEncoding() method is doing below. This is unacceptable.
    How does the WebLogic server understand how to convert between IANA
    encodings and JAVA encodings when receiving a response? A browser will
    encode the form contents with the same encoding as the HTML page with
    the form is in. How does WLS know when it recieves the response to use
    SJIS (Java encoding) to convert Shift-JIS (IANA) encoded text to
    unicode? My test JSP page is included below. It's form that accepts
    Japanese text and posts it back to itself for display. If I don't "fix"
    the JAVA strings, the Japanese text comes out as garbage. BTW, I have
    verified that I'm using SP 3 correctly. Thanks.
    Kirk Everett
    <%@ page contentType="text/html; charset=Shift-JIS"%>
    <html>
    <head>
    <title></title>
    <meta http-equiv="content-type" content="text/html; charset=Shift-JIS">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="pragma" content="no-cache">
    </head>
    <body>
    <form name="Dummy" action="dummySJIS.jsp" method="post">
    <table>
    <tr>
    <td align="right">DummyString:</td>
    <td><input type="text" name="dummy" size="30"
    maxlength="50"></td>
    </tr>
    </table>
    <input type="submit" value="submit">
    </form>
    <BR>
    DummyString with fixing= <%=
    fixStringEncoding(request.getParameter("dummy")) %>
    <BR>
    DummyString without fixing = <%= request.getParameter("dummy") %>
    <BR>
    Embedded (Shitf-JIS) Japanese --> ?X?V‚É?¬Œ÷‚µ‚Ü‚µ‚½?B
    </body>
    </html>
    <%!
    public String fixStringEncoding(String sourceString)
    String targetEncoding = "SJIS";
    String convertedString = null;
    if(sourceString != null)
    // get the array of bytes for the unicode string using the
    // 8859_1 code page
    try
    byte[] stringBytes = sourceString.getBytes("ISO8859_1");
    // now create a new string based of the array but do it
    // with the correct code page UTF8
    convertedString = new String(stringBytes, targetEncoding);
    catch(UnsupportedEncodingException uee)
    convertedString = "";
    return convertedString;
    %>

    The jsp directive does nothing to help the INPUT data handling. On the other hand, this is a html spec problem, not a weblogic one. RFC2070 has some recommendation on how to do i18n with HTML/HTTP, but neither Netscape nor IE supports it.
    --Ye
    Joseph Weinstein <[email protected]> wrote:
    Hi,
    The ideal approach is to employ the JSP directive for encoding.
    This is documented in the JSP spec. Also, if all your JSPs
    require the same encoding, there is an argument to our JSP
    servlet, to tell it what default charset encoding to use.
    Joe
    Kirk Everett wrote:
    I had this problem with 4.5.1 SP 5 and WebLogic told me it would be
    fixed in 5.1 SP 1 (I believe the issue number was 10214). I've just
    tried my simple test case again with 5.1 SP 3 on NT and it still fails.
    The problem is when text is posted from an HTML form to a servlet in
    WebLogic, WebLogic assumes the posted data is ALWAYS encoded in
    ISO-8859_1. So if your form posts Shift-JIS, WLS still incorrectly
    converts the text to unicode using the ISO8859 code page. The only
    work arround I can find is to take the bad JAVA unicode strings, get the
    bytes with the ISO8859 code page, and then create a new string using
    those bytes and the Shift-JIS code page. This is what the
    fixStringEncoding() method is doing below. This is unacceptable.
    How does the WebLogic server understand how to convert between IANA
    encodings and JAVA encodings when receiving a response? A browser will
    encode the form contents with the same encoding as the HTML page with
    the form is in. How does WLS know when it recieves the response to use
    SJIS (Java encoding) to convert Shift-JIS (IANA) encoded text to
    unicode? My test JSP page is included below. It's form that accepts
    Japanese text and posts it back to itself for display. If I don't "fix"
    the JAVA strings, the Japanese text comes out as garbage. BTW, I have
    verified that I'm using SP 3 correctly. Thanks.
    Kirk Everett
    <%@ page contentType="text/html; charset=Shift-JIS"%>
    <html>
    <head>
    <title></title>
    <meta http-equiv="content-type" content="text/html; charset=Shift-JIS">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="pragma" content="no-cache">
    </head>
    <body>
    <form name="Dummy" action="dummySJIS.jsp" method="post">
    <table>
    <tr>
    <td align="right">DummyString:</td>
    <td><input type="text" name="dummy" size="30"
    maxlength="50"></td>
    </tr>
    </table>
    <input type="submit" value="submit">
    </form>
    <BR>
    DummyString with fixing= <%=
    fixStringEncoding(request.getParameter("dummy")) %>
    <BR>
    DummyString without fixing = <%= request.getParameter("dummy") %>
    <BR>
    Embedded (Shitf-JIS) Japanese --> ?X?V&#8218;É?¬&#338;÷&#8218;µ&#8218;Ü&#8218;µ&#8218;½?B
    </body>
    </html>
    <%!
    public String fixStringEncoding(String sourceString)
    String targetEncoding = "SJIS";
    String convertedString = null;
    if(sourceString != null)
    // get the array of bytes for the unicode string using the
    // 8859_1 code page
    try
    byte[] stringBytes = sourceString.getBytes("ISO8859_1");
    // now create a new string based of the array but do it
    // with the correct code page UTF8
    convertedString = new String(stringBytes, targetEncoding);
    catch(UnsupportedEncodingException uee)
    convertedString = "";
    return convertedString;
    %>--
    PS: Folks: BEA WebLogic is in S.F. with both entry and advanced positions for
    people who want to work with Java and E-Commerce infrastructure products. Send
    resumes to [email protected]
    The Weblogic Application Server from BEA
    JavaWorld Editor's Choice Award: Best Web Application Server
    Java Developer's Journal Editor's Choice Award: Best Web Application Server
    Crossroads A-List Award: Rapid Application Development Tools for Java
    Intelligent Enterprise RealWare: Best Application Using a Component Architecture
    http://www.bea.com/press/awards_weblogic.html

  • LC designer form content disappears

    We created a form in lc 8. As a pdf it is fine. We need to adjust the content and form. How can we adjust it without the content going away? The form is there but data goes away?
    Thank you

    The problem is that XFA based PDF Form (a form created with Adobe LiveCycle Designer) cannot be edited using Acrobat.  There is no way around this.
    Regards
    Steve

  • How to create a report based on a DataSet programatically

    I'm working on a CR 2008 Add-in.
    Usage of this add-in is: Let the user choose from a list of predefined datasets, and create a totally empty report with this dataset attached to is. So the user can create a report based on this dataset.
    I have a dataset in memory, and want to create a new report in cr2008.
    The new report is a blank report (with no connection information).
    If I set the ReportDocument.SetDataSource(Dataset dataSet) property, I get the error:
    The report has no tables.
    So I must programmatically define the table definition in my blank report.
    I found the following article: https://boc.sdn.sap.com/node/869, and came up with something like this:
    internal class NewReportWorker : Worker
          public NewReportWorker(string reportFileName)
             : base(reportFileName)
    public override void Process()
             DatabaseController databaseController = ClientDoc.DatabaseController;
             Table table = new Table();
             string tabelName = "Table140";
             table.Name = tabelName;
             table.Alias = tabelName;
             table.QualifiedName = tabelName;
             table.Description = tabelName;
             var fields = new Fields();
             var dbField = new DBField();
             var fieldName = "ID";
             dbField.Description = fieldName;
             dbField.HeadingText = fieldName;
             dbField.Name = fieldName;
             dbField.Type = CrFieldValueTypeEnum.crFieldValueTypeInt64sField;
             fields.Add(dbField);
             dbField = new DBField();
             fieldName = "IDLEGITIMATIEBEWIJS";
             dbField.Description = fieldName;
             dbField.HeadingText = fieldName;
             dbField.Name = fieldName;
             dbField.Type = CrFieldValueTypeEnum.crFieldValueTypeInt64sField;
             fields.Add(dbField);
             // More code for more tables to add.
             table.DataFields = fields;
             //CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo info =
             //   new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
             //info.Attributes.Add("Databse DLL", "xxx.dll");
             //table.ConnectionInfo = info;
             // Here an error occurs.
             databaseController.AddTable(table, null);
             ReportDoc.SetDataSource( [MyFilledDataSet] );
             //object path = @"d:\logfiles\";
             //ClientDoc.SaveAs("test.rpt", ref path, 0);
    The object ClientDoc referes to a ISCDReportClientDocument in a base class:
       internal abstract class Worker
          private ReportDocument _ReportDoc;
          private ISCDReportClientDocument _ClientDoc;
          private string _ReportFileName;
          public Worker(string reportFileName)
             _ReportFileName = reportFileName;
             _ReportDoc = new ReportDocument();
             // Load the report from file path passed by the designer.
             _ReportDoc.Load(reportFileName);
             // Create a RAS Document through In-Proc RAS through the RPTDoc.
             _ClientDoc = _ReportDoc.ReportClientDocument;
          public string ReportFileName
             get
                return _ReportFileName;
          public ReportDocument ReportDoc
             get
                return _ReportDoc;
          public ISCDReportClientDocument ClientDoc
             get
                return _ClientDoc;
    But I get an "Unspecified error" on the line databaseController.AddTable(table, null);
    What am i doing wrong? Or is there another way to create a new report based on a DataSet in C# code?

    Hi,
    Have a look at the snippet code below written for version 9 that you might accommodate to CR 2008, it demonstrates how to create a report based on a DataSet programmatically.
    //=========================================================================
    +           * the following two string values can be modified to reflect your system+
    +          ************************************************************************************************/+
    +          string mdb_path = "C:
    program files
    crystal decisions
    crystal reports 9
    samples
    en
    databases
    xtreme.mdb";    // path to xtreme.mdb file+
    +          string xsd_path = "C:
    Crystal
    rasnet
    ras9_csharp_win_datasetreport
    customer.xsd";  // path to customer schema file+
    +          // Dataset+
    +          OleDbConnection m_connection;                         // ado.net connection+
    +          OleDbDataAdapter m_adapter;                              // ado.net adapter+
    +          System.Data.DataSet m_dataset;                         // ado.net dataset+
    +          // CR variables+
    +          ReportClientDocument m_crReportDocument;          // report client document+
    +          Field m_crFieldCustomer;+
    +          Field m_crFieldCountry;+
    +          void CreateData()+
    +          {+
    +               // Create OLEDB connection+
    +               m_connection = new OleDbConnection();+
    +               m_connection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + mdb_path;+
    +               // Create Data Adapter+
    +               m_adapter = new OleDbDataAdapter("select * from Customer where Country='Canada'", m_connection);+
    +               // create dataset and fill+
    +               m_dataset = new System.Data.DataSet();+
    +               m_adapter.Fill(m_dataset, "Customer");+
    +               // create a schema file+
    +               m_dataset.WriteXmlSchema(xsd_path);+
    +          }+
    +          // Adds a DataSource using dataset. Since this does not require intermediate schema file, this method+
    +          // will work in a distributed environment where you have IIS box on server A and RAS Server on server B.+
    +          void AddDataSourceUsingDataSet(+
    +               ReportClientDocument rcDoc,          // report client document+
    +               System.Data.DataSet data)          // dataset+
    +          {+
    +               // add a datasource+
    +               DataSetConverter.AddDataSource(rcDoc, data);+
    +          }+
    +          // Adds a DataSource using a physical schema file. This method require you to have schema file in RAS Server+
    +          // box (NOT ON SDK BOX). In distributed environment where you have IIS on server A and RAS on server B,+
    +          // and you execute CreateData above, schema file is created in IIS box, and this method will fail, because+
    +          // RAS server cannot see that schema file on its local machine. In such environment, you must use method+
    +          // above.+
    +          void AddDataSourceUsingSchemaFile(+
    +               ReportClientDocument rcDoc,          // report client document+
    +               string schema_file_name,          // xml schema file location+
    +               string table_name,                    // table to be added+
    +               System.Data.DataSet data)          // dataset+
    +          {+
    +               PropertyBag crLogonInfo;               // logon info+
    +               PropertyBag crAttributes;               // logon attributes+
    +               ConnectionInfo crConnectionInfo;     // connection info+
    +               CrystalDecisions.ReportAppServer.DataDefModel.Table crTable;+
    +               // database table+
    +               // create logon property+
    +               crLogonInfo = new PropertyBag();+
    +               crLogonInfo["XML File Path"] = schema_file_name;+
    +               // create logon attributes+
    +               crAttributes = new PropertyBag();+
    +               crAttributes["Database DLL"] = "crdb_adoplus.dll";+
    +               crAttributes["QE_DatabaseType"] = "ADO.NET (XML)";+
    +               crAttributes["QE_ServerDescription"] = "NewDataSet";+
    +               crAttributes["QE_SQLDB"] = true;+
    +               crAttributes["QE_LogonProperties"] = crLogonInfo;+
    +               // create connection info+
    +               crConnectionInfo = new ConnectionInfo();+
    +               crConnectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;+
    +               crConnectionInfo.Attributes = crAttributes;+
    +               // create a table+
    +               crTable = new CrystalDecisions.ReportAppServer.DataDefModel.Table();+
    +               crTable.ConnectionInfo = crConnectionInfo;+
    +               crTable.Name = table_name;+
    +               crTable.Alias = table_name;+
    +               // add a table+
    +               rcDoc.DatabaseController.AddTable(crTable, null);+
    +               // pass dataset+
    +               rcDoc.DatabaseController.SetDataSource(DataSetConverter.Convert(data), table_name, table_name);+
    +          }+
    +          void CreateReport()+
    +          {+
    +               int iField;+
    +               // create ado.net dataset+
    +               CreateData();+
    +               // create report client document+
    +               m_crReportDocument = new ReportClientDocument();+
    +               m_crReportDocument.ReportAppServer = "127.0.0.1";+
    +               // new report document+
    +               m_crReportDocument.New();+
    +               // add a datasource using a schema file+
    +               // note that if you have distributed environment, you should use AddDataSourceUsingDataSet method instead.+
    +               // for more information, refer to comments on these methods.+
    +               AddDataSourceUsingSchemaFile(m_crReportDocument, xsd_path, "Customer", m_dataset);+
    +                              +
    +               // get Customer Name and Country fields+
    +               iField = m_crReportDocument.Database.Tables[0].DataFields.Find("Customer Name", CrFieldDisplayNameTypeEnum.crFieldDisplayNameName, CeLocale.ceLocaleUserDefault);+
    +               m_crFieldCustomer = (Field)m_crReportDocument.Database.Tables[0].DataFields[iField];+
    +               iField = m_crReportDocument.Database.Tables[0].DataFields.Find("Country", CrFieldDisplayNameTypeEnum.crFieldDisplayNameName, CeLocale.ceLocaleUserDefault);+
    +               m_crFieldCountry = (Field)m_crReportDocument.Database.Tables[0].DataFields[iField];+
    +               // add Customer Name and Country fields+
    +               m_crReportDocument.DataDefController.ResultFieldController.Add(-1, m_crFieldCustomer);+
    +               m_crReportDocument.DataDefController.ResultFieldController.Add(-1, m_crFieldCountry);+
    +               // view report+
    +               crystalReportViewer1.ReportSource = m_crReportDocument;+
    +          }+
    +          public Form1()+
    +          {+
    +               //+
    +               // Required for Windows Form Designer support+
    +               //+
    +               InitializeComponent();+
    +               // Create Report+
    +               CreateReport();+
    +               //+
    +               // TODO: Add any constructor code after InitializeComponent call+
    +               //+
    +          }+//=========================================================================

  • How can I create a new mail custom form shortcut ?

    Hello everyone !
    It's been three hard day of searching for such a simple question:
    How can I add a button to Outlook's ribbon that select a new pre-define form to send ?
    I already have the button but I miss an instruction like that:
    Create new mail with the form located here
    Thank you in advance for helping :D
    (And sorry if there is a mistake, English is not my native language)

    Hello Dark,
    private void CreateMailItem()
    Outlook.MailItem mailItem = (Outlook.MailItem)
    this.Application.CreateItem(Outlook.OlItemType.olMailItem);
    mailItem.Subject = "This is the subject";
    mailItem.To = "[email protected]";
    mailItem.Body = "This is the message.";
    mailItem.Importance = Outlook.OlImportance.olImportanceLow;
    mailItem.Display(false);
    Outlook forms are associated with items based on the message class values. To get a specific inspector window displayed you need to create an Outlook with the associated message class.
    VSTO provides two different ways for customizing the Fluent UI:
    1. Using the ribbon designer: Walkthrough: Creating a Custom Tab by Using the Ribbon Designer .
    2. A raw XML markup: Walkthrough: Creating a Custom Tab by Using Ribbon XML

  • Create a JTable based on an ArrayList containing instances of a class.

    I have a class, IncomeBudgetItem, instances of which are contained in an ArrayList. I would like to create a JTable, based on this ArrayList. One variable is a string, while others are type double. Not all variables are to appear in the JTable.
    The internal logic of my program is already working. And my GUI is largely constructed. I'm just not sure how to make them talk to each other. The actually creation of the JTable is my biggest problem right now.

    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.util.ArrayList;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.table.AbstractTableModel;
    public class TableDemo extends JPanel {
         private boolean DEBUG = false;
         public TableDemo() {
              super(new GridLayout(1, 0));
              ArrayList<MyObject> list = new ArrayList<MyObject>();
              list.add(new MyObject("Kathy", "Smith", "Snowboarding", new Integer(5),
                        new Boolean(false)));
              list.add(new MyObject("John", "Doe", "Rowing", new Integer(3),
                        new Boolean(true)));
              list.add(new MyObject("Sue", "Black", "Knitting", new Integer(2),
                        new Boolean(false)));
              list.add(new MyObject("Jane", "White", "Speed reading",
                        new Integer(20), new Boolean(true)));
              JTable table = new JTable(new MyTableModel(list));
              table.setPreferredScrollableViewportSize(new Dimension(500, 70));
              table.setFillsViewportHeight(true);
              // Create the scroll pane and add the table to it.
              JScrollPane scrollPane = new JScrollPane(table);
              // Add the scroll pane to this panel.
              add(scrollPane);
         class MyObject {
              String firstName;
              String lastName;
              String sport;
              int years;
              boolean isVeg;
              MyObject(String firstName, String lastName, String sport, int years,
                        boolean isVeg) {
                   this.firstName = firstName;
                   this.lastName = lastName;
                   this.sport = sport;
                   this.years = years;
                   this.isVeg = isVeg;
         class MyTableModel extends AbstractTableModel {
              private String[] columnNames = { "First Name", "Last Name", "Sport",
                        "# of Years", "Vegetarian" };
              ArrayList<MyObject> list = null;
              MyTableModel(ArrayList<MyObject> list) {
                   this.list = list;
              public int getColumnCount() {
                   return columnNames.length;
              public int getRowCount() {
                   return list.size();
              public String getColumnName(int col) {
                   return columnNames[col];
              public Object getValueAt(int row, int col) {
                   MyObject object = list.get(row);
                   switch (col) {
                   case 0:
                        return object.firstName;
                   case 1:
                        return object.lastName;
                   case 2:
                        return object.sport;
                   case 3:
                        return object.years;
                   case 4:
                        return object.isVeg;
                   default:
                        return "unknown";
              public Class getColumnClass(int c) {
                   return getValueAt(0, c).getClass();
          * Create the GUI and show it. For thread safety, this method should be
          * invoked from the event-dispatching thread.
         private static void createAndShowGUI() {
              // Create and set up the window.
              JFrame frame = new JFrame("TableDemo");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              // Create and set up the content pane.
              TableDemo newContentPane = new TableDemo();
              newContentPane.setOpaque(true); // content panes must be opaque
              frame.setContentPane(newContentPane);
              // Display the window.
              frame.pack();
              frame.setVisible(true);
         public static void main(String[] args) {
              // Schedule a job for the event-dispatching thread:
              // creating and showing this application's GUI.
              javax.swing.SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        createAndShowGUI();
    }

Maybe you are looking for

  • ITunes won't let me download music just says error retry

    When I go into iTunes it lets me purchase songs but when it downloads it fails at the end and comes up with a error message

  • Preview monitor for FCP

    I have two 20" cinema displays powered by an ATI 1900 display card and would like to have a third monitor for preview. Can I put in another display card and route the realtime display to this card and monitor? If this is possible what recommendation

  • Report 9i performance on Web Application

    I've developed a report using Report Builder 9i. The report run smoothly in the builder, but it takes a very very long time to execute when called from web application. I've tried to execute the report's SQL statement in SQLPlus to see whether there

  • Tab in Adobe forms

    Hello, Has anyone used Tabs in adobe forms to switch between windows/screens? Is it possible? Thanks, Bala

  • BDC_INSERT Problem

    hi, I am trying to create BDC program using transaction fv50. when i am execute the program,it is giving error like "BDC_INSERT,SCREEN.& IS INVALID". Will you plz tell me what's the reason . Thanks in Advance... Anjali Samadhiya.