Can T Calculate With Serial Number
I need a logic that displays a different value every 6th label.
So label 1,2,3,4,5 need to display the database field : Field("Sample_BWBootLabel.PAARDOOSBARCODE")
label 6 needs to display database Field("Sample_BWBootLabel.OMDOOSBARCODE")
counter for every ticket (serialnr) Format.NamedSubStrings("teller").Value
As a test I tried to calculate different database fields.
Field("Sample_ColorBootLabel.aantalpaardozen") =5
Field("Sample_ColorBootLabel.aantalomdozen")=1
main idea is if (teller Mod ("Sample_ColorBootLabel.aantalpaardozen") +("Sample_ColorBootLabel.aantalomdozen"))= 0 ==> remainder of counter/6 = 0 , so this is the 6th label.
But I even can t get the following code to work :
Value=Format.NamedSubStrings("teller").Value/ (CDbl(Field("Sample_ColorBootLabel.aantalpaardozen")) + CDbl(Field("Sample_ColorBootLabel.aantalomdozen")))
Strange thing is, each part of this code does work.
Working part1:
Value=Format.NamedSubStrings("teller").Value/1
This gives an output on the label of
1
2
3
.....
working part2:
Value=1/ (CDbl(Field("Sample_ColorBootLabel.aantalpaardozen")) + CDbl(Field("Sample_ColorBootLabel.aantalomdozen"))) =1/ (5+1)
This gives an output on the label of
0.16666666666666666667
0.16666666666666666667
...
so each part of my code works, but if I try to divide part 1 by part 2 , it doesn't work.
Any idea's?
So label 1,2,3,4,5 need to display the database field : Field("Sample_BWBootLabel.PAARDOOSBARCODE")
label 6 needs to display database Field("Sample_BWBootLabel.OMDOOSBARCODE")
counter for every ticket (serialnr) Format.NamedSubStrings("teller").Value
As a test I tried to calculate different database fields.
Field("Sample_ColorBootLabel.aantalpaardozen") =5
Field("Sample_ColorBootLabel.aantalomdozen")=1
main idea is if (teller Mod ("Sample_ColorBootLabel.aantalpaardozen") +("Sample_ColorBootLabel.aantalomdozen"))= 0 ==> remainder of counter/6 = 0 , so this is the 6th label.
But I even can t get the following code to work :
Value=Format.NamedSubStrings("teller").Value/ (CDbl(Field("Sample_ColorBootLabel.aantalpaardozen")) + CDbl(Field("Sample_ColorBootLabel.aantalomdozen")))
Strange thing is, each part of this code does work.
Working part1:
Value=Format.NamedSubStrings("teller").Value/1
This gives an output on the label of
1
2
3
.....
working part2:
Value=1/ (CDbl(Field("Sample_ColorBootLabel.aantalpaardozen")) + CDbl(Field("Sample_ColorBootLabel.aantalomdozen"))) =1/ (5+1)
This gives an output on the label of
0.16666666666666666667
0.16666666666666666667
...
so each part of my code works, but if I try to divide part 1 by part 2 , it doesn't work.
Any idea's?
0
-
Create a named numeric value data source that serializes per label. Use an If...Then statement where you perform a Mod 6 expression on this serialized value. If the conditional expression returns 0 (zero) then we know it is a multiple of 6 and thus set the value to one database field, else set it to the other database field. The serialized value would reset per print job.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar