Problems with Variables
Posted: Wed Aug 22, 2007 2:54 am
Hi there,
first of all i have to say iam new to Stimulreport and got a Problem using Variable.
I created a variable named "Rabatt" which is of type double or decimal.
Then when i try to calculate some things with it i got Errors.
I drag the Variable from the Explorer on my REport form and doubl click on it. the Text-Editor Window
opens, so far so good.
I try to calculate some things in it like.
{Rabatt}={Datenquelle3.ArtikelMengeneinheit}*{Datenquelle3.ArtikelPreis}-{Datenquelle3.ArtikelGesamtPreis}*-1
I got errors in my Report.
Here is a snap of the code view.
Me.Datenquelle3 = New Datenquelle3DataSource
Me.Datenquelle2 = New Datenquelle2DataSource
Me.Datenquelle1 = New Datenquelle1DataSource
Me.ParentName = New Stimulsoft.Report.Dictionary.StiDataRelation("Beziehung", "Name", "Name", Me.Datenquelle3, Me.Datenquelle1, New System.String() {"BelegID"}, New System.String() {"ID"})
Me.ParentvkbelegezuKontokorrent = New Stimulsoft.Report.Dictionary.StiDataRelation("Beziehung", "vkbelegezuKontokorrent", "vkbelegezuKontokorrent", Me.Datenquelle3, Me.Datenquelle1, New System.String() {"BelegID"}, New System.String() {"ID"})
Me.Dictionary.Variables.Add(New Stimulsoft.Report.Dictionary.StiVariable("", "Rabatt", "Rabatt", GetType(Decimal), "", false, false))
Me.NeedsCompiling = false
'Variables init
'Variables init
Me.Rabatt = 0m
Me.ReferencedAssemblies = New System.String() {"System.Dll", "System.Drawing.Dll", "System.Windows.Forms.Dll", "System.Data.Dll", "System.Xml.Dll", "Stimulsoft.Controls.Dll", "Stimulsoft.Base.Dll", "Stimulsoft.Report.Dll"}
Me.ReportAlias = "Report"
'
If you look at the me.rabatt = 0m... There is allways a "M" in the code which for sure generates an error. but i didnt put it in there. Is there an error in the VB-Script generator ?.
How can i calculate with variables and also with fields of the datasource ?.
At the Moment iam testing the Report designer if it fits our needs, are there any limitations in the Trial Version ?
Thx so much for any help.
Stephan
first of all i have to say iam new to Stimulreport and got a Problem using Variable.
I created a variable named "Rabatt" which is of type double or decimal.
Then when i try to calculate some things with it i got Errors.
I drag the Variable from the Explorer on my REport form and doubl click on it. the Text-Editor Window
opens, so far so good.
I try to calculate some things in it like.
{Rabatt}={Datenquelle3.ArtikelMengeneinheit}*{Datenquelle3.ArtikelPreis}-{Datenquelle3.ArtikelGesamtPreis}*-1
I got errors in my Report.
Here is a snap of the code view.
Me.Datenquelle3 = New Datenquelle3DataSource
Me.Datenquelle2 = New Datenquelle2DataSource
Me.Datenquelle1 = New Datenquelle1DataSource
Me.ParentName = New Stimulsoft.Report.Dictionary.StiDataRelation("Beziehung", "Name", "Name", Me.Datenquelle3, Me.Datenquelle1, New System.String() {"BelegID"}, New System.String() {"ID"})
Me.ParentvkbelegezuKontokorrent = New Stimulsoft.Report.Dictionary.StiDataRelation("Beziehung", "vkbelegezuKontokorrent", "vkbelegezuKontokorrent", Me.Datenquelle3, Me.Datenquelle1, New System.String() {"BelegID"}, New System.String() {"ID"})
Me.Dictionary.Variables.Add(New Stimulsoft.Report.Dictionary.StiVariable("", "Rabatt", "Rabatt", GetType(Decimal), "", false, false))
Me.NeedsCompiling = false
'Variables init
'Variables init
Me.Rabatt = 0m
Me.ReferencedAssemblies = New System.String() {"System.Dll", "System.Drawing.Dll", "System.Windows.Forms.Dll", "System.Data.Dll", "System.Xml.Dll", "Stimulsoft.Controls.Dll", "Stimulsoft.Base.Dll", "Stimulsoft.Report.Dll"}
Me.ReportAlias = "Report"
'
If you look at the me.rabatt = 0m... There is allways a "M" in the code which for sure generates an error. but i didnt put it in there. Is there an error in the VB-Script generator ?.
How can i calculate with variables and also with fields of the datasource ?.
At the Moment iam testing the Report designer if it fits our needs, are there any limitations in the Trial Version ?
Thx so much for any help.
Stephan