cs_amer_ezahir
Messages postés133Date d'inscriptionmercredi 21 avril 2004StatutMembreDernière intervention20 septembre 2010
-
7 août 2008 à 16:26
bonjourcheval
Messages postés228Date d'inscriptionmercredi 13 décembre 2000StatutMembreDernière intervention 8 août 2011
-
7 août 2008 à 16:34
Bonjour;
je developpe une application avec VB6 et Crystal report 8.5 ;
j'ai essaye de faire un etat paramétré mais ça marche pas
Svp aidez moi avec un simple exemple (etat principale et sous etat)
bonjourcheval
Messages postés228Date d'inscriptionmercredi 13 décembre 2000StatutMembreDernière intervention 8 août 2011 7 août 2008 à 16:34
Je ne sais pas si ça va t'aider, mais moi j'utilise le programme de DataDynamic : ActiveReport 2.x.x.x
VOici comment je procède pour paramêtrer mes états.
Private Sub AfficherScenarios()
'Efface l'ancien rapport par un nouveau, mis à jour
Set rptMain = Nothing 'Mon rapport
Set ARScen.ReportSource = Nothing ' mon visualiseur de rapport
Set rptMain = New rptScenario
'Met le numéro de réseau en paramêtre de la requete
rptMain.ShowParameterUI = False
'Applique le format standart à tous mes nombres
Dim unObj As Object
Dim uneSecTion As Section
For Each uneSecTion In rptMain.Sections
For Each unObj In uneSecTion.Controls
If TypeOf unObj Is DDActiveReports2.Field Then
FormatStandart unObj
End If
Next
Next
ARScen.Zoom = 95
End Sub
Ensuite, dans ma requete j'écris ceci :
SELECT tblScenarios.noScenario, tblScenarios.descScenario, tblProjets.nomProjet, tblProjetSols.debitEntrant, tblProjetSols.debitSortant, tblTypeUtilisationSol.descTypeSol, tblPeriode.descPeriode FROM tblPeriode INNER JOIN (tblTypeUtilisationSol INNER JOIN (tblScenarios INNER JOIN ((tblProjets INNER JOIN tblProjetSols ON tblProjets.noProjet tblProjetSols.noProjet) INNER JOIN tblScenariosProjets ON tblProjets.noProjet tblScenariosProjets.noProjet) ON tblScenarios.noScenario = tblScenariosProjets.noScenario) ON (tblTypeUtilisationSol.noTypeSol = tblScenariosProjets.noTypeSol) AND (tblTypeUtilisationSol.noTypeSol = tblProjetSols.noTypeSol)) ON tblPeriode.noPeriode = tblScenarios.noPeriode WHERE Utilise = -1
AND tblScenarios.noReseau =<%noReseau|No Reseau:%>
;
Et ça prend la valeure de ma variable et l'utilise dans ma requete.
Je sais, ma requete est monstrueuse...
Je sais que ce n'est pas pour CR, mais j'espere que ça peut t'aider à trouver des pistes.