Bonjour à tous, tout d'abord joyeuses fêtes

J'ai testé http://msdn.microsoft.com/en-us/library/aa337390.aspx pour mettre à jour le rapport :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 List<ItemsChoiceType118> _reportItems = 
        new List<ItemsChoiceType118>(_report.ItemsElementName);
 
    // Locate the index for the Description property
    int index = _reportItems.IndexOf(
        ItemsChoiceType118.Description);
 
    // The Description item is of type StringLocIDType, so 
    // cast the item type first and then assign new value.
    System.Console.WriteLine("- Old Description: " + 
        ((StringLocIDType)_report.Items[index]).Value );
 
    // Update the Description for the Report
    ((StringLocIDType)_report.Items[index]).Value = 
        "New Report Description";
J'ai réussi à mettre à jour la description du rapport.

Par contre j'aimerais modifier un texte (textbox) du rapport, ses propriétés comme le champ Top ou Left, comment faire ?

Merci d'avance



XML de la textbox :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
...
 
<Textbox Name="Textbox1">
            <CanGrow>true</CanGrow>
            <KeepTogether>true</KeepTogether>
            <Paragraphs>
              <Paragraph>
                <TextRuns>
                  <TextRun>
                    <Value>Texte</Value>
                    <Style />
                  </TextRun>
                </TextRuns>
                <Style />
              </Paragraph>
            </Paragraphs>
            <Top>11.21833mm</Top>
            <Left>114.7mm</Left>
            <Height>6mm</Height>
            <Width>25mm</Width>
            <ZIndex>2</ZIndex>
            <Style>
              <Border>
                <Style>None</Style>
              </Border>
              <PaddingLeft>2pt</PaddingLeft>
              <PaddingRight>2pt</PaddingRight>
              <PaddingTop>2pt</PaddingTop>
              <PaddingBottom>2pt</PaddingBottom>
            </Style>
          </Textbox>
        </ReportItems>