Précédent   Forum du club des développeurs et IT Pro > Logiciels > Solutions d'entreprise > Business Intelligence > Microsoft BI > SSRS
SSRS Forum d'entraide sur SQL Server Reporting Services (SSRS) et les concepteurs associés (Report Designer, Report Builder). Avant de poster : FAQ Microsoft BI et Tutoriels Microsoft BI
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse
 
Outils de la discussion
Publicité
'
Vieux 26/12/2012, 11h03   #1
webfr
Invité de passage
 
Inscription : janvier 2009
Messages : 5
Détails du profil
Informations forums :
Inscription : janvier 2009
Messages : 5
Points : 0
Points : 0
Par défaut Utiliser C# pour modifier un RDL SQL2012 (wsdl reportingservices2010)

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 :
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 :
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>
webfr est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 27/12/2012, 08h42   #2
webfr
Invité de passage
 
Inscription : janvier 2009
Messages : 5
Détails du profil
Informations forums :
Inscription : janvier 2009
Messages : 5
Points : 0
Points : 0
Pas de réponse ?

Sinon est ce que quelqu'un saurait utiliser le XML parsing et SelectSingleNode pour modifier la valeur Left de Textbox1 ?

Merci !
webfr est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse
Outils de la discussion

Navigation rapide


Fuseau horaire GMT +2. Il est actuellement 21h44.


 
 
 
 
Partenaires

Hébergement Web