Export to XML totals from a datawindow

I have the following situation: a datawindow has 2 groups,
no display detail, my "detail" are the totals of trailer
group 2. When exporting this dw to XML records the totals of
group 2 but it repeats for each detail record, this is, I
have 2 records with value of 10, the total is 20, but it
records 2 times. what I'm making wrong?

Thanks everybody

Dave
0
David
4/29/2010 12:33:41 AM
sybase.powerbuilder.xml 546 articles. 0 followers. Follow

2 Replies
418 Views

Similar Articles

[PageSpeed] 2

If you look at the XML template panel of your DataWindow you see the XML 
structure as a tree view.
That XML tree may tell you what happens.

I've created quite a few XML templates in the DataWindow painter even some 
tricky ones with four level nested DataWindows for collections within 
collections of data. I learned a lot by looking at the default XML template 
created by the DataWindow painter automatically and then building my own 
templates manually one XML element at a time; experimenting with the 
different properties that direct the DataWindow engine on what to repeat for 
each row and each group.

HTH
/MicKr-

<David Ochoa> wrote in message news:4bd8d3e5.7856.1681692777@sybase.com...
>I have the following situation: a datawindow has 2 groups,
> no display detail, my "detail" are the totals of trailer
> group 2. When exporting this dw to XML records the totals of
> group 2 but it repeats for each detail record, this is, I
> have 2 records with value of 10, the total is 20, but it
> records 2 times. what I'm making wrong?
>
> Thanks everybody
>
> Dave 


0
Michael
5/6/2010 7:28:00 PM
OK, now the question is: can I use the Trailer Group instead
of the Header Group?

> If you look at the XML template panel of your DataWindow
> you see the XML  structure as a tree view.
> That XML tree may tell you what happens.
>
> I've created quite a few XML templates in the DataWindow
> painter even some  tricky ones with four level nested
> DataWindows for collections within  collections of data. I
> learned a lot by looking at the default XML template
> created by the DataWindow painter automatically and then
> building my own  templates manually one XML element at a
> time; experimenting with the  different properties that
> direct the DataWindow engine on what to repeat for  each
> row and each group.
>
> HTH
> /MicKr-
>
> <David Ochoa> wrote in message
> news:4bd8d3e5.7856.1681692777@sybase.com... >I have the
> > following situation: a datawindow has 2 groups, no
> > display detail, my "detail" are the totals of trailer
> group 2. When exporting this dw to XML records the totals
> > of group 2 but it repeats for each detail record, this
> > is, I have 2 records with value of 10, the total is 20,
> > but it records 2 times. what I'm making wrong?
> >
> > Thanks everybody
> >
> > Dave
>
>
0
David
5/11/2010 4:07:15 PM
Reply:

Similar Artilces:

XML in, XML out
Hi All (and a happy holiday to those that will get a break), I am trying to read in an XML file of addresses. I need to remove all the address data from the file where code =~ /^000/ (there are none in the example data below). I need to reproduce that data 'as is', so I need to honour the tag structure, although the order of the tags doesn't need to be honoured. I have been trying to use XML::Simple and I had a go with XML::Smart but I haven't been able to get the results I want. My best effort is below (with XML::Simple). There are a couple of differences I can't seem to get around. 1) How to get a name on the anon tags (<anon> should be <address>) . 2) how to get the number data as an attribute or a tag. My script effort is below also. If anyone know of any options with XML::Simple that will help please let me know. Failing that, any other suggestions on how to tackle the problem would be appreciated. TIA, Dp. ======== my script ================ #!/usr/bin/perl use strict; use warnings; use XML::Simple; use Data::Dumper; my $fh = shift; my $out = 'Addresses-no-phgr.xml'; my $xml = eval {XMLin($fh, SuppressEmpty => 1)}; my @addresses; my $c = @{$xml->{'address'}}; for (my $i = 0; $i < $c; ++$i) { my %hash; my %lines; print $xml->{'address'}->[$i]->{'code'}."\n"; my @add_lines; if ( $...

XMl to XML
Hello,   I retrieved an XML from the dataset which retrieves data from the table in the database. I need to present the data  in a different structure. Is XSLT the way or are there any other options. please let me know. Thanks!! Yes XSLT is a good choice to convert xml file to other forms. You can take a look at XSLT Tutorial.Sincerely,Young Fang...

1 Xml -> 2 DataWindows; 2 DataWindows -> 1 Xml
Hi Is it possible to import an Xml file like <data> <dataX>...</dataX> <dataV>...</dataV> <dataV>...</dataV> <dataV>...</dataV> ... <dataV>...</dataV> </data> to one Datawindow ? On the other hand is it easily possible to assemble data from two Datawindows in one XML file ? thanks Thomas Kovasits Thomas Kovasits wrote: > Hi > Is it possible to import an Xml file like > <data> > <dataX>...</dataX> > <dataV>...</dataV> > &l...

Export datawindow to xml
I want export a datawindow (no web datawindow) with rows to xml and then import in other datawindow with other layout specified in xsl file Can I do this? Thank you. Umberto. The DataWindow has (provided you're on PB9 or later) XML import and export capability. On 12 Jun 2008 03:58:58 -0700, "Umberto Liguori" <umberto.liguori@soft2000.it> wrote: >I want export a datawindow (no web datawindow) with rows to xml and then >import in other datawindow with other layout specified in xsl file >Can I do this? > >Thank you. > > ...

XML::Parser XML::DOM XML::XSLT
------_=_NextPart_001_01C6E0D0.3E27D77A Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Hi Craig and fellow VMS Perlers, You last wrote about this Fri 3/16/2001 11:24 AM, not counting your very helpful comments on Eisner/Decuserve more recently. One of my colleagues sent me an email requesting that I make XML::XSLT=20 available on VMS. perl 5.8.6, VMS 7.3-2, DECC 7.1 latest ACRTL (version 3) on Alpha XML::XSLT (version 0.48) depends on XML::Parser (version 2.34). This depends on expat (version 2.0.0). I built expat a...

How to select Xml as Xml?
If I select Xml nodes like this from sql server; select xmlData.query('//Field[@F = "True"]') as extendedInfo from.... ..how to loop through the items in C#? I can't cast it to a System.Xml.XmlNodeList..? You can use the XmlDocument class.  There's a Load method and a LoadXml method.  One of these should get you what you want, after which you can select nodes as you need.C# <---> VB.Net Translator mm8: If I select Xml nodes like this from sql server; select xmlData.query('//Field[@F = "True"]') as extendedInfo from.... ...

sort xml in xml
Hi, How I can sort xml file in xml with VB.NetThanks,<?xml version="1.0" encoding="ISO-8859-1" ?>  <Liste>   <Form Famille="Administration" idXhtml="" idOffice="31574" nom="ADM" desc="" />   <Form Famille="Admini" idXhtml="" idOffice="31708" nom="ADM- 54 (2000)" desc="" />   <Form Famille="communication" idXhtml="" idOffice="31709" nom="ADM- 133 (2000)" desc="" />   <Form Famille="Admini" idXhtml="" idOffice="31710" nom="ADM- 9 (2000)" desc="" />   <Form Famille="Admini" idXhtml="" idOffice="31711" no...

Exporting crosstab datawindow to XML
I need some help from the datawindow experts on this one. It may be easiest to start with what my data looks like and what I want my export to look like, so here goes. Table structure: date_time dist_num cust_cnt Row data from a "select * from my_table" would look like this: 12/17/2006 12:00:00 01 3 12/17/2006 12:00:00 10 0 12/17/2006 12:00:00 15 0 ..... 12/17/2006 23:00:00 01 7 12/17/2006 23:00:00 10 8 12/17/2006 23:00:00 15 300 I want to be able to group my data by the date_time (hourly) and list all of my di...

XML Export Template question regard XML format
Hi. I am using the XML Export Template in PB9.0 to produce an XML file. So far so good. The only problem is that it is producing a XML file of the following form: <DOC_CAT Attribute="Y"> <![CDATA[ABS]]]> </DOC_CAT> I need to have everything on one line, i.e. <DOC_CAT Attribute="Y"><![CDATA[ABS]]]></DOC_CAT>. Is there some setting on the XML Export template I can use to achieve this? Any info would be greatly appreciated:) Make sure you uncheck the "Include Whitespace" option on the DataWindow Export tab, or alternatively, at runtime, set the Export.XML.IncludeWhitespace property in a dot notation or Modify syntax to "no". -- <hopethishelps/> Roy Kiesler [TeamSybase] SDN CodeXchange -- http://codexchange.sybase.com <Mark> wrote in message news:4043655e.28ff.846930886@sybase.com... > Hi. I am using the XML Export Template in PB9.0 to produce > an XML file. So far so good. The only problem is that it is > producing a XML file of the following form: > > <DOC_CAT Attribute="Y"> > <![CDATA[ABS]]]> > </DOC_CAT> > > I need to have everything on one line, i.e. > > <DOC_CAT Attribute="Y"><![CDATA[ABS]]]></DOC_CAT>. > > Is there some setting on the XML Export template I can use > to achieve this? > > Any info would be greatly appreciated:...

Export DataWindow Source in XML
I just noticed that in PB9 from the DataWindow painter if I do File->Save As File I have the option of saving the DataWindow Source in an XML format. Does anyone know of a way to do this programatically (Library Export just creates .srd files)? Also, do any of the existing DW methods support creating a datawindow from imported DW Source stored as XML? The exported XML does not have a schema referenced, is the DataWindow schema available? If not, any way to make this happen? Doug Porter DailyAccess Corporation I'm not an expert in this area so please forgive if I lea...

Transform XML to XML
I've been trying to transform an XML document to another XML document. The original document is very large (6megs) and the application that needs to use it only needs a fraction of the data. I'm trying to take this mother-of-all XML documents and filter out unwanted nodes. I could probably do this very easily with code by running a few XPath Queries against the document, and placing the results in a new document...however...I have an interest in learning how to do this with XSL. In the past, I've done some pretty basic XML to HTML transformation ans that worked out well. This ti...

XML export for group datawindow
I've created an external datawindow with 3 columns:loan_nbr, f_name, l_name with a group on loan_nbr column. The template is: -test1 -loan_info ------------ -loan_nbr column loan_nbr -borr_info -f_name column f_name -l_name column l_name I import this xml file: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <test1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="test1.xsd"> <lo...

XML to XML transform
Hi all, I have an XML file in which I just want to change a couple of values.  So, the end result is a new file with exactly the same XML structure.  I am new to XML and XSLT, so I thought I'd start off with something simple; I created an xsl file that would just copy the source directly across without modifying the values (I can do this later, once I have the first bit figured) - <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:con="http://eviware.com/soapui/config"><xsl:template match="/"...

XML Transform to 1 XML file to another XML File
Hello All  I am a novice programmer. I want to transform 1 xml file to another xml file. I am looking for a example code where user will select source xml file and create another xml file in different file with different fields with some default validation of parsing date and default values.  Can anyone help me or let me know any available source code in C#/ASP.Net?  Ms Disha I am assuming you know xslt, if not, you would have to go look at that.  But if you do, then this document will help you out http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=...

Convert datawindow to XML in Powerbuilder 7
how do I convert my datawindow to xml file? I am using powerbuilder 7. Thank =) You have two choices: 1. By hand. Loop through the rows and columns and parse the XML together. 2. Upgrade to PB9, which was when XML export was introduced as a native functionality. On Fri, 26 Sep 2008 00:28:19 -0700 (PDT), d3t <d3t21985@gmail.com> wrote: >how do I convert my datawindow to xml file? I am using powerbuilder 7. >Thank =) I guess I can't upgarde my pb7 to pb9 since all of our applications are already running in pb7. Upgarding might cause a lot of problems ...

datawindow.import(XML!,"file.xml") syntax error
I am using Pocket PowerBuilder 1.5 build 360 from the help file I saw [ImportFile method (DataWindows)] long dwcontrol.ImportFile ( {saveastype importtype}, string filename {, long startrow {, long endrow {, long startcolumn {, long endcolumn {, long dwstartcolumn } } } } } ) This statement inserts all the data in the file D:\TMP\EMPLOYEE.CSV into dw_employee starting at the first column: dw_employee.ImportFile("D:\TMP\EMPLOYEE.CSV") This statement inserts all the data in the file D:\TMP\EMPLOYEE.XML into dw_employee starting at the first column: dw_employee.ImportFile(XML!,"D:\TMP\EMPLOYEE") The following statements are equivalent. Both import the contents of the XML file named myxmldata: dw_control.ImportFile(myxmldata.xml) dw_control.ImportFile(XML!, myxmldata) However, when I using the similar coding in the program it an Illegal enumerated constant: xml error will show. at the line I coded like below when I save the source in the PPB IDE - Script Painter. dw_control.ImportFile(XML!, ls_xmlfilename) where ls_xmlfilename is the file name of the xml file. IS anything wrong in the script? look in the help: Pocket PowerBuilder Comma-separated and XML data are not supported in this release of Pocket PowerBuilder. Pip wrote: > I am using Pocket PowerBuilder 1.5 build 360 > > from the help file I saw > > > [ImportFile method (DataWindows)] > > lo...

XML Import Error
I created a simple dw and in the designer retrieved and saved rows as xml. When I try to import the rows, I get this error. XML Import Error - No matching datawindow column reference within XML template. Ay ideas? -- PB9.01.7151 Thank you, R.Chauvin Did you turn on the xml import tracing option? It should give you more information about what it doesn't like. On 2 Jul 2004 06:08:17 -0700, "Bob Chauvin \( Paix dehors \)" <nocanspambob_chauvin@yahoo> wrote: >I created a simple dw and in the designer retrieved and saved rows as xml. >...

PB 9.0 DataWindow XML Export
When exporting the datawindow, I got the following xml output with the <Order> node is repeating for Item id 1 and 2. The second output is what I expected. The "XML Features in PowerBuilder 9.0" White Paper mentions this will be fixed in the later release, but it seems that the latest EBF still hasn't fixed it. Is there a way around this? <Orders> <Customer id="101"> <Order id="2001"> <Item id="1"> <Qty>12</Qty> </Item> </Order> <Order id="2001"> ...

PB 9.0 and datawindow xml export
Hi I have the composite report in PB 9.0 It has 6 dataobject' s and i need to compose some data from different dataobject' s into one xml file. Is this possible or i have to make the new data window and collect all the data into it? Any examples? Thanks :) ...

Problem loading an xml string containing xml data into XML document
 Hi all,I have a problem loading an xml string containing xml response data returned by other server(spatial server) into XML document some times becoz the returned xml response contains special chars like <, >, ', etc.Is there any way to parse this XML response string before loading into XML document. Hi Bharath, if you can't find a ready made one you can write one yourself. Parse the string that you get for the elements that it would contain and inject the CDATA element between them to allow special character. example if you have a string <childNode>This con...

PB9/PB10: Error in Save As XML versus dw.Object.DataWindow.Data.XML
I'm having problems with saving a datawindow as XML. I've checked both PB9 and PB10, and I'm experiencing the same behavior: If you specify a different encoding set on the XML-template, this is corretly shown if you do a Save as XML on the datawindow. If you read out the property dw.Object.DataWindow.Data.XML, the encoding is not changed, it always says "UTF-16LE". If I change the property standalone (yes|no), this is correctly reflected on both Save As and retrieving the xml via dw.Object.DataWindow.Data.XML-property. I've saved the XML as an ...

Bugzilla 2.2x: Can I export all of my bugs into XML (bug-centric XML; no table-centric)
Background: * to migrate a customized 2.20 to 3.0 bugzilla. * remove the customizations in our new server (drop customized fields since no one really uses them) * restructure our classifications, layouts, and components So basically, I'm in the middle of a data migration as well as an upgrade. I'm trying to find the best way to migrate the old data to the new. My assumption that I'm operating with is that the customizations are forcing me to migrate the data just like I would if I were coming from a different bug tracking application. I don't think I like the ide...

XML::Parser XML::SimpleObject -> First XML parsing pls help
I took the example from http://www.xml.com/pub/a/2001/04/18/perlxmlqstart1.html I wanted something really simple for XML parsing that basically just reads values. But I'm stuck (again). #Here's what I'm trying to run: #!c:\perl\perl.exe use XML::Parser; use XML::SimpleObject; use strict; my $file = 'c:\perl\work\job001_card.xml'; my $parser = XML::Parser->new(ErrorContext => 2, Style => "Tree"); my $xso = XML::SimpleObject->new( $parser->parsefile($file) ); foreach my $mail ($xso->child('job_card')->children(&...

XML in Powerbuilder
Is there functionality in Powerbuilder 7 or 8 for XML? Where could I find out more about it? There is no built-in XML support in PB7 or 8. PB9 will feature an XML parse and XML export/import support in the datawindow/datastore. In the meantime, you are limited to string concatenation and using the Microsoft MSXML parser via OLE automation. -- <hopethishelps/> Roy Kiesler [TeamSybase] Sybase Developer Network -- http://sdn.sybase.com <Jonna> wrote in message news:64B2A31B812014050068302685256BF2.0068303885256BF2@webforums... > Is there functionality in Powerbuilder 7 or 8 for XML? Where could I find > out more about it? ...

Web resources about - Export to XML totals from a datawindow - sybase.powerbuilder.xml

PowerBuilder - Wikipedia, the free encyclopedia
PowerBuilder is an integrated development environment owned by Sybase , a division of SAP . It has been in use since 1991, peaking around 1998 ...

Intelligent Versus Surrogate Keys
Should I use business columns as primary key fields for tables in thedatabase, or generate artificial primary key values? When business-related ...

chevy volt
ProEXR File Description =Attributes= channels (chlist) compression (compression): Zip dataWindow (box2i): [0, 0, 5119, 2475] displayWindow (box2i): ...

Enable - A comprehensive solution for the localization of PowerBuilder applications Untitled Document ...
Enable is localization/ translation tool used by PowerBuilder developers to make their applications multilingual.Enable is a powerful tool that ...

comp.lang.clipper.visual-objects - Google Groups
comp.lang.clipper.visual-objects 1-20 von 33006 Themen werden angezeigt Integrity of a file marcosm...@gmail.com 09:35 Combobox value Lu 08:12 ...

Sybase PowerBuilder tool readied for Microsoft's .Net
Developers can choose Win32 or newer style .Net development

PowerToTheBuilder - PowerBuilder UI Controls
HOME - COMPONENTS - PB UI DESIGNER - DOWNLOAD\PURCHASE - SUPPORT - FAQ - ABOUT Take Control of your UI with PB Ultimate Suite PowerToTheBuilder.com ...

Beautiful iPad Mini 3 Concept Reimagines Appleā€™s Tablet With iPhone 6 Design, Gold Color [Images]
The iPhone 6 may be grabbing all of the recent headlines due to its impending announcement, but spare a thought for those who prefer to stay ...

Java Networking - Real's HowTo
Real's HowTo Custom Search Java Language String and Number Applet AWT Swing Environment IO Javascript interaction JDBC Thread Networking JSP ...

Business Intelligence Products - Database Management, Data Warehousing & Mobility Software - Sybase Inc ...
Sybase offers a variety of Business Intelligence (BI) software like products for database management, data warehousing and mining, data integration ...

Resources last updated: 3/30/2016 2:09:40 PM