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
rptMain.Parameters("NoReseau").Value = mintNoReseau
Set ARScen.ReportSource = rptMain
'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.
