|
|
#1 |
|
MCTS
|
Отчет с разной ориентацией листов.
Нужно только аксаптовскими средствами напечатать отчет, у которого первые несколько страниц - в портретной ориентации, потом идут в альбомной. Соответственно, делаем:
X++: PS_ActWork.executeSection(); // портретная PS_End.executeSection(); // дальше - альбомная element.design().paperOrientation(PrinterOrientation::Landscape); element.newPage(); PS_RevertHeader.executeSection(); Из вариантов вижу только - два отчета с различной ориентацией. Получаем на два телодвижения больше. Но это в моем случае, а если, скажем ориентация должна чередоваться, то это тоже не выход. Как это можно сделать? |
|
|
|
|
#2 |
|
Участник
|
сделайте 2 дизайна один с альбомной другой с портретной ориентацией и переключайтесь между ними
__________________
aLL woRk aNd nO JoY MAKes jAck a dULL Boy |
|
|
|
|
#3 |
|
MCTS
|
X++: element.design("InstallDesignRevert");Если программно ставить позиции для контролов, тогда все нормально работает, но когда переключаемся на альбомную страницу в уже напечатанном отчете, выходит сообщение: Цитата:
Информация:
Правый край бумаги превышен на странице 2 в SmmOrder(InstallDesign) - Отчет, 2 мм сверху. Последний раз редактировалось Eldar9x; 25.06.2008 в 18:07. |
|
|
|
|
#4 |
|
Участник
|
Цитата:
X++: element.design("Facture"); element.design("Facture").unpackPrintJobSettings(conPrintJobSettings); element.design("Facture").orientation(2); element.newPage(); this.printFacture();
__________________
aLL woRk aNd nO JoY MAKes jAck a dULL Boy |
|
|
|
|
#5 |
|
Участник
|
Цитата:
__________________
I believe! |
|
|
|
|
#6 |
|
----------------
|
просто мысль
может в PrintJobSettings тогда изменить paperOrientation для нового дизайна |
|
|
|
|
#7 |
|
Участник
|
И это делал...
__________________
I believe! |
|
|
|
|
#8 |
|
Участник
|
как-то давно искал способа так сделать и не нашел
|
|
|
|
|
#9 |
|
MCTS
|
Вроде как невозможно
![]() Обратите внимание, что в момент отправки отчёта на печать опции закладки 'Параметры' недоступны. Получается эффект запоминания первоначально установленного значения 'Ориентация' и несмотря на то, что данные "обрезаются" корректно, для всех без исключения листов ориентация одна для всех: та, которую установили в самом начале формирования отчёта.
__________________
![]() В глухомани, в лесу Несмотря на красу Дни проводит Лиса Патрикевна. Я никак не пойму Отчего, почему Не пускают куму На деревню |
|
|
|
|
#10 |
|
Участник
|
Значит, решение только одно. Убедить, что отчёт выглядит гораздо красивее, когда он весь, включая титульник, имеет альбомную ориентацию.
__________________
I believe! |
|
|
|
|
#11 |
|
Участник
|
Цитата:
Я ж привел работающий код, который меняет ориентацию в fetch'е. вот весь код метода X++: boolean fetch()
{
real checkedHeight, numOfLines;
boolean firstRow;
mapIterator mapIterator = new mapIterator(chi_invFormatMap);
CHI_InvoiceFormat invoiceFormat;
DictEnum dictEnum = new DictEnum(EnumNum(chi_invoiceFormat));
PrintJobSettings chi_printJobSettings;
boolean pr; // Признак наличия услуг
container conPrintJobSettings;
#define.designStandard("Standard")
;
firstIteration = true;
chi_printJobSettings = new PrintJobSettings(SalesFormLetter::getPrinterSettingsFormletter(DocumentStatus::Invoice));
while (mapIterator.more())
{
invoiceFormat = mapIterator.key();
if (invoiceFormat == CHI_Invoiceformat::LabelParcel)
chi_printJobSettings.copies(1);
else
chi_printJobSettings.copies(2);
if (firstIteration == false)
element.reset();
if (invoiceFormat == CHI_InvoiceFormat::InvoiceFacture ||
invoiceFormat == CHI_InvoiceFormat::Torg12Akt)
{
element.design(#designStandard);
}
else
{
element.design(DictEnum.index2Symbol(invoiceFormat));
}
if (mapIterator.value() != conNull())
conPrintJobSettings = mapIterator.value();
else
conPrintJobSettings = chi_printJobSettings.packPrintJobSettings();
element.printJobSettings(conPrintJobSettings);
TmpSalesPurchReportTable_RU_1 = headerData;
firstRow = false;
while select headerData
{
this.send(headerData);
pr = false;
converter = new RNumDateInWordConverter(headerData.LanguageId);
element.design().languageID(headerData.LanguageId);
// while (salesPurchReport.preSendReportHeader(headerData.RecId, headerData.LanguageId))
{
if (firstRow)
element.newPage();
firstRow = true;
if (invoiceFormat == chi_invoiceFormat::Facture)
this.chi_printFacture();
if (invoiceFormat == chi_invoiceFormat::Check)
this.chi_printCheck();
if (invoiceFormat == chi_invoiceFormat::LabelParcel)
this.chi_printLabelParcel();
if (invoiceFormat == chi_invoiceFormat::Akt)
this.chi_printAkt();
if (invoiceFormat == chi_invoiceFormat::Torg12Akt ||
invoiceFormat == chi_invoiceFormat::Standard ||
invoiceFormat == chi_invoiceFormat::InvoiceFacture)
{
this.initSections();
this.clearTotalsOnPage();
startPageNo = element.page();
if (invoiceFormat == chi_invoiceFormat::Torg12Akt)
this.chi_removeTotalsFromHeader();
numOfLines = headerData.LineNum;
element.execute(3); // PageHeader
element.execute(1); // Logo
element.execute(7); // Body header
while select dynamicData
order by LineNum
where dynamicData.InternalId == headerData.InternalId
{
if (invoiceFormat == chi_invoiceFormat::Torg12Akt &&
dynamicData.CHI_ItemIsService == NoYes::Yes)
{
pr = true;
continue;
}
this.prepareDynamicSection();
if (dynamicData.LineNum < numOfLines ||
dynamicData.LineNum == 1)
{
checkedHeight = sectionBody.heightValue() +
sectionFooter.heightValue() +
sectionPageHeader.heightValue();
}
else
{
checkedHeight = sectionBody.heightValue() +
sectionFooter.heightValue() +
sectionTotal.heightValue() +
sectionPageHeader.heightValue() +
sectionEpilog.heightValue();
}
if ((pageHeight - this.currentYmm100()/100) < checkedHeight)
{
element.execute(14);// Footer
element.newPage();
element.execute(3); // PageHeader
element.execute(7); // SectionHeader
this.clearTotalsOnPage();
}
this.send(dynamicData);
}
this.send(headerData); //ivas bugfix
element.execute(13);// Total
element.execute(2); // Epilog
salesPurchReport.postSendReportHeader();
if (invoiceFormat == chi_invoiceFormat::Torg12Akt && pr == true)
{
element.design("Akt");
element.design("Akt").unpackPrintJobSettings(conPrintJobSettings);
element.newPage();
this.chi_printAkt();
element.design(#designStandard);
}
if (invoiceFormat == chi_invoiceFormat::InvoiceFacture)
{
element.design("Facture");
element.design("Facture").unpackPrintJobSettings(conPrintJobSettings);
element.design("Facture").orientation(2);
element.newPage();
this.chi_printFacture();
element.design(#designStandard);
}
}
}
firstIteration = false;
}
mapIterator.next();
}
return true;
}
__________________
aLL woRk aNd nO JoY MAKes jAck a dULL Boy |
|
|
|
|
#12 |
|
MCTS
|
данный код меняет ориентацию как на экране так и при печати?
А можете, если у вас есть время, сделать небольшой отчётик и выложить проектом сюда?
__________________
![]() В глухомани, в лесу Несмотря на красу Дни проводит Лиса Патрикевна. Я никак не пойму Отчего, почему Не пускают куму На деревню |
|
|
|
|
#13 |
|
Участник
|
Да, меняет. Одновременно может печататься накладная Торг12 и Акт, а они с разной ориентацией
__________________
aLL woRk aNd nO JoY MAKes jAck a dULL Boy |
|
|
|
|
#14 |
|
Участник
|
Цитата:
действительно, если в рамках одного отчета менять дизайн то при печати ориентация не меняется, проглядел в коде reset() ![]() если использовать element.reset(), то получается 2 отчета с разной ориентацией, может устроит такой вариант. X++: public boolean fetch() { ; //ReportDesign1 element.execute(1); //ReportDesign2 element.reset(); element.design("ReportDesign2"); element.design("ReportDesign2").orientation(2); element.execute(1); return true; }
__________________
aLL woRk aNd nO JoY MAKes jAck a dULL Boy |
|
|
| Теги |
| orientation, paperorientation, отчет |
|
|
|