CarolWaldron
|
Problem with MacroPDFLastSegment in IDAutomation Servlet
We are using the idautomationServlet_pdf417 for macro pdf417 generation. We created a function in PLSQL to create the URL with the data and parameters. However, when we pass the parameter, MacroPDFLastSegment into the URL, we get nothing. If we remove the parameter, we get an image back, but it assumes it is not the last segment. So for macro pdf417 with multiple barcodes, it isn't working. The Java image call takes the parameter, but it takes too long for us to generate over 1000 barcodes in a report.
The function we created in a package in PLSQL is as follows:
FUNCTION PDF417_URL(
p_hostname IN VARCHAR2,
p_code IN VARCHAR2,
p_ProcessTilde IN VARCHAR2 DEFAULT 'Y',
p_MacroPDFEnable IN VARCHAR2 DEFAULT 'N',
p_MacroPDFFileID IN NUMBER DEFAULT 0,
p_MacroPDFLastSegment IN VARCHAR2 DEFAULT 'N',
p_MacroPDFSegmentIndex IN NUMBER DEFAULT 0,
p_PDFColumns IN NUMBER DEFAULT 5,
p_PDFErrorCorrection IN NUMBER DEFAULT 5
)
RETURN VARCHAR2 IS
/* This is set at the beginning of the package but put here as reference
ProcessTilde VARCHAR2(10) := 'PT='; -- ProcessTilde Y/N
MacroPDFEnable VARCHAR2(10) := 'MAE='; -- MacroPDFEnable Y/N
MacroPDFFileID VARCHAR2(10) := 'MAF='; -- MacroPDFFileID (number)
MacroPDFLastSegment VARCHAR2(10) := 'MAS='; -- MacroPDFLastSegment Y/N
MacroPDFSegmentIndex VARCHAR2(10) := 'MAL='; -- MacroPDFSegmentIndex (number)
PDFColumns VARCHAR2(10) := 'COL='; -- PDFColumns
PDFErrorCorrection VARCHAR2(10) := 'ECL='; -- PDF Error Correction Level
*/
l_url VARCHAR2(4000);
l_profile VARCHAR2(40) := 'XXMC_IDAUTOMATION_SERVLET';
l_pdf417 VARCHAR2(30) := '/iDAutomationServlet_pdf417?';
l_code VARCHAR2(4000);
l_text VARCHAR2(1);
l_pt VARCHAR2(1) := 'Y';
l_mae VARCHAR2(1) := 'N';
l_maf NUMBER := 0;
l_mas VARCHAR2(1) := 'N';
l_mal NUMBER := 0;
l_col NUMBER := 5;
l_ecl NUMBER := 5;
l_length NUMBER := 0;
l_webhost VARCHAR2(1000);
BEGIN
l_url := FND_PROFILE.value(l_profile);
l_url := REPLACE(l_url, 'localhost', p_hostname);
l_code:= APEX_UTIL.URL_ENCODE(p_code);
l_code := replace(l_code,')', '%29');
IF length(p_code) < 300 THEN
l_col := 8;
ELSE
l_col := 12;
END IF;
l_pt := nvl(upper(p_ProcessTilde),'Y');
l_mae:= nvl(upper(p_MacroPDFEnable),'N');
l_maf:= nvl(p_MacroPDFFileID,0);
l_mas:= nvl(upper(p_MacroPDFLastSegment),'N');
l_mal:= nvl(p_MacroPDFSegmentIndex,0);
l_ecl:= nvl(p_PDFErrorCorrection,5);
l_url := l_url||l_pdf417||'BARCODE='||l_code;
if l_mae = 'Y' then
l_url:= l_url||'&'||
MacroPDFEnable||l_mae||'&'||
MacroPDFFileID||l_maf||'&'||
MacroPDFLastSegment||l_mas||'&'|| --added back and it stops working, comment out and it works
MacroPDFSegmentIndex||l_mal||'&'||
PDFColumns||l_col||'&'||
PDFErrorCorrection||l_ecl||'&'||ProcessTilde||l_pt;
ELSE
l_url:= l_url||'&'||
PDFColumns||l_col||'&'||
PDFErrorCorrection||l_ecl||'&'||ProcessTilde||l_pt;
end if;
RETURN l_url;
END;
Operating System:
Linux
Application:
BI Publisher within E-Business 11i
05-22-13 11.4 year(s) ago
Report Abuse
|