Conditional formatting functions (Basic syntax)

 —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  — —
Sup­port machine trans­la­tion: http://amzn.to/1Z7d5oc
 — —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  — —
Crys­tal Reports Online Help
Con­di­tion­al format­ting func­tions (Basic syn­tax)
When writ­ing a con­di­tion­al format­ting for­mu­la, you may want to use the addi­tion­al func­tions that appear at the top of the Func­tions tree.
Example
If you wanted to form­at the {Customer.Last Year’s Sales} field so that sales of more than $100,000 are prin­ted in green and sales of less than $15,000 are prin­ted in red and all else are prin­ted in black.
Rem Con­di­tion­al format­ting example 1
If {Customer.Last Year’s Sales} > 100000 Then
for­mu­la = crGreen
ElseIf {Customer.Last Year’s Sales} < 15000 Then
for­mu­la = crRed
Else
for­mu­la = crBlack
End IfSince this is a font col­or format­ting func­tion, the list of Col­or Con­stants appears in the Func­tions tree. This example uses three: crGreen, crRed and crBlack. You could have used the actu­al numer­ic val­ues of the col­or con­stants instead. For example, crRed is 255 and crGreen is 32768. How­ever, the for­mu­la is easi­er to under­stand using the col­or con­stants. All con­stant func­tions in Basic syn­tax have the ““cr”” pre­fix.
Note: Some format­ting attrib­utes do not use con­stant func­tions. For example, if you wanted to not print {Customer.Last Year’s Sales} val­ues if the sales were less than $50,000, you could write the fol­low­ing con­di­tion­al format­ting for­mu­la for the sup­press attrib­ute:
Rem Con­di­tion­al format­ting example 2
If {Customer.Last Year’s Sales} < 50000 Then
for­mu­la = True sup­press the value
Else
for­mu­la = False do not sup­press the value
End IfOr more simply:
Rem Con­di­tion­al format­ting example 3 -
Rem equi­val­ent to example 2
for­mu­la = {Customer.Last Year’s Sales} < 50000If the last year’s sales are less than $50,000, then the expres­sion
{Customer.Last Year’s Sales} < 50000is True, and so the for­mu­la returns True. On the oth­er hand, if the last year’s sales are great­er than or equal to $50,000, then
{Customer.Last Year’s Sales} < 50000is False and so the for­mu­la returns False.
 — —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  — –

Pre­vi­ous page Next page
SAP Busi­nessOb­jects
http://www.sap.com/sapbusinessobjects/
Sup­port ser­vices
http://service.sap.com/bosap-support/
Pro­duct Doc­u­ment­a­tion on the Web
http://help.sap.com/

“ —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  — – — —  —  —  —  —  —  —  —  —  —  —  —  —  —  — – — —  —  —  —  —  —  —  —  —  —  —  —  —  —  — –
Appoġġ ta traduzz­joni awto­matika: http://amzn.to/1Z7d5oc
 — —  —  —  —  —  —  —  —  —  —  —  —  —  —  — – — —  —  —  —  —  —  —  —  —  —  —  —  —  —  — – — —  —  —  —  —  —  —  —  —  —  —  —  —  —  — –
Rap­porti Crys­tal Online Għa­jnuna
fun­z­jon­iji­et ifformat­tjar kondizz­jon­ali (sin­tassi Bażiku)
Meta tikteb for­mu­la ifformat­tjar kondizz­jon­ali, inti tista tix­tieq li tuża l-fun­z­jon­iji­et addizz­jon­ali li jidhru fil-quċċata tas-siġra Fun­z­jon­iji­et.
eżem­pju
Jekk int riedu li l-form­at {Customer.Last Sena Bejgħ} qasam sabiex li l-bejgħ ta aktar minn $ 100,000 huma stam­pati ħad­ra u l-bejgħ ta’ inqas minn $ 15,000 huma stam­pati bl-aħmar u kollox huma stam­pati bl-iswed.
Rem Kun­dizz­jon­ali eżem­pju ifformat­tjar 1
Jekk {Bejgħ Customer.Last Sena}> 100000 Imbagħad
for­mu­la = crGreen
ElseIf {Bejgħ Customer.Last Sena} <15,000 Imbagħad
for­mu­la = crRed
Else
for­mu­la = crBlack
Tmiem IfSince din hija fun­z­joni ifformat­tjar font col­or, il-lista ta Col­or kostanti tid­her fil-siġra Fun­z­jon­iji­et. Dan l-eżem­pju użi tli­eta: crGreen, crRed u crBlack. Inti set­għet tuża l-valuri numer­iċi attwali tal-kostanti kulur min­flok. Per eżem­pju, crRed huwa 255 u crGreen huwa 32768. Madankollu, il-for­mu­la hija aktar faċli biex jin­ftiehem bl-użu kostanti kulur. fun­z­jon­iji­et kostanti koll­ha fl sin­tassi Bażiku għand­hom il- ““cr”” pre­fiss.
Nota: Xi attributi ifformat­tjar ma jużawx fun­z­jon­iji­et kostanti. Per eżem­pju, jekk int riedu ma jistam­paw valuri {Customer.Last Sena Bejgħ} jekk il-bejgħ kien inqas minn $ 50,000, inti tista tikteb l-for­mu­la ifformat­tjar kondizz­jon­ali li ġej­ja għall-attribut jrażżnu:
Eżem­pju ifformat­tjar Rem Kun­dizz­jon­ali 2
Jekk {Bejgħ Customer.Last Sena} <50000 Imbagħad
for­mu­la = Veru ““jis­sopprimi l-valur
Else
for­mu­la = Foloz ““ma jrażżnu l-valur
Tmiem IFOR aktar sem­pliċi:
Eżem­pju ifformat­tjar rem Kondizz­jon­ali 3 -
Rem ekwivalenti għal eżem­pju 2
for­mu­la = {Bejgħ Customer.Last Sena} <50000If bejgħ l-aħħar is-sena huma inqas minn $ 50,000, allura l-espress­joni
{Bejgħ Customer.Last Sena} <50000is Veru, u għal­hekk l-for­mu­la pros­pet­ti Veru. Min-naħa l-oħra, jekk il-bejgħ tal-aħħar sena huma ikbar minn jew ugwali għal 50,000 $, allura
{Bejgħ Customer.Last Sena} <50000is Foloz u għal­hekk l-for­mu­la pros­pet­ti Foloz.
 — —  —  —  —  —  —  —  —  —  —  —  —  —  —  — – — —  —  —  —  —  —  —  — —

paġna ta qabel paġna li jmiss
SAP Busi­nessOb­jects
http://www.sap.com/sapbusinessobjects/
ser­vizzi ta appoġġ
http://service.sap.com/bosap-support/
Dok­u­mentazz­joni pro­dott fuq il-Web
http://help.sap.com/
 

“ —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  — – — —  —  —  —  —  —  —  —  —  —  —  —  —  —  — – — —  —  —  —  —  —  —  —  —  —  —  —  —  —  — –
Onder­steun­ing masji­en ver­tal­ing: http://amzn.to/1Z7d5oc
 — —  —  —  —  —  —  —  —  —  —  —  —  —  —  — – — —  —  —  —  —  —  —  —  —  —  —  —  —  —  — – — —  —  —  —  —  —  —  —  —  —  —  —  —  —  — –
Crys­tal Reports Online Hulp
Voor­waar­delike forma­ter­ing funk­sies (Basiese sin­tak­s­is)
By die skryf van n voor­waar­delike forma­ter­ing for­mule, wil jy dalk die byko­mende funk­sies wat aan die bokant van die funk­sies boom ver­skyn gebruik.
voor­beeld
As jy wil die {Customer.Last Jaar se verko­pe} veld form­aat sod­at verko­pe van meer as $ 100,000 gedruk in n groen en verko­pe van mind­er as $ 15,000 is rooi gedruk en alles is gedruk in swart.
Rem Voor­waar­delike forma­ter­ing voor­beeld 1
As {Customer.Last Jaar se verko­pe}> 100000 Toe
for­mule = crGreen
Elseif {Customer.Last Jaar se verko­pe} <15000 Toe
for­mule = crRed
anders
for­mule = crBlack
Eindig IfSince dit is n let­ter­tipe kleur opmaak funk­sie, lyk die lys van kleur Kon­stantes in die funk­sies boom. Hierdie voor­beeld gebruik drie: crGreen, crRed en crBlack. Jy kan gebruik die werklike numer­iese waardes van die kleur kon­stantes plaas. Byvoor­beeld, crRed is 255 en crGreen is 32768. Die for­mule is mak­liker om te ver­staan met behulp van die kleur kon­stantes. Alle kon­stante funk­sies in Basiese sin­tak­s­is het die voor­voeg­sel ““cr””.
Let wel: Som­mi­ge opmaak eienskappe nie kon­stant funk­sies gebruik. Byvoor­beeld, as jy wou {Customer.Last Jaar se verko­pe} waardes nie druk as die verko­pe is mind­er as $ 50,000, jy kan die vol­gende voor­waar­delike forma­ter­ing for­mule vir die onder­druk ken­merk skryf:
Rem Voor­waar­delike forma­ter­ing voor­beeld 2
As {Customer.Last Jaar se verko­pe} <50000 Toe
for­mule = true ““onder­druk die waarde
anders
for­mule = onwaar nie die waarde te onder­druk
Eindig IFOR meer een­voud­ig:
Rem Voor­waar­delike forma­ter­ing voor­beeld 3 -
Rem gelyk­staande aan byvoor­beeld 2
for­mule = {Customer.Last Jaar se verko­pe} <50000If verko­pe die afgelope jaar se mind­er as $ 50,000, dan die uit­drukking
{Customer.Last Jaar se verko­pe} <50000is True, en so die for­mule ter­ug Waar. Aan die ander kant, as die vori­ge jaar se verko­pe is groter as of gelyk aan $ 50,000, dan
{Customer.Last Jaar se verko­pe} <50000is Vals en so die for­mule ter­ug Vals.
 — —  —  —  —  —  —  —  —  —  —  —  —  —  —  — – — —  —  —  —  —  —  —  — —







Vori­ge Vol­gende
SAP Busi­ness
http://www.sap.com/sapbusinessobjects/
onder­steun­ings­di­en­ste
http://service.sap.com/bosap-support/
Produk dok­u­mentas­ie op die web
http://help.sap.com/
 

“ —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  — – — —  —  —  —  —  —  —  —  —  —  —  —  —  —  — – — —  —  —  —  —  —  —  —  —  —  —  —  —  —  — –
Mbështetje mak­inë përk­thim: http://amzn.to/1Z7d5oc
 — —  —  —  —  —  —  —  —  —  —  —  —  —  —  — – — —  —  —  —  —  —  —  —  —  —  —  —  —  —  — – — —  —  —  —  —  —  —  —  —  —  —  —  —  —  — –
Crys­tal Reports Online Ndih­më
Funk­sion­et e kushtëzuar form­atim­it (sin­tak­së Basic)
Kur shk­ru­ani një for­mulë të kushtëzuar form­atim­it, ju mund të dëshironi të për­dorni funk­sion­et e tjera që shfaqen në krye të pemës funk­sioneve.
shem­bu­ll
Nëse dëshironi të form­at {Sales Customer.Last Vitit} arën e që shitjet e më shumë se 100,000 $ janë të shty­pura në të gjel­bër dhe shitjet e më pak se $ 15,000 janë të shty­pura në të kuqe dhe të gjithë të tjer­ët janë të shty­pura në të zezë.
Shem­bu­l­li Rem kushtëzuar Form­atimi 1
Nëse {Sales Customer.Last Vitit}> 100000 Pas­taj
for­mu­la = crGreen
ElseIf {Sales Customer.Last Vitit} <15000 Pas­taj
for­mu­la = crRed
tjetër
for­mu­la = crBlack
Fun­di IfSince ky është një funk­sion form­atimi ngjyra font, lista e Col­or kon­stante shfaqet në pemë funk­sione. Ky shem­bu­ll për­dor tre: crGreen, crRed dhe crBlack. Ju mund të keni për­dor­ur vler­at aktuale numerike të kon­stanteve ngjyra në vend. Për shem­bu­ll, crRed është 255 dhe crGreen është 32768. Megjithatë, for­mu­la është më e lehtë për të kup­tu­ar për­dor­im­in e kon­stantet ngjyra. Të gjitha funk­sion­et e vazh­duesh­me në sin­tak­së themelore kanë ““cr”” para­sht­esë.
Shën­im: Disa atrib­utet e form­atim­it nuk për­dor­in funk­sion­et e vazh­duesh­me. Për shem­bu­ll, në qoftë se ju të kërkuar për të mos shty­pur vler­at {Sales Customer.Last Vitit} nëse shitjet janë më pak se $ 50.000, ju mund të shk­ru­ani në vijim kushtëzuar for­mulën form­atim­it per atribut të shty­pur:
Rem kushtëzuar shem­bu­ll form­atim­it 2
Nëse {Sales Customer.Last Vitit} <50000 Pas­taj
for­mu­la = True shty­pur vlera
tjetër
for­mu­la = False nuk e shty­pur vlera
Fun­di IFOR më thjesht:
Rem kushtëzuar shem­bu­ll form­atim­it 3 -
Rem ekui­val­en­te me shem­bu­llin 2
for­mu­la = {Sales Customer.Last Vitit} <50000If shitjeve të vitit të kalu­ar janë më pak se $ 50.000, atëherë shpre­hja
{Sales Customer.Last Vitit} <50000is Vër­tetë, dhe kështu for­mu­la kthen True. Nga ana tjetër, nëse shitjet e vitit të kalu­ar janë më të mëd­ha se ose e bara­bartë në $ 50,000, atëherë
{Sales Customer.Last Vitit} <50000is False dhe kështu for­mu­la kthehet False.
 — —  —  —  —  —  —  —  —  —  —  —  —  —  —  — – — —  —  —  —  —  —  —  — —