Dynamically Select or Create Legend Panels
Dynamically Select or Create Legend Panels
Technologies / User Interface Add-Ins / Drawing Views / Floor Plans with PDF Reports
In your paginated report axvw, you can define as many legend panels as you require. In javaScript, you can select required legend panels as per the following:
//required legend panels by their panel IDs
pdfParameters.legends.required = 'panel_rmHighlight;panel_eqHighlight';
If you don’t define legend panels in your paginated report axvw, you can define them dynamically in javaScript:
var legendPanel = {dataSource: legendDS};
if(legendDS === 'highlightDivisionsDs_legend'){
legendPanel.fields = [{table:'dv', name:'name'},{table:'dv', name:'hpattern_acad', title:'Legend'}];
}else if(legendDS === 'highlightDepartmentsDs_legend'){
legendPanel.fields = [{table:'dp', name:'dv_id'},{table:'dp', name:'name'}, {table:'dp', name:'hpattern_acad', title:'Legend'}];
}else if(legendDS === 'highlightCategoriesDs_legend'){
legendPanel.fields = [{table:'rm', name:'rm_cat'}, {table:'rmcat', name:'hpattern_acad', title:'Legend'}];
}else if(legendDS === 'highlightSuperCategoriesDs_legend'){
legendPanel.fields = [{table:'rmcat', name:'supercat'},{table:'rmcat', name:'hpattern_acad', title:'Legend'}];
}else if(legendDS === 'highlightStandardsDs_legend'){
legendPanel.fields = [{table:'rm', name:'rm_std'}, {table:'rmstd', name:'hpattern_acad', title:'Legend'}];
}
pdfParameters.legends.required = [legendPanel];
Example: http://localhost:8080/archibus/schema/ab-products/solutions/drawing/ab-ex-drawing-rpt-pdf.axvw