Simple insert line in nested xml

I have this xml:

<?xml version="1.0" encoding="utf-8"?>
    <GRLog xmlns="http://www.digiexpress.com.br/grlog">
        <Dados>
            <Empresa>00.000.000/0000-00</Empresa>
        </Dados>
        <Viagens>
            <Viagem uID="0" QtViagens="0" FrmAberto="False" />
        </Viagens>
        <GridAcomp>
            <Colunas Nome="ImagIgni" Index="0" Visivel="True" Tamanho="40" 
/>
            <Colunas Nome="ImagIgni" Index="1" Visivel="True" Tamanho="40" 
/>
            <Colunas Nome="ImagOcor" Index="2" Visivel="True" Tamanho="40" 
/>
            <Colunas Nome="ImagAtra" Index="3" Visivel="True" Tamanho="40" 
/>
            <Colunas Nome="ImagSina" Index="4" Visivel="True" Tamanho="40" 
/>
            <Colunas Nome="FormPosi" Index="5" Visivel="True" Tamanho="50" 
/>
            <Colunas Nome="VeicPlac" Index="6" Visivel="True" Tamanho="70" 
/>
            <Colunas Nome="CarrPlac" Index="7" Visivel="True" Tamanho="70" 
/>
            <Colunas Nome="TiVeDesc" Index="8" Visivel="True" Tamanho="70" 
/>
            <Colunas Nome="MotoNome" Index="9" Visivel="True" Tamanho="200" 
/>
            <Colunas Nome="ClieNome" Index="10" Visivel="True" Tamanho="200" 
/>
        </GridAcomp>
</GRLog>

I need to insert a new line into the "Viagens" group...
How could I do that??? I've been struggling with it for hours now...



Tks...


0
cdonke1 (4)
10/28/2009 1:11:52 PM
dotnet.xml 7266 articles. 0 followers. Follow

7 Replies
1803 Views

Similar Articles

[PageSpeed] 38

Christiano wrote:
> I have this xml:
> 
> <?xml version="1.0" encoding="utf-8"?>
>     <GRLog xmlns="http://www.digiexpress.com.br/grlog">
>         <Dados>
>             <Empresa>00.000.000/0000-00</Empresa>
>         </Dados>
>         <Viagens>
>             <Viagem uID="0" QtViagens="0" FrmAberto="False" />
>         </Viagens>
>         <GridAcomp>
>             <Colunas Nome="ImagIgni" Index="0" Visivel="True" Tamanho="40" 
> />
>             <Colunas Nome="ImagIgni" Index="1" Visivel="True" Tamanho="40" 
> />
>             <Colunas Nome="ImagOcor" Index="2" Visivel="True" Tamanho="40" 
> />
>             <Colunas Nome="ImagAtra" Index="3" Visivel="True" Tamanho="40" 
> />
>             <Colunas Nome="ImagSina" Index="4" Visivel="True" Tamanho="40" 
> />
>             <Colunas Nome="FormPosi" Index="5" Visivel="True" Tamanho="50" 
> />
>             <Colunas Nome="VeicPlac" Index="6" Visivel="True" Tamanho="70" 
> />
>             <Colunas Nome="CarrPlac" Index="7" Visivel="True" Tamanho="70" 
> />
>             <Colunas Nome="TiVeDesc" Index="8" Visivel="True" Tamanho="70" 
> />
>             <Colunas Nome="MotoNome" Index="9" Visivel="True" Tamanho="200" 
> />
>             <Colunas Nome="ClieNome" Index="10" Visivel="True" Tamanho="200" 
> />
>         </GridAcomp>
> </GRLog>
> 
> I need to insert a new line into the "Viagens" group...

A new "line"?
Do you want to insert a new "Viagem" element?

With .NET 3.5 you could use LINQ to XML e.g.

XDocument doc = XDocument.Load("input.xml");
XNamespace dp = doc.Root.Name.Namespace;
doc.Root.Element(df + "Viagens").Add(new XElement(df + "Viagem,
   new XAttribute("uID", 1),
   new XAttribute("QtViagens", 1),
   new XAttribute("FrmAlberto", "True"));
doc.Save("output.xml");

But I am guessing what you want to achieve, better show us exactly what 
you want to insert.



-- 

	Martin Honnen --- MVP XML
	http://msmvps.com/blogs/martin_honnen/
0
mahotrash (1777)
10/28/2009 1:24:44 PM
I'm trying to insert a new element Viagem, nested in Viagens, so it will 
look like this

        <Viagens>
            <Viagem uID="0" QtViagens="0" FrmAberto="False" />
            <Viagem uID="1" QtViagens="30" FrmAberto="True" />
            <Viagem uID="2" QtViagens="6" FrmAberto="False" />
            <Viagem uID="3" QtViagens="87" FrmAberto="True" />
        </Viagens>

"Martin Honnen" <mahotrash@yahoo.de> escreveu na mensagem 
news:%23bWiGI9VKHA.3696@TK2MSFTNGP02.phx.gbl...
> Christiano wrote:
>> I have this xml:
>>
>> <?xml version="1.0" encoding="utf-8"?>
>>     <GRLog xmlns="http://www.digiexpress.com.br/grlog">
>>         <Dados>
>>             <Empresa>00.000.000/0000-00</Empresa>
>>         </Dados>
>>         <Viagens>
>>             <Viagem uID="0" QtViagens="0" FrmAberto="False" />
>>         </Viagens>
>>         <GridAcomp>
>>             <Colunas Nome="ImagIgni" Index="0" Visivel="True" 
>> Tamanho="40" />
>>             <Colunas Nome="ImagIgni" Index="1" Visivel="True" 
>> Tamanho="40" />
>>             <Colunas Nome="ImagOcor" Index="2" Visivel="True" 
>> Tamanho="40" />
>>             <Colunas Nome="ImagAtra" Index="3" Visivel="True" 
>> Tamanho="40" />
>>             <Colunas Nome="ImagSina" Index="4" Visivel="True" 
>> Tamanho="40" />
>>             <Colunas Nome="FormPosi" Index="5" Visivel="True" 
>> Tamanho="50" />
>>             <Colunas Nome="VeicPlac" Index="6" Visivel="True" 
>> Tamanho="70" />
>>             <Colunas Nome="CarrPlac" Index="7" Visivel="True" 
>> Tamanho="70" />
>>             <Colunas Nome="TiVeDesc" Index="8" Visivel="True" 
>> Tamanho="70" />
>>             <Colunas Nome="MotoNome" Index="9" Visivel="True" 
>> Tamanho="200" />
>>             <Colunas Nome="ClieNome" Index="10" Visivel="True" 
>> Tamanho="200" />
>>         </GridAcomp>
>> </GRLog>
>>
>> I need to insert a new line into the "Viagens" group...
>
> A new "line"?
> Do you want to insert a new "Viagem" element?
>
> With .NET 3.5 you could use LINQ to XML e.g.
>
> XDocument doc = XDocument.Load("input.xml");
> XNamespace dp = doc.Root.Name.Namespace;
> doc.Root.Element(df + "Viagens").Add(new XElement(df + "Viagem,
>   new XAttribute("uID", 1),
>   new XAttribute("QtViagens", 1),
>   new XAttribute("FrmAlberto", "True"));
> doc.Save("output.xml");
>
> But I am guessing what you want to achieve, better show us exactly what 
> you want to insert.
>
>
>
> -- 
>
> Martin Honnen --- MVP XML
> http://msmvps.com/blogs/martin_honnen/ 


0
cdonke1 (4)
10/28/2009 1:32:35 PM
Christiano wrote:
> I'm trying to insert a new element Viagem, nested in Viagens, so it will 
> look like this
> 
>         <Viagens>
>             <Viagem uID="0" QtViagens="0" FrmAberto="False" />
>             <Viagem uID="1" QtViagens="30" FrmAberto="True" />
>             <Viagem uID="2" QtViagens="6" FrmAberto="False" />
>             <Viagem uID="3" QtViagens="87" FrmAberto="True" />
>         </Viagens>

Then see the code I posted, it adds a new Viagem element:

>>
>> With .NET 3.5 you could use LINQ to XML e.g.
>>
>> XDocument doc = XDocument.Load("input.xml");
>> XNamespace dp = doc.Root.Name.Namespace;
>> doc.Root.Element(df + "Viagens").Add(new XElement(df + "Viagem,
>>   new XAttribute("uID", 1),
>>   new XAttribute("QtViagens", 1),
>>   new XAttribute("FrmAlberto", "True"));
>> doc.Save("output.xml");



-- 

	Martin Honnen --- MVP XML
	http://msmvps.com/blogs/martin_honnen/
0
mahotrash (1777)
10/28/2009 1:51:47 PM
Sorry.. I forgot to tell.. i'm using FW 2.0.. :S

tks in advance..


"Martin Honnen" <mahotrash@yahoo.de> escreveu na mensagem 
news:Ou%23ONX9VKHA.3696@TK2MSFTNGP02.phx.gbl...
> Christiano wrote:
>> I'm trying to insert a new element Viagem, nested in Viagens, so it will 
>> look like this
>>
>>         <Viagens>
>>             <Viagem uID="0" QtViagens="0" FrmAberto="False" />
>>             <Viagem uID="1" QtViagens="30" FrmAberto="True" />
>>             <Viagem uID="2" QtViagens="6" FrmAberto="False" />
>>             <Viagem uID="3" QtViagens="87" FrmAberto="True" />
>>         </Viagens>
>
> Then see the code I posted, it adds a new Viagem element:
>
>>>
>>> With .NET 3.5 you could use LINQ to XML e.g.
>>>
>>> XDocument doc = XDocument.Load("input.xml");
>>> XNamespace dp = doc.Root.Name.Namespace;
>>> doc.Root.Element(df + "Viagens").Add(new XElement(df + "Viagem,
>>>   new XAttribute("uID", 1),
>>>   new XAttribute("QtViagens", 1),
>>>   new XAttribute("FrmAlberto", "True"));
>>> doc.Save("output.xml");
>
>
>
> -- 
>
> Martin Honnen --- MVP XML
> http://msmvps.com/blogs/martin_honnen/ 


0
cdonke1 (4)
10/28/2009 2:00:08 PM
Christiano wrote:
> Sorry.. I forgot to tell.. i'm using FW 2.0.. :S

With .NET 2.0 you can use the DOM implementation in the .NET framework, 
System.Xml.XmlDocument:

XmlDocument doc = new XmlDocument();
doc.Load("input.xml");
string dp = doc.DocumentElement.NamespaceURI;
XmlNamespaceManager mgr = new XmlNamespaceManager(doc.NameTable);

XmlElement viagem = doc.CreateElement("Viagem", dp);
viagem.SetAttribute("uID", "1");
viagem.SetAttribute("QtViagens", "1");
viagem.SetAttribute("FrmAlberto", "True");

doc.DocumentElement.SelectSingleNode("dp:Viagems", mgr).AppendChild(viagem);

doc.Save("output.xml");

-- 

	Martin Honnen --- MVP XML
	http://msmvps.com/blogs/martin_honnen/
0
mahotrash (1777)
10/28/2009 2:11:49 PM
Martin Honnen wrote:

> XmlDocument doc = new XmlDocument();
> doc.Load("input.xml");
> string dp = doc.DocumentElement.NamespaceURI;
> XmlNamespaceManager mgr = new XmlNamespaceManager(doc.NameTable);

Here I forgot
   mgr.AddNamespace("dp", dp);

> XmlElement viagem = doc.CreateElement("Viagem", dp);
> viagem.SetAttribute("uID", "1");
> viagem.SetAttribute("QtViagens", "1");
> viagem.SetAttribute("FrmAlberto", "True");
> 
> doc.DocumentElement.SelectSingleNode("dp:Viagems", 
> mgr).AppendChild(viagem);
> 
> doc.Save("output.xml");
> 


-- 

	Martin Honnen --- MVP XML
	http://msmvps.com/blogs/martin_honnen/
0
mahotrash (1777)
10/28/2009 2:18:10 PM
Tks a lot Martin...

I've just came to a similar solution right now... lol

    XmlDocument doc = New XmlDocument();
    doc.Load(f);
    XmlNode vNode = doc["GRLog"]["Viagens"];
    XmlElement el1 = doc.CreateElement("Viagem", vNode.NamespaceURI);
    el1.SetAttribute("uID", 5);
    el1.SetAttribute("QtViagens", 0);
    el1.SetAttribute("FrmAberto", False);
    vNode.AppendChild(el1);

    doc.Save(f);





"Martin Honnen" <mahotrash@yahoo.de> escreveu na mensagem 
news:e5pKai9VKHA.3720@TK2MSFTNGP02.phx.gbl...

> Christiano wrote:
>> Sorry.. I forgot to tell.. i'm using FW 2.0.. :S
>
> With .NET 2.0 you can use the DOM implementation in the .NET framework, 
> System.Xml.XmlDocument:
>
> XmlDocument doc = new XmlDocument();
> doc.Load("input.xml");
> string dp = doc.DocumentElement.NamespaceURI;
> XmlNamespaceManager mgr = new XmlNamespaceManager(doc.NameTable);
>
> XmlElement viagem = doc.CreateElement("Viagem", dp);
> viagem.SetAttribute("uID", "1");
> viagem.SetAttribute("QtViagens", "1");
> viagem.SetAttribute("FrmAlberto", "True");
>
> doc.DocumentElement.SelectSingleNode("dp:Viagems", 
> mgr).AppendChild(viagem);
>
> doc.Save("output.xml");
>
> -- 
>
> Martin Honnen --- MVP XML
> http://msmvps.com/blogs/martin_honnen/ 


0
cdonke1 (4)
10/28/2009 2:24:56 PM
Reply:

Similar Artilces:

Deserialize an XML file with multiple namespaces...
Hopefully I can ask this question without regaling you kind people in too many gory details. Here's what I'm trying to do: - I have a local XML file with a .GPX extension which I downloaded from www.geocaching.com. - The file contains a bunch of elements called <WPT> - Within the WPT elements are a number of other elements <time>, <sym>, <groundspeak:name>... - The non-qualified elements come from a schema/namespace at http://www.topografix.com/GPX/ - The qualified elements come from a schema/namespace at http://www.groundspeak.com/cache - I ran xsd.exe with th...

lines in the corners
How do I get rid of lines that appear in the corner of the page when I print? In the print dialogue, Advanced Print Settings, Page settings tab, clear crop marks. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "ComputerQuestion" <ComputerQuestion@discussions.microsoft.com> wrote in message news:62D4A5FC-678D-4DC7-81CE-529543E164CB@microsoft.com... > How do I get rid of lines that appear in the corner of the page when I print? ...

Should be simple to add additional address book for outlook.
Ok this is a simple request that doesn't seem to work. Using the ESM (exchange 2003) SBS. Navigate to All Global Address lists. Right click and new Global Address List. Then I go to outlook client click new email. Click on the address book navigator link. In the available address books I only have global address list or the outlook contacts. How do you get the new Global address book to display ? On Sun, 18 Jun 2006 19:46:01 -0700, Conrad Gotzmann <ConradGotzmann@discussions.microsoft.com> wrote: >Ok this is a simple request that doesn't seem to work. >Using the ESM (...

Simple Cash Flow Small business
I have a small janitorial business with recurring jobs w/the same clients. I want something simple & very inexpensive to keep track. Ideas? ...

create xml document based from schema
I have the following schema. I need to know how to make an xml document based from it. The main worry I have is the DateTime field. <?xml version="1.0" encoding="utf-8"?> <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="NewsArticle"> <xs:complexType> <xs:sequence> <xs:element name="Description" type="xs:string" /> <xs:element name="Body" type="xs:string" />...

Line-break in a cell without ALT-ENTER?
Is there a way to do this? I would like to make it so when the user hits "ENTER", it doesn't go to the next cell. I want it to just make a line-break in the cell. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ You could use a couple of macros, but before you do that, how would you really hit the enter key? I think I wouldn't really do this, but if had to, I'd remap the enter key from the numeric keyboard only. Then I could still use the QWER...

A SQL error has occurred. Going off line with Outlook CRM 4.
I have seen this in multiple workstations. Running the diagnostics, does not report any errors, however removing the temprary data under advenced fixes the problem by deleting the content of the off line database. The problem with this fix is that it may take up to 12 hours for some of our overseas employees to do their initial off line. When is SP1 due? ...

Deleting Blank lines with VBA
Help I have a macro that runs multiple formulas. However, when the formulas are finished I am left with about 64000 blank lines. I am unable to insert a row on the worksheets as I get a Run-Time Error 1004 (Try to locate the last Nonblank Cell using CTRL-END). Here is a same of some of the formulas I am running ( the macro is very large). ActiveWorkbook.Names.Add Name:="TrunkFormulaI", RefersToR1C1:="=Trunks!R1C27" ActiveWorkbook.Names.Add Name:="TrunkFormulaJ", RefersToR1C1:="=Trunks!R1C28" ActiveWorkbook.Names.Add Name:="TrunkFormulaK&qu...

Xml-Grid for editing NodeList
Hey XML-Guys, I'm playing now for a couple of days with C# and XML. In earlier threads a mentioned that I develop smaller Web-Applications. Therefore I want to edit and add new nodes to my Xml-Documents. To use a DataSet is not very handy because if the data is to complex it allowed me not to add a row. I'm looking for a XML-Grid that is able to have a XML-File as DataSource and let me filter the Data over a XPath-Expression. After filtering a want edit the resulting NodeList and also add Nodes. The Header of the Grid should show the NodeNames and the DataRows should conta...

How do I add an indicator line to a Gantt chart in excel?
I have created a Gantt chart in Excel. I would like to indicate a specific date - most of the time today's date - by a vertical line showing how many days have passed and how many yet to go for specific tasks. I have attempted to create an 'XY graph' on top of the bar/Gantt chart, but the two do not seem to be compatible. Hi, See my examples of various ways of adding a datum line to a chart. I'm pretty sure one of the techniques should work for you. http://www.andypope.info/charts/averageline.htm Cheers Andy Steve wrote: > I have created a Gantt chart in Excel. I...

insert logo using AUTOCORRECT
Have been trying to insert my company's logo using AUTOCORRECT. It works like a charm in WORD. It doens't work in Excel. ex. when I type "lg" these characters should be replaced by my company's logo. Does anyone know how to do this in Excel? -- digicat ------------------------------------------------------------------------ digicat's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=14920 View this thread: http://www.excelforum.com/showthread.php?threadid=497273 ...

In-Line Graphics in Pub2002
I have a group of several objects that I want to float with text. The option to do this is grayed out when the objects are grouped, I have to ungroup the objects and float them separately. Is there any way around this? Thx Hi SLS (anonymous@discussions.microsoft.com), in the newsgroups you posted: || I have a group of several objects that I want to float || with text. The option to do this is grayed out when the || objects are grouped, I have to ungroup the objects and || float them separately. Is there any way around this? You could group the objects, Right Click on the group of ob...

A simple mail merge question
How do you change the return address on envelops printed using mail merge? I don't understand the question. The return address will be whatever you tell it to be when you set up your merge document. -- Russ Valentine [MVP-Outlook] "Nina" <anonymous@discussions.microsoft.com> wrote in message news:b16b01c3ec17$335b99f0$a501280a@phx.gbl... > How do you change the return address on envelops printed > using mail merge? ...

DVD Insert
I have been asked by a friend to design an insert for a DVD he is making. The only templates I've been able to find are the ones that are actually for CD jewel cases. He is going to be using the DVD cases like you see in the stores when you buy a movie, which is much larger and the insert goes into the plastic sleeve. It's about 10-1/2" X 7-1/4". I checked the Microsoft site, but they had nada. Does anyone have a place where I could get a template for this project, or any idea of the best way to set this up? I've done CD inserts, but never a DVD before. Thanks....

Retreiving Xml child nodes using DataSet and XmlDataDocument
I am loading an Xml file from a sql server. I have one field that contains child nodes stored as text. The problem is, when I try to imort the dataset into a XmlDataDocument, it loads the whole thing as a text element. (with all of the special characters converted) The best solution I've found so far is to do a string replace on all of the special characters. Like so: DataSet ds = new DataSet(); ds.EnforceConstraints = false; SqlDataAdapter da = new SqlDataAdapter(query, connStr); da.Fill(ds, "Keywords"); XmlDataDocument xmlDoc = new XmlDataDocument(ds); string s = xmlDoc.S...

Simple Newsgroup Questions
I'm new to Newsgroups. I'm subscribed to Microsoft.public.dotnet.languages.vb. I've posted 2 messages but I can't get the third to post. I saw it for a few minutes, then it was crossed out and said "no longer available from the server". Also, I can't seem to get more than 300 messages displayed. I'd like to be able to download and search through thousands. I've tried increasing the number of headers to download, but when I click on 'Download Next 1000 Headers', it seems to do nothing. In the microsoft.public.outlook newsgroup, I can see over...

Insert hyperlink greyed out
Can't see any other posts on the above any advice valued. Thanks {XP2, with Publisher 2002} On Sun, 23 Oct 2005 08:39:37 +0100, Gel wrote (in article <1130053177.481108.189290@o13g2000cwo.googlegroups.com>): > Can't see any other posts on the above any advice valued. > Thanks > > {XP2, with Publisher 2002} > Ah yes, "can't see' the classic euphemism for "I'm a lazy f**kwit, I can't be arsed to RTFH, or to STFW. Please wipe my arse for me, because I'm too lazy to find the bog roll..." Where are you attempting to insert th...

Nested MID and FIND
Hello all! Does anyone know how I may be able to search a string and extract text from it using the MID and FIND function with multiple FINDS? I have a spreadsheet for which I have a lengthy bit of text for which I have set up to currently extract ",IE". I need to adapt the formula =MID(Dump!A1,FIND(",IE.",Dump!A1)-2,5) to also search for either ",MA" or a ",MC". These characters will always be unique and there will not be a combination of either in the text string. The string will have either one of the three but not two or all of t...

space between lines to be one
Re: Outlook 2003 I use Outlook to process my e-mail. How would I make the space between lines to be one (1)? Sometimes the space between lines is two (2), especially between paragraphs. Thank you, Barry Karas "Barry Karas" <barrykaras1234@comcast.net> wrote in message news:EZidnXsnw4464xHbnZ2dnUVZ_rqhnZ2d@comcast.com... > Re: Outlook 2003 > > I use Outlook to process my e-mail. How would I make the space between > lines to be one (1)? > > Sometimes the space between lines is two (2), especially between > paragraphs. > > Thank you, > >...

xml element names...
hi all, xml element names doesn't support names with whitespaces or symbol characters etc,... but is there any .NET class that can help convert these characters like hex form.... that is what XmlSchema does. Would hate to have to find these characters one at a time... thanks, System.Convert ? Or just do foreach(char Ch in ForbiddenChars) ClassName = ClassName.Replace(Ch,((int)Ch).ToString("X"));//You may have to cast the Ch to string, though that will convert a char to hex. "Maersa" <ma_ersa@hotmail.com> wrote in message news:eoScxcKwDHA.3428@TK2MSFTNGP11.ph...

Inserting text closing or begining salutations in Office 2007
hi. I am starting to get to grips with Office 2007. I like the program and it's changes, but I am struggling to find some of the items I used to use in the previous version. For instance, how do I add closing and opening salutations such as "yours sincerily" or "dear sir" etc that we used to be able to do in the version before this. I have looked, but can't sem to find it anywhere. I appreciate any help or pointers with this. Many thanks. ...

Insert query with two left outer joins gives "Record is Deleted" m
Hi, I have built an insert query to combine data from 3 tables into one table based on a key value (RA_ID) on a form. Two of the from tables may or may not have data associated with the main from table. So I have coded the select from statement using left outer joins. When I run the query with a row in the first child table but not in the second it works fine but when I run the query with a key value that exists in the 2nd child table but not in the first I get a message saying "record is deleted". Anybody have any ideas what is causing this? Here is the query......... ...

How do I place multiple centered lines in a header?
I wish to place multiple centered lines in the header of a Visio project. I can't find anything to help me with this. I wish to see: ABC Company Special Project centered in the header of the documents I am creating. Are you printing one Visio page per printer page? If so, you can use a background page instead of a Header/Footer. The options for H/Fs are quite limited compared to what you can do with background pages. The reason for including H/Fs in Visio was to address the problem when a Visio drawing ended up printing on multiple pages. The H/Fs allowed easy identification of ...

Adding additional address lines on version 8
I am modifying the POP Blank Form on version 8 (never been modified before). I have modified the existing Vendor Address 1-3 within Calculated fields to add the Country (removing the last ""). I then create a vendor address 4, which is identical to 1-3 except for a number 4 for the line number. This is what I have done in all previous versions and it has worked fine. When I go to print I get an error "Max symbol length exceeded: Increase MAX_TOK_LEN." If I delete the new calculated field it prints fine. All our SOP reports have the 4 line, but were upgraded to ...

Color coding data in line graphs
I am building several line graphs for 9 customers. Is there a way to assign a color for the data by customer without manually adjusting the line for each customer in each line graph? You could adapt this approach: VBA Conditional Formatting of Charts by Series Name http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-series-name/ - Jon ------- Jon Peltier Peltier Technical Services, Inc. http://peltiertech.com/ brewer wrote: > I am building several line graphs for 9 customers. Is there a way to assign > a color for the data by customer without manually adju...