blackbelt60
-
Posts
19 -
Joined
Posts posted by blackbelt60
-
-
Hi all,
I'm trying to write some lines from an input file to a new one.
When there is a certain condition i must change the current page, and write the other lines in the new page.
Is there a rule to do something like this? (es. if i'm working on the page "1" i want to create and move to page "2")
Thanks
-
Hello Ste,
There is something wrong with the "if" sentence. If I leave it like before, script never enters in it. It looks like the "Field" function is not allowed in that place.
See this:
var contaRecord = Dir.recordCount;
var Final = "";
for (var recordWalker = 1; recordWalker <= contaRecord; recordWalker++)
{
if (Dir.GetFieldValue(recordWalker, "ID") == 2) //Field("ID")) //Dir.GetFieldValue (recordWalker, "ID"))
{
Final = Final + Dir.GetFieldValue(recordWalker, ("name")) + " " +
Dir.GetFieldValue(recordWalker, "city") + " " +
Dir.GetFieldValue(recordWalker, "number") + "<br><br>";
}
}
//return Dir.GetFieldValue(1, "name");
return Final;
By writing the script above I can return the 2nd row of my input file.
What I need is to have the first 2 ID rows on the 1st composed page , and for the remaining rows, each one on separate pages.
ID is the key field, in my example.
About the "more complex" Excel file, yes, I will ask to have 1 title line only, but I won't be able to get 1 record 1 row schema, so I have to deal with multiple records. As I am not an expert about javascript, I want start learning by using the simplex example I did above.
Thank you. Maurizio
-
Hello,
I tried to learn by user a simpler example, then apply later on mine...
I used an input file made like this:
ID;name;city;number
1;pippo;milano;2345643
1;giacomo;bari;345687474
2;pluto;novara;2334785
3;paperino;mantova;3429345
4;topolino;como;6361238
I need to get same ID row on the same page.
By looking at Rules Manual and some entries I found here around, I used the following onJobStart rule
Dir = new ExternalDataFile("C:\\Users\\Production Printig\\Documents\\Progetti_PTI\\Testrules\\DBMultipleRecord.csv", ";");
var contaRecord = Dir.recordCount;
for (var recordWalker=1; recordWalker <= contaRecord; recordWalker++)
{
if (Dir.GetFieldValue(recordWalker, 'ID') == Field("ID"))
{
Final = Final + Dir.GetFieldValue(recordWalker, "name") + " " +
Dir.GetFieldValue(recordWalker, "city") + " " +
Dir.GetFieldValue(recordWalker, "number") + "<br><br>";
}
}
return;
Output is empty... Any idea? Thanks Maurizio
-
Hello,
I entered this in FP Producer discussion this afternoon.
I prefer to enter here too, because of its meaning in VDP Creator. Also I did not explain very well there... I hope to do better here.
I usually had customers that provided me excel / csv files with titles in 1st row, and each row was an output record.
Now I have a new one who gave me the attached one. At a 1st look it does not look to be usable in FP Producer (VDP creator as well of course)
Now, depending on the “tipo” column (H or L), I have either Customer details / order summary (H), or article details (L) referring to the customer above.
Row numbers are variable for each customer.
They also have a “double” 1st line, depending whether “tipo” row is either H or L.
Of course same H - L group should be composed in the same output record: L referring rows one under the other, while customer / order details on several locations within the same page.
Customer will get a FP Producer, but this is a common question, valid for VDP Creator as well.
Should I drive customer to reassemble DB and have variable names on the 1st row, or is there a different way to identify variable names ?
Thanks Maurizio
-
Dan, thank you very much. It works as expected. Maurizio
-
Hello.
I would do this:
var Var6 = "IDAutomationC128L";
final_data = "";
if (Field("nbr") == "70-0024-012")
return final_data = '<span><f name="' + Var6 + '">' + NormalizeEntities(Make128Barcode("M00582040")) + '</span>';
else if (Field("nbr") == "70-0024-014")
return final_data = '<span><f name="' + Var6 + '">' + NormalizeEntities(Make128Barcode("M00582050")) + '</span>';
else if (Field("nbr") == "70-0024-016")
return final_data = '<span><f name="' + Var6 + '">' + NormalizeEntities(Make128Barcode("M00582060")) + '</span>';
else if (Field("nbr") == "70-0024-018")
return final_data = '<span><f name="' + Var6 + '">' + NormalizeEntities(Make128Barcode("M00582070")) + '</span>';
else if (Field("nbr") == "70-0024-020")
return final_data = '<span><f name="' + Var6 + '">' + NormalizeEntities(Make128Barcode("M00582080")) + '</span>';
else if (Field("nbr") == "70-0024-022")
return final_data = '<span><f name="' + Var6 + '">' + NormalizeEntities(Make128Barcode("M00582060")) + '</span>';
else if (Field("nbr") == "70-0024-024")
return final_data = '<span><f name="' + Var6 + '">' + NormalizeEntities(Make128Barcode("M00582090")) + '</span>';
else if (Field("nbr") == "70-0024-028")
return final_data = '<span><f name="' + Var6 + '">' + NormalizeEntities(Make128Barcode("M00582100")) + '</span>';
else
return " ";
------------------------
"nbr" is the field name...
Also, please remember to tick the "return as tagged text" cell before saving the rule.
Ciao Maurizio
-
Last for tonight...: Tried the MakeEAN128Barcode , and it looks similar to the code128 AUTO (at least in the start / stop digits), but it always has to make even digits, by adding a trailing "0" , and it won't work in my case. I guess it is a standard for the EAN128 Barcode, so I do not believe it is an error in the composer. As I said before, any help is welcome. Thanks Maurizio
-
Dan, thank you for the answer.
Here is what I need : "Code128 Auto - Support Code 128 A/B/C characters. Automatically switch between the different code sets and performs characters optimization". Tried --> http://www.racoindustries.com/barcodegenerator/1d/code-128.aspx , where you can switch charset: when I say AUTO I get what I need, while A and B just report me the output I get with the currently available generators under VDP Creator. I do not believe I can point to a web online generator, so I need to have one locally available... Any futher help is appreciated. Thank you. Maurizio
-
oops. I have 9.03 win, sorry
-
Additional info: I tried on http://www.barcode-generator.org/ and just clicking on code128, entering 132500000 as data, I get the same exact customer bar sequence. Maybe something new on 9.1 ? I have 9.1 win.
I have following info from my contact:
CODE 128
AUTO
300 dpi
factor 100% (width)
custom 8,4 mm (height)
thanks Maurizio
-
Given that, in both cases I get the right output number (132500000), I need to obtain it with the same "bar" sequence as that showed in the eps file (I guess we have different code128 versions, maybe a "C" and an "A" versions, both valid). Thank you. Maurizio
-
Hello.
I am going to install VDP Creator at a new site on a MAC computer. In this project I need to create sequences of code128 barcodes. I started (on my WIN PC) by creating barcode using the same number showed in the EPS sent by customer. I just used the very simple XML bcode text rule included in the product. I got a code128 that can be read correctly by my smartphone scanner. I see that scanner reads OK the EPS bcode too, even if bars are really different than mine... So I do not understand why, and my customer is saying that I have to use same characters.. Mine is IDAutomationC128L , while I see a different one missing in the EPS... I will go there soon, but at the moment I can't access his MAC Could you please help me? Please see the attachment. Thanks Maurizio
-
Thank you very much ! Maurizio
-
Hello. I need to get the same results I get by running the Excel function floor(number; significance) , round down a number to the closer multiple of the significance value. That is, if I run floor(100000; 12) on Excel I get 99996 , which is the closer integer down, multiple of 12. Sorry I can't find any similar in JavaScript. Thank you. Maurizio
-
Thank you Step. I used the .pdf method like you suggested, and I got what I needed.. Ciao Maurizio
-
Hello. I created an OnRecordStart rule like this:
// Change background color within a text frame dynamically
var myFrame = FindTextFrame("bau");
if (Field("campo")=="pippo")
{
myFrame.fillColorName = "Verde" + myFrame.fillColorName;
}
else if (Field("campo")=="pluto")
{
myFrame.fillColorName = "Rosso" + myFrame.fillColorName;
}
I would need to create a new named "gradient" color, away from the solid CMYK combinations. Is it possible? Thanks Ciao Maurizio
AFP datastream on Producer
in FusionPro® VDP Producer
Posted
Hello,
did anybody tried to output AFP with Producer? At the moment I have a VDP creator / Win 10.1.11 NFR license (Ricoh employee) and I know AFP output is not supported, anyway in a couple of days I need proposing Producer to an AFP customer, but I won't be able to install Producer in Ricoh Showroom until mid-march.
Even though VDP Creator should not output AFP, I tried it on a simple file, and my VDP works only when I disable the background, and when I have variable text fields only (no variable images).
Any idea about Producer AFP output quality?
Thanks Maurizio