Change XSD / XML dataset during runtime and display texts in field explorer

Hi there,
I am changing the datasource of a report during runtime. Afterwards, I would like to change the texts of the fields appearing in the field explorer.
I tried:
CrystalDecisions.ReportAppServer.DataDefModel.XMLDataSetClass xmlDS =
new CrystalDecisions.ReportAppServer.DataDefModel.XMLDataSetClass();
byte[] xmlContent = reportContent.getXmlContent();
byte[] xsdContent = reportContent.getXsdContent();
CrystalDecisions.ReportAppServer.CommonObjectModel.ByteArray xmlData =
new CrystalDecisions.ReportAppServer.CommonObjectModel.ByteArray();
CrystalDecisions.ReportAppServer.CommonObjectModel.ByteArray xsdData =
new CrystalDecisions.ReportAppServer.CommonObjectModel.ByteArray();
xmlData.ByteArray = xmlContent;
xmlDS.XMLData = xmlData;
xsdData.ByteArray = xsdContent;
xmlDS.XMLSchema = xsdData;
rasDoc.DatabaseController.SetDataSource(xmlDS, "", "");
rasDoc.Database.Tables[0].Description = "POMMES";
for (int i = 0; i < rasDoc.DatabaseController.Database.Tables[0].DataFields.Count; i++)
rasDoc.Database.Tables[0].DataFields.Name = "TEST";
MessageBox.Show(rasDoc.Database.Tables[0].DataFields.Name);
rasDoc.Database.Tables[0].DataFields.HeadingText = "HOORAY";
rasDoc.Database.Tables[0].DataFields.Description = "NOPE";
MessageBox.Show(rasDoc.Database.Tables[0].DataFields.Description);
MessageBox.Show(rasDoc.Database.Tables[0].DataFields.HeadingText);
When running this, the message boxes include the right strings I set before but when this is done, the filed explorer still shows no changes. What am I doing wrong?
Also, I would like to change the field texts that are displayed in the field explorer. How can this be done?
Thanks,
Pascal

Also, I do not understand why I am not able to change the display of the fields in the filed explorer.
This coding does not change a bit, but why??
//preparation
string tableName = reportDataSet.Tables[0].TableName;
              // Get the table definition exactly like the definition of my own dataset.
              CrystalDecisions.ReportAppServer.DataDefModel.Table table = GetTable(tableName);
              table.ConnectionInfo = connectionInfo;
              //delete all existing tables if there are any
              foreach (CrystalDecisions.ReportAppServer.DataDefModel.Table oldTable in rasDoc.DatabaseController.Database.Tables)
                  rasDoc.DatabaseController.RemoveTable(oldTable.Name);
              //add my new table with the IDs of the XSD
              rasDoc.DatabaseController.AddTable(table, null);
              //now I want to change the displayed fields texts
              CrystalDecisions.ReportAppServer.DataDefModel.Tables modifyTables =
                  rasDoc.DatabaseController.Database.Tables;
              CrystalDecisions.ReportAppServer.DataDefModel.Table myTable =
                  (CrystalDecisions.ReportAppServer.DataDefModel.Table)modifyTables[0];
              Fields fields = myTable.DataFields;
              for (int i = 0; i < fields.Count; i++)
                  ISCRField field = fields<i>;
                  ResultFieldController resultFieldController =
                     rasDoc.DataDefController.ResultFieldController;
                  try
                      resultFieldController.Remove(field);
                      string sText = "";
                      sText = "Bäschreibung" + i.ToString();
                      field.Description = new string(sText.ToCharArray());
                      sText = "Häding" + i.ToString();
                      field.HeadingText = new string(sText.ToCharArray());
                      //sText = "Näme" + i.ToString();
                      //field.Name = new string(sText.ToCharArray());
                      resultFieldController.Add(-1, field);
                  catch (Exception exp)
                      MessageBox.Show(exp.Message);
I am completely stuck.
Thanks for any help.
Pascal
Edited by: Pascal Schmidt-Volkmar on Sep 30, 2008 9:31 AM

Similar Messages

  • How to retrieve xml file from BLOB and display on browser with css/xslt

    Hi All,
    I am new to xml. I am storing my xml file into BLOB in database. Now in my jsp page I want to retrieve this xml file from BLOB and display in HTML/CSS/XSLT form...
    Pl. guide me.. any docs..?? Logic...??
    Thanks in Advance.
    Sandeep Oza

    Hello Sandeep!
    I'm not familiar with jsp but logic should be as follows:
    -in jsp page instantiate XML parser
    -load specified BLOB into parser
    Now you may traverse the XML tree or you might load XSL file and use transform method to transform XML according to XSL file.
    I have an example where I'm selecting XML straight from relational database and then transform it using XSL into appropriate HTML output, but it's written in PSP.
    You can try http://www.w3schools.com/default.asp for basics on XML, CSS, XSL. It's easy to follow with good examples.
    Regards!
    miki

  • How do I change the size of the tools and the text for the menus in Photoshop?  I need a magnifying glass in order to make out what they are.

    How do I change the size of the tools and the text for the menus in Photoshop?  I need a magnifying glass in order to make out what they are.

    Okay, I've figured it out, so I'm going to answer my own question in hopes that it may help anyone else that would like to actually be able to see what they're doing when using Photoshop CC 2014 on a high resolution screen.
    1.  Open Photoshop.
    2.  Select Preferences from the Edit Menu, then select General.
    3.  Change the HUD Color Picker to Hue Strip (Medium).
    4.  Select Interface from the Preferences menu on the left side of the dialog box.
    5.  Change the UI Font Size to Large in the Text area of the Preferences dialog box.
    6.  Select Experimental Features from the Preferences menu on the left side of the dialog box.
    7.  Select Scale UI 200% for high-density displays (Windows only).
    8.  Click on OK, then Exit/Quit Photoshop.
    9.  Open Photoshop and everything should be readable.

  • How do you change the color of the sign and fill text to the color blue

    How do you change the color of the sign and fill text to the color blue in a pdf document

    Is this using the "Fill & Sign" tab of https://cloud.acrobat.com/fillsign (for now text input is only black) or maybe using the Fill & Sign tool in Adobe Reader XI, or another application? 
    Thanks,
    Josh

  • Changing type of process during runtime

    hi to all/Mike/Antony
    is there anyway to change a sync process to async during runtime?
    thnx in advance
    KAM

    hi
    sorry for making confusion by putting a (little) wrong question because of being in a hurry...
    it was supposed to be that " is there anyway to change the type of the process from async to sync after executing the process"
    i m sorry for taking ur time by putting a wrong question!
    actually i made a sync process of "HelloWorld " but mistakenly declared its type as "async" and it did not generate the required output, because it was an async process and i was treating it as a sync one!
    thanks for ur interest. i'll write, as i find the solution.
    KAM.

  • Change Chart background color during runtime

    I want to change the background color of my chart during runtime.
    I can set and read-out the color with a property node but the apperance on the frontpanel is not changing.
    After stopping the VI the chart suddenly gets updated.
    Please check my VI attached.
    Do someone knows a workaround?
    Attachments:
    chart.vi ‏9 KB

    Hello Robert,
    another option would be to place (for example) a vertical smooth box behind the chart and change the color of it.
    See my attachment.
    Best regards
    Attachments:
    Change chart background color.vi ‏12 KB

  • Changes to xml dataset not showing up on webpage

    Using spry, I added a spry:region to my home page that uses an xml dataset to post special announcements on the page. Since the people that maintain this are not technical I want to give them an easy way to post their announcement and the xml file makes a lot of sense. It will be easy for them to post their "School CLOSED today due to snow" announcement.
    So the whole spry dataset works great except that when I update the xml file, the new content does not show up on the web page. I assume its something to do with cache. I did select the no cache option. If I delete the temp files from the browser I can see the changes. This is obviously a problem. I need the changes to appear on the website when the xml file is updated. Is there some way to force the webpage to recreate the dataset everytime the page is loaded? or some other work around that will do what we need?
    You can see the page at www.tribecacommunityschool.com. At this moment there is a school closing announcement up. It may not be up tomorrow but the code will still be on the page if you want to view it.
    Thanks for any help. I did see a post from 2007 that asked this same question and there were no responses. I'm hoping for better luck and a slightly faster turn around.

    Thanks for the help... This additional explanation on Phil_W's post gave me what I need and the refresh works great.
    testxml.js
    var dsData = new Spry.Data.XMLDataSet("testxml.xml?cache=" + (new Date()).valueOf(), "/data/info", {useCache:false,  method:'GET'});
    var dsOne = new Spry.Data.XMLDataSet("testxml.xml?cache=" + (new Date()).valueOf(), "/data/info/one", { subPaths: ["test" ], useCache:false,  method:'GET'});
    function RefreshMe()
         var auctionxml = 'testxml.xml?cache=' + (new Date()).valueOf();
         dsData.setURL(auctionxml);
         dsData.loadData();
          dsOne.setURL(auctionxml);
         dsOne.loadData();
    testxml.xml file -------
    <?xml version="1.0" encoding="UTF-8"?>
    <data>
      <info id="1">
        <one>
          <test>test me sdfsdf</test>
        </one>
      </info>
    </data>
    html file----------
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type='text/javascript' src="jquery.js"></script>
    <script language="JavaScript" type="text/javascript" src="SpryAssets/xpath.js"></script>
    <script language="JavaScript" type="text/javascript" src="SpryAssets/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript" src="SpryAssets/SpryEffects.js"></script>
    <script language="JavaScript" type="text/javascript" src="testxml.js"></script>
    </head>
    <body >
    <div class="SpryHiddenRegion" spry:region="dsOne">
      <div id="test">{dsOne::test} </div>
    </div>
    <script language="JavaScript">
    // Switch on Refresh of auction data
    var AuctionInterval = 0;
    AuctionInterval = setInterval ( 'RefreshMe()', 5000 );
    </script>
    </body>
    </html>

  • Spry xml dataset driven page and search engines

    If a page uses Spry xml dataset to present products to a
    visitor, what do google and yahoo crawlers see in that page?
    I'm asking because i plan to rewrite our products' static
    pages using spry xml dataset, and i'd like to ensure crawlers see
    the products. I haven't looked much, yet, into this pry capability,
    but the products page will most probably be paginated (not sure if
    possible in this capability) since there are hundreds of products.
    currently, our static html pages generated good conversions
    into purchases from google and yahoo searches.
    It would be great if there is a real-life website that uses
    this spry capability and has their pages appear in those search
    engines.
    thanks.

    If a page uses Spry xml dataset to present products to a
    visitor, what do google and yahoo crawlers see in that page?
    search bot do not read / understand javascript. So they would
    not index it.
    Its a commen point of failure of the ajax techniques, Spry
    has a handy solution for it (spry:content) wich will allow u to
    overwrite 'content' if javascript is enabled so and bots will just
    see the static page.

  • How to get selected item value and display text in selectOneChoice ?

    Hi
    Thank you for reading my post
    I bind the a selectOneChoice component to my backing bean so i have an object which represent this component in the backing bean.
    now i need to find which item is selected by use , i know that i can use
    getSelect_service().getValue.toString() , but it will return the value of the selected item, how about its display text ?
    I should say that i create an static list for selectOneChoice items.
    thanks

    Using JDeveloper 10.1.3.1, freshly downloaded off OTN. I used the following code to try and identify the problem you are encountering. I attempted to use a valueChangeListener in combination with af:selectOneChoice components that use SelectItems and the singular SelectItem. I could not reproduce the error in either case. Please post more information about your development environment.
              <af:selectOneChoice label="Label 1"
                                  binding="#{backing_test.selectOneChoice1}"
                                  id="selectOneChoice1"
                                  valueChangeListener="#{backing_test.valueChangeListener}"
                                  autoSubmit="true" immediate="true">
                <af:selectItem label="1" value="1"
                               binding="#{backing_test.selectItem1}"
                               id="selectItem1"/>
                <af:selectItem label="2" value="2"
                               binding="#{backing_test.selectItem2}"
                               id="selectItem2"/>
                <af:selectItem label="3" value="3"
                               binding="#{backing_test.selectItem3}"
                               id="selectItem3"/>
              </af:selectOneChoice>
              <af:selectOneChoice label="Label 2"
                                  binding="#{backing_test.selectOneChoice2}"
                                  id="selectOneChoice2"                              valueChangeListener="#{backing_test.valueChangeListener}"
                                  autoSubmit="true" immediate="true">
                <f:selectItems value="#{backing_test.items}"
                               binding="#{backing_test.selectItems1}"
                               id="selectItems1"/>
              </af:selectOneChoice>
        public void valueChangeListener(ValueChangeEvent evt){
            // returns a UISelectOneChoice object
            System.out.println(evt.getSource().getClass().getName());
            // returns a string
            System.out.println(evt.getNewValue().getClass().getName());
        public Map getItems(){
            items = new HashMap();
            items.put("11","11");
            items.put("12","12");
            items.put("13","13");
            return items;
        }

  • How do I change the Gradient in the Artwork and Effect Text tool

    How do I change the colors used in the gradient under the Artwork and Effects Text Tool? It always comes green and blue and I dont know how to change it.

    Gradient usually picks up the foreground & background colors from the chips in the tool bar, but that is for the default gradients. Sounds like you have one of the pre-set gradients selected in the drop down list in the gradient options bar. Select the gradient tool, then look in the options bar at the top of the screen. The second item from the left, if I remember correctly, is a drop down list of various gradient possibilities. Select the top left gradient sample for the foreground to background gradient.
    Bob Warren

  • How to change the font, the font size, and color text

    How to change the font, the font size, and the color for a selected text in C++.
    David

    Look at the documentation in the SDK about how to build a plugin and then the PDEdit APIs available to them.

  • Change webdynpro element position during runtime.

    Hi Experts,
    For one SAP standard screen there are 4 input field in the webdynpro view. Is it possible to change the position/order of these standard elements by enhancement or during run time?
    Thanks

    Hi Srinivas
    Yes, this is possible !
    You can create a component configuration(CC) from the context menu of the related Web Dynpro Component (Create/Change Configuration).
    Enter an id for new CC eg., ZTEST and click Create.
    In the next screen, click on the last tab labeled Web Dynpro Built-In. Hierarchy of UI elements will be displayed. Click on the Container UI element that contains your 4 input fields and then click on Re-sort link that appears on the right hand side. Now you can sort the input fields. Save your Comp Config. Run the standard WD application using newly created comp config by passing parameter 'ZTEST' in the URL.
    Hope this helps.
    Regards
    Lorraine

  • Changing layout of ALV to excel and displaying the data there

    Dear All,
    My requirement is that I have to develop an ALV report, and also plot the graphs for the same.
    I need different types of graphs, so I have searched on SDN, and I found out a blg:-
    "Report with a Graph.. An Approach!"
    Here is what the person has done:-
    I developed a simple ABAP report using ALV and just dumped all my data on it.
    After this I downloaded the Standard Excel template available in the ALV.
    Defined my own worksheets in this template, wrote some macros to pick up the data from the “RawHeader” sheet, which is available by default and will contain the ALV data.
    I inserted 1 chart in this Excel template. In this chart I used the same chart type as was being used by the user for his graph. Just right clicked on the Graph area and made the changes in the source data and made it point to the sheet containing the final data.
    That’s it my job is almost done.
    After this uploaded this template back into the report output through
    the layout settings->Change Layout Tab.
    Save it as a variant and made it a default. (Do not default it if you have more than 1 user and more than 1 template…. Select the appropriate variant for the appropriate user and then display)
    Well, this also was not that easy as I had thought. I landed up into 1 trouble.
    In my report the number of columns displayed was not constant and kept changing based on the input. This fact was taken care by designing a variable field catalogue. But now I had gone past the simple ALV display and was giving the output in an Excel sheet using a pre-defined template. Well, I immediately found a solution to this with the set_frontend_fieldcatalogue method of CL_GUI_ALV_GRID class and fixed the field catalogue every time after calling the set_table_for_first_display method. This solved most of my problems, which were not many though.
    Now here are my issues:-
    I have developed the ALV report, and I have also changed the layout to excel.
    But, I am unable to get the ALV Report data in the RawHeader Sheet, which is available by default.
    Could anyone please guide me through this method??
    It is urgent.
    Points are assured for helpful answers.
    Thanks and regards,
    Prerna

    Hi Satya Priya,
    Do I have to create my own template, or the Standard ones available will do?
    HEre is what I do:-
    Once I get my ALV output, I goto Change LAyout->View tab.->Prefered view->Microsoft Excel.
    Here I get a list of available excel templates There are 2:-
    sap_mm.xls, and sap_om.xls
    I select one of these, and the excel spreadsheet is displayed on the ALV screen.
    But the re is another button, "Upload Document to BDS".
    Do I have to upload one of the above templated to BDS?
    And please tell me in detail, what is BDS???
    Thanks for your help, and waiting for reply,
    Prerna

  • JAVA Mapping for XML conversion during runtime

    Dear SAP JAVA experts,
    For quite I have been struggling to keep the JAVA code in place for JSON to XML conversion being a newbie.
    Following is the code snippet.
    import java.io.InputStream;
    import net.sf.json.JSON;
    import net.sf.json.JSONSerializer;
    import net.sf.json.xml.XMLSerializer;
    import org.apache.commons.io.IOUtils;
    import com.sap.aii.mapping.api.AbstractTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.TransformationInput;
    import com.sap.aii.mapping.api.TransformationOutput;
    import com.sap.aii.utilxi.core.io.IOUtil;
    public class RuntimeJSONtoXML extends AbstractTransformation {
      public void transform(TransformationInput input, TransformationOutput output)
      throws StreamTransformationException {
      try
    //InputStream is = JSONtoXML.class.getResourceAsStream("JSON.txt");
       String strJSON = "";
       InputStream inputStream = input.getInputPayload().getInputStream();
       inputStream.close();
       String jsonData = IOUtils.toString(strJSON);
               XMLSerializer serializer = new XMLSerializer();
               JSON json = JSONSerializer.toJSON( jsonData );
               String xml = serializer.write( json );
               //System.out.println(xml);
               output.getOutputPayload().getOutputStream().write(strJSON.getBytes());
      catch(Exception ie) { }
    Caught unaware of 2 queries.
    1.I have added the com.sap.aii.utilxi.core.io.IOUtil jar files from the PI server even though its displays error "The com.sap.aii.utilxi can not be resolved". Also I added the XPI libraries in NWDS but nothing moving to solve the issue.
    2. I have commented the line of code where I have placed a test file in the path to test it i.e. JSON.text. But when it is deployed as Archived files, then this code has to be replaced.
    The Method toString(InputStream) in the type IOUtils is not applicable for the arguments (String)
    Regards
    Rebecca..

    1.I have added the com.sap.aii.utilxi.core.io.IOUtil jar files from the PI server even though its displays error "The com.sap.aii.utilxi can not be resolved". Also I added the XPI libraries in NWDS but nothing moving to solve the issue.
    Which jar file did you add?
    /usr/sap/<<SID>>/DVEBMGS<<SYSNO>>/j2ee/cluster/bin/ext/com.sap.xi.util.misc/lib
    jar file name : com.sap.aii.utilxi.core.jar
    2. I have commented the line of code where I have placed a test file in the path to test it i.e. JSON.text. But when it is deployed as Archived files, then this code has to be replaced.
    The Method toString(InputStream) in the type IOUtils is not applicable for the arguments (String)
    To read the input stream you should have
    InputStream inputstream = transformationInput.getInputPayload().getInputStream();
    Please refer to below blog just to get an idea on working with input stream and output stream.
    Dynamic file name for pass-through scenario - Process Integration - SCN Wiki

  • Search the xml node by attributes and display the entire row

    I am having a table with two columns say
    school_name string type
    student_notebookprice xmldata
    how do i search with oracle query having student_id=102 and schoolname="abc_school" with notebook price 20, how do i get only one single row
    abc_school,
    <students>
         <student id="101">
         <notebookprice>12</notebookprice>
         </student>
         <student id="102">
              <notebookprice>20</notebookprice>
              <notebookprice>30</notebookprice>
              <notebookprice>40</notebookprice>
    </student>
    </students>
    def_school,
    <students>
         <student id="301">
         <notebookprice>10</notebookprice>
         </student>
         <student id="302">
              <notebookprice>15</notebookprice>
              <notebookprice>16</notebookprice>
    </student>
    </students>

    yes . what i want based on search criteria i need to display that row . initially i have tried with the below query
    SELECT school_name,
    extractvalue(value(x), '//id') as student_id ,
    extractValue(value(x), '//teacher') AS teacher
    FROM school t ,
    TABLE( XMLSequence( Extract(t.obj_xml, '/students/student[id=101 and teacher="abc"]'))) x
    where existsNode(t.obj_xml, '/students/student[id=101 and teacher="abc"]') = 1
    but when i want to add the second student in the search , i am failed to produce the second student information in the output and i can able to add it to where clause and but how to display the student info in the output . The xmltable option that u have specified looks good but what i fear is , it produce multiple combination with all the tags in the xml with the other columns in the table . will it cause any performence issue .
    <students>
    <student >
    <id>101</id>
    <teacher>abc</teacher>
    </student>
    <student >
    <id>102</id>
    <teacher>xyz</teacher>
    <teacher>onp</teacher>
    <teacher>rsm</teacher>
    </student>
    </students>
    SELECT school_name,
    extractvalue(value(x), '//id') as student_id ,
    extractValue(value(x), '//teacher') AS teacher
    FROM school t ,
    TABLE( XMLSequence( Extract(t.obj_xml, '/students/student[id=101 and teacher="abc"]'))) x
    where existsNode(t.obj_xml, '/students/student[id=101 and teacher="abc"]') = 1
    and existsnode(t.obj_xml, '/students/student[id=102 and teacher="xyz"]') = 1

Maybe you are looking for

  • IPhone 5 long voice memos not synced in iTunes

    Hi, Today, I've recorded 3 voice memo longer than 3 hours long on my iPhone 5, iOS8. I've checked "sync Voice Memos" in the Music tab of iTunes 11.4 sync, but those new memo don't get synced. By the way, looking into the "on my iPhone" tab, I can't s

  • V3424TU. could not install SP35682 on WindowsXP-SP3. Audio not working

    Hi All, I just installed my v3424TU with Windows XP - SP3.  i installed the Microsoft UAA Audio (SP33566) from HP website. and its a successfull, whle installing SP35682 (Conexant Audio)  it comes with an error "Driver Installation Failed: Could not

  • How to set up a language for Safari 4

    Hi I've installed Safari 4 on Windows Vista, I have my OS in Spanish but I want to set up Safari in English, how could I do this?

  • Change the permission That limit viewing

    Hi, my sister have downloaded a book from Archambeault with adobe digital edition id. She Made i mistake n'y clicking " to be viewed by only one device." Nos she would Like to transfert her ebook on her ebook reader but the ebook reader can not read

  • Loader Won't Load on All Pages

    Hey everyone, Here is my problem. I am creating a website that has four different pages with two different pages that load pictures into a loader. Right now, everything is loading fine, but when I go to the frames (i.e. other pages of the website) wh