0% found this document useful (0 votes)
86 views

Tips&Tricks

1. The document describes how to update a parent page from a subpage by creating an UpdatePage function. 2. This function creates an Automation variable of type WshShell to automatically update the parent page. 3. The UpdatePage function body uses the WshShell object to send keyboard keys to refresh the parent page. 4. The UpdatePage function is called from a trigger when updating the parent page is needed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views

Tips&Tricks

1. The document describes how to update a parent page from a subpage by creating an UpdatePage function. 2. This function creates an Automation variable of type WshShell to automatically update the parent page. 3. The UpdatePage function body uses the WshShell object to send keyboard keys to refresh the parent page. 4. The UpdatePage function is called from a trigger when updating the parent page is needed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Actualizeaza pagina parinte dintr-o subpagina*

1. In subpagina se creeaza o functie responsabila cu actualizarea paginilor (ex. UpdatePage)


2. In functie se creeaza o variabila de tip Automation (subtip “Windows Script Host Object
Model”.WshShell) al carei scop este actualizarea automata a paginii parinte
3. Corpul functiei UpdatePage este:

IF ISCLEAR(WshShell) THEN

CREATE(WshShell, TRUE, TRUE);

WshShell.SendKeys(‘{F5}’);

WshShell.SendKeys(‘{F5}’);

4. Functia UpdatePage se apeleaza din trigger-ul corespunzator pentru care se doreste actualizarea
paginii parinte.

*actualizeaza doar campuri de tip FlowField

StikNotes

pt job control si template


in codeunit 5010327, adaugam o globala Ridraport, si adaugam si idul raportul in
descriere
5163305: BEGIN

ReportTemplateInterface.GetParameter(ReportTemplate."No.",p_TemplateID,1,Data
ItemTableName,SavedDataItemView);
Adresse.SETVIEW(SavedDataItemView);
R5163305.SETTABLEVIEW(Adresse);

ReportTemplateInterface.GetParameter(ReportTemplate."No.",p_TemplateID,2,Data
ItemTableName,SavedDataItemView);
Customer.SETVIEW(SavedDataItemView);
R5163305.SETTABLEVIEW(Customer);
ReportTemplateSI.setLoadOptionsNow(TRUE);
R5163305.USEREQUESTPAGE(TRUE);
R5163305.RUNMODAL;
END;

REPORT HEADER

Globals
Name DataType Subtype Length
Benutzer Record Benutzer newsystem
CSI Codeunit SingleInstance
Gemeinde Record Gemeinde Einrichtung

DataSets(coloane in data item)


Data Type Data Source Name Include Caption
0 Column COMPANYNAME COMPANYNAME No
0 Column Benutzer."Benutzer-ID" ReportUserID No
0 Column Benutzer.Name ReportUserName No
0 Column Gemeinde.Gemeindename Gemeindename

OnInitReport
Benutzer.GET(CSI.BENUTZERID);

OnPreReport-pt Header
Gemeinde.fn_Get_Gemeinde('','');

LayOut
Companyname =First(Fields!COMPANYNAME.Value, "DataSet_Result")
GemeindeName=First(Fields!Gemeindename.Value, "DataSet_Result")
Pagini=="Seite " & Globals!PageNumber & " von " & Globals!TotalPages
ID==First(Fields!ReportUserID.Value, "DataSet_Result")
UserName=First(Fields!ReportUserName.Value, "DataSet_Result")
Date =Globals!ExecutionTime

TITLE

Globals

Name DataType Subtype Length


Title Text 250
BerichtlisteDrucken Codeunit Berichtliste - Drucken

DataSets(coloane in data item)


Data Type Data Source Name Include Caption
0 Column Title ReportTitle

OnInitReport
Title := BerichtlisteDrucken.fn_ÜberschriftBericht(Text001);

FILTER

Globals
Name DataType Subtype Length
Filter Text 250

DataItem
Data Type Data Source Name Include Caption
0 Column Filter Filter No

OnPreReport
Filter:= "_____________".GETFILTERS;

REPORT FOOTER

Globals
Name DataType Subtype Length
AktuellerReportID Integer

DataSets(coloane in data item)


Data Type Data Source Name Include Caption
0 Column AktuellerReportID ReportID No

OnInitReport-pt Footer
EVALUATE(AktuellerReportID,COPYSTR(CurrReport.OBJECTID(FALSE),8));

LayOut
Report id ="ID " & First(Fields!ReportID.Value, "DataSet_Result")

Pentru a putea selecta anumite tabele in functie de un anumit Type, putem folosi
o globala de tip Variant
Pentru exemplu Pg 5093621-ObjektStrukture si subPage-ul 5093683
Basisinformationen FactBox

CULORI
Globals
Name DataType Subtype Length
ReportingMngt Codeunit Reporting Management
PrinterviewSetup Record Reportlayout Setup

DataItem

0 Column PrinterviewSetup.TabulatedLineColor TabulatedLineColor No

OnInitReport
ReportingMngt.InitPrinterviewSettings(AktuellerReportID,PrinterviewSetup);

Layout
Pe liniile de detaliu, background color
=iif(RowNumber(Nothing) mod 2 = 1, First(Fields!TabulatedLineColor.Value,
"DataSet_Result"), "None")

Tips
-set field group for dropDown list
-Eg: in TB1 fild F11 with ID 1 is used in onother table, (TB2 for field F21 has
property TableRelation = TB1), so we define in TB1 a field group
id - id of the field
name - action tipe(dropDown, assistEdit, etc.)
Field - the group of field that we want to see in dropDown list
https://msdn.microsoft.com/en-us/library/dd354969(v=nav.71).aspx

-REPORTS WITH MULTIPLESELECTION ON RQP


-5222630,5222631,5222632
-fara multiple selection, cu text in onlookup triger rqp 5093910

Get image from budy to header

Shared Data2 as Object


Shared Data3 as Object

Public Function GetData1(Num as Integer, Group as integer) as Object


if Group = 1 then
Return Data2
End If
if Group = 2 then
Return Data3
End If
End Function

Public Function SetData1(NewData as Object,Group as integer)


If Group = 1 and IsNothing(NewData) = false Then
Data2 = NewData
End If
If Group = 2 and IsNothing(NewData) = false Then
Data3 = NewData
End If
Return True
End Function
textbox in body =Convert.ToBase64String(Fields!Logo_HKR.Value)

=Code.SetData(ReportItems!HeaderData.Value, 1)
Image expresion =code.GetData1(1,1)

Functie de despartire a sumei pe 2 randuri

Public Function ConvertVal3( ByVal Value As String,ByVal Lengh As integer )


if Len(Value)>Lengh +2 then
Return Left(Value,Len(Value)-6) + CHR(10) + CHR(13) + Right(Value,6)
end if
if Len(Value)>Lengh then
Return Left(Value,Len(Value)-2) + CHR(10) + CHR(13) + Right(Value,2)
end if
Return Value
End Function

Apel
Code.ConvertVal3(FormatNumber(Fields!Betrag_Vorgangsnummer.Value,2),14) - pentru valori
aduse ca decimal

Code.ConvertVal3(Fields!Betrag_Vorgangsnummer.Value,14) - pentru valori aduse ca text

SETDATA si GETDATA Function


Shared Data1 as Object

Public Function GetData(Num as Integer, Group as integer) as Object


if Group = 1 then
Return Cstr(Choose(Num, Split(Cstr(Data1),Chr(177))))
End If
End Function

Public Function SetData(NewData as Object,Group as integer)


If Group = 1 and NewData > "" Then
Data1 = NewData
End If
Return True
End Function

SAU

Public Function GetData(Num as Integer) as Object


Return Cstr(Choose(Num, Split(Cstr(Data1),Chr(177))))
End Function

Public Function SetData(NewData as Object)


If NewData > "" Then
Data1 = NewData
End If
Return True
End Function

=Code.SetData(ReportItems!HeaderData.Value, 1)
=Code.SetData(ReportItems!HeaderData.Value)

EXCEL AUTOMATION
-HorizontalAlignment
Left: = -4131
Center: = -4108
Right: = -4152
-VerticalAlignment:
Top: = -4160
Center: =-4108
Bottom: =-4107
Excel color http://dmcritchie.mvps.org/excel/colors.htm
Excel border http://technet.microsoft.com/en-us/library/ee692886.aspx

Raport care soloseste si nu reqest formul 5011733


Licenta pe obiecte
IF LicPermission.GET(LicPermission."Object
Type"::TableData,DATABASE::"Online Message Entry") THEN
IF LicPermission."Read Permission" = LicPermission."Read
Permission"::Yes THEN
EXIT(TRUE);
EXIT(FALSE);

LicPermission Record License Permission

format with 2 decimals + round Report 5093425


FORMAT(value,0,'<Precision,2><sign><Integer Thousand><Decimals,3>');

-link pentru schimbare rapoarte default in report selection


https://public.fumgroup.com/teamseiten/releasedokumente/

https://www.youtube.com/watch?v=k22M_RtXq5Q&index=24&list=RDyhXAvglST3
U

You might also like