Précédent   Forum du club des développeurs et IT Pro > Dotnet > Développement Web avec .NET > ASP.NET
ASP.NET ASP.NET -Forum d'entraide sur le Développement Web en ASP.NET. Avant de poster -> FAQ ASP.NET, Articles ASP.NET
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, 11h06   #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 modifier un fichier RDL en C#

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
Vieux 27/12/2012, 09h00   #3
gcorbineau
Membre Expert
 
Homme Guillaume
Développeur .NET
Inscription : juillet 2006
Messages : 854
Détails du profil
Informations personnelles :
Nom : Homme Guillaume
Localisation : France, Loire Atlantique (Pays de la Loire)

Informations professionnelles :
Activité : Développeur .NET
Secteur : High Tech - Éditeur de logiciels

Informations forums :
Inscription : juillet 2006
Messages : 854
Points : 1 296
Points : 1 296
plutot que de modifier ton fichier XML de ton RDL, tu peux pas ajouter une expression dans ton RDL pour modifier les champs Top ou Left?
__________________
___________________________________________________________________________________________________________
Si mon message t'a aidé - Si au contraire, je suis hors sujet - Quand vous avez la réponse à votre question.
Est notre ami
gcorbineau est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 27/12/2012, 14h00   #4
webfr
Invité de passage
 
Inscription : janvier 2009
Messages : 5
Détails du profil
Informations forums :
Inscription : janvier 2009
Messages : 5
Points : 0
Points : 0
Si tu connais la syntaxe exacte je veux bien
webfr est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 27/12/2012, 14h19   #5
gcorbineau
Membre Expert
 
Homme Guillaume
Développeur .NET
Inscription : juillet 2006
Messages : 854
Détails du profil
Informations personnelles :
Nom : Homme Guillaume
Localisation : France, Loire Atlantique (Pays de la Loire)

Informations professionnelles :
Activité : Développeur .NET
Secteur : High Tech - Éditeur de logiciels

Informations forums :
Inscription : juillet 2006
Messages : 854
Points : 1 296
Points : 1 296
regrade du coté de MSDN sur les expressions de Reporting
__________________
___________________________________________________________________________________________________________
Si mon message t'a aidé - Si au contraire, je suis hors sujet - Quand vous avez la réponse à votre question.
Est notre ami
gcorbineau 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 23h13.


 
 
 
 
Partenaires

Hébergement Web