calculationparameters

parameters add  时间:2021-02-19  阅读:()
APresentationofTeachUcompIncorporated.
CopyrightTeachUcomp,Inc.
2011TeachUcomp,Inc.
…it'sallaboutyouAdvancedCrystalReports2AdvancedCrystalReportsTeachUcomp,Inc.
AdvancedCrystalReportsCopyright:Copyright2011byTeachUcomp,Inc.
Allrightsreserved.
Thispublication,oranypartthereof,maynotbereproducedorstoredinaretrievalsystem,ortransmittedinanyformorbyanymeans,electronic,mechanical,recording,photocopying,orotherwise,withouttheexpresswrittenpermissionofTeachUcomp,Inc.
ForPDFmanuals,TeachUcomp,Inc.
allowstheownerofthePDFmanualtomakeupto2additionalcopiesofthePDFmanualthattheownermayplaceonupto2additionalnon-sharedcomputerharddrivesforeaseofusewhenusingtheaccompanyingCD-ROMtutorials.
TeachUcomp,Inc.
alsograntsunlimitedpersonalprintingrightstotheowner,strictlylimitedtothepurposesofpersonalorprivateeducationorresearch.
Theunauthorizedreproductionordistributionofthiscopyrightedworkisillegal.
Criminalcopyrightinfringement,includinginfringementwithoutmonetarygain,isinvestigatedbytheFBIandispunishablebyuptofiveyearsinfederalprisonandafineof$250,000.
TrademarkAcknowledgements:SAP,R/3,SAPNetWeaverandanyotherSAPproductsorservicesmentionedhereinaretrademarksorregisteredtrademarksofSAPAG.
CrystalReports,BusinessObjects,CrystalDecisions,BusinessObjects,andanyotherBusinessObjectsproductsorservicesmentionedhereinaretrademarksorregisteredtrademarksofBusinessObjectsS.
A.
.
BusinessObjectsisanSAPcompany.
Windows,Windows95,Windows98,WindowsMe,WindowsXP,WindowsVista,Windows7,MicrosoftWord97,MicrosoftWord2000,MicrosoftWordXP,MicrosoftWord2003,MicrosoftWord2007,MicrosoftWord2010,MicrosoftExcel97,MicrosoftExcel2000,MicrosoftExcelXP,MicrosoftExcel2003,MicrosoftExcel2007,MicrosoftExcel2010,MicrosoftAccess97,MicrosoftAccess2000,MicrosoftAccessXP,MicrosoftAccess2003,MicrosoftAccess2007,MicrosoftAccess2010,MicrosoftPowerPoint97,MicrosoftPowerPoint2000,MicrosoftPowerPointXP,MicrosoftPowerPoint2003,MicrosoftPowerPoint2007,MicrosoftPowerPoint2010,MicrosoftOutlook2000,MicrosoftOutlookXP,MicrosoftOutlook2003,MicrosoftOutlook2007,MicrosoftOutlook2010,MicrosoftPublisher2000,MicrosoftPublisherXP,MicrosoftPublisher2003,MicrosoftPublisher2007,MicrosoftPublisher2010,MicrosoftOffice97,MicrosoftOffice2000,MicrosoftOfficeXP,MicrosoftOffice2003,MicrosoftOffice2007,andMicrosoftOffice2010areregisteredtrademarksofMicrosoftCorporation.
Otherbrandnamesandproductnamesaretrademarksorregisteredtrademarksoftheirrespectiveholders.
Disclaimer:Whileeveryprecautionhasbeenmadeintheproductionofthisbook,TeachUcomp,Inc.
assumesnoresponsibilityforerrorsoromissions.
Norisanyliabilityassumedfordamagesresultingfromtheuseoftheinformationcontainedherein.
Thesetrainingmaterialsareprovidedwithoutanywarrantywhatsoever,including,butnotlimitedto,theimpliedwarrantiesofmerchantabilityorfitnessforaparticularpurpose.
Allnamesofpersonsorcompaniesinthismanualarefictional,unlessotherwisenoted.
TeachUcomp,Inc.
Phone:(877)925-8080Web:http://www.
teachucomp.
com3AdvancedCrystalReportsTeachUcomp,Inc.
WelcometoTeachucomp,Inc.
sAdvancedCrystalReportsclass.
CrystalReportsisadatabasereportingapplication.
Ithaspowerfulcapabilitiestoaccessandanalyzevarioussourcesofdataforitsreports.
Asbusinessevolvestowardsamoreinformation-basedworkplace,thetalenttoaccessandcreateaccurateandrelevantreportsfrommultipledatasourcesisquicklybecominganecessityforbusinessesofallsizes.
However,asabusinessentitygrows,itmayoftenfindthatthedataneededinordertomakeinformedbusinessdecisionsiscontainedwithinvariousdatabaseapplications.
CrystalReportsprovidesasolutiontothisissue,dueinlargeparttoitsflexibilityinaccessingvarioustypesofdata.
YoucanuseCrystalReportstoaccessdatafromdatabasefilescommonlyusedinmanytypesofbusinessesandindustries,fromdesktopdatabasesolutionslikeMicrosoftAccessorMicrosoftVisualFoxProtomainframeorserver-baseddatafileslikeMicrosoftSQLServerorOracle.
CrystalReportscanalsobeusedbymanydifferenttypesofindividualswithinanorganization.
OnedoesnothavetobeanITguruinordertogeneratebasicreports,asCrystalReportsprovidesmanyintuitivewizardstoassistinreportgeneration.
ItalsohasmoreadvancedfeaturesfortheITprofessionalsuse,too.
Whateveryourdatareportingneeds,onewillfindthatknowingCrystalReportsisausefultoolinmakingmoreinformedbusinessdecisions.
IntroductionandOverview4AdvancedCrystalReportsTeachUcomp,Inc.
CHAPTER13-AdvancedReportingTools13.
1-UsingRunningTotals13.
2-CreatingParameterFields-(2011,2008&11)13.
3-CreatingParameterFields-(10)13.
4-ParameterizedRecordSelection13.
5-EnteringParameterValues-(2011,2008&11)13.
6-EnteringParameterValues-(10)13.
7-CreatingSubreports13.
8-ReportAlerts13.
9-ReportAlertFunctions5AdvancedCrystalReportsTeachUcomp,Inc.
AdvancedReportingTools13.
1-UsingRunningTotals:Youcanmakeformulafieldswhichdisplaytheresultsofarunningtotal,versussimplyshowingtheresultstabulatedattheendofarecordgrouping.
Youcreatethesefieldsinthe"FieldExplorer"pane,justasyouwouldanyothertypeofformulafield.
Thesefieldsfunctioninmuchthesamewayasasummaryfieldfunctions,however,youhaveagreateramountofcontroloverhowthecalculationisperformedandwhenthecalculatedvalueisreset.
Tocreatearunningtotalfield,clickonthe"RunningTotalFields"entryinthe"FieldExplorer"pane.
Thenclickthe"New"buttoninthetoolbaratthetopofthe"FieldExplorer"panetolaunchthe"CreateRunningTotalField"dialogbox.
Youusethisdialogboxtonamethefieldandsetitscalculationproperties.
Inthe"RunningTotalName:"textboxyoucantypeanamefortherunningtotalfield.
Inthe"Summary"section,youselectwhichfieldsvaluestocalculate.
Clickonthefieldtosummarizewithinthe"AvailableTablesandFields:"listattheleftsideofthedialogbox,andthenclickthe">"arrowbuttontomovetheselectedfieldintothe"Fieldtosummarize"textboxattheright.
Thenusethe"Typeofsummary"drop-downtoselectwhattypeofsummarycalculationtoperformoverthechosenfield.
Inthe"Evaluate"sectionyoucansettheparametersunderwhichthecalculationwillbeperformedfortheselectedfieldsvalues.
Youcanselectthe"Foreachrecord"optiontocalculatethechosenfunctionforeveryrecordinthereport.
Youcanalsochoosethe"Onchangeoffield"optiontocalculateavaluebasedonthechangetothevalueshowninanotherfield.
Ifyoudochoosethatoption,thenclickonthefieldtouseforthechangingvaluesinthe"AvailableTablesandFields"listattheleftofthedialogboxandclickthe">"arrowbuttontomoveitintothe"Onchangeoffield"textboxattherightside.
Youcouldalsochoosethe"Onchangeofgroup"optionbuttoninthe"Evaluate"sectiontoevaluatetheselectedfieldonthechangeofagroupedvalue.
Ifyouchoosethisoption,thenselectwhichgroupsvaluesyouwanttousefromthedrop-downtotherightofthe"Onchangeofgroup"label.
Youcanalsoselectthe"Useaformula"optionbuttonandthenclickthe"X+2"buttontoinvokethe"FormulaEditor.
"IntheFormulaEditor,youcancreateaformulathat,whenevaluatedandfoundtobetrue,willthenperformtheselectedcalculationofthechosenfield.
Thisisveryhandyforcreatingconditionalrunningsumfields.
Forexample,ifyouwanttosumthe"AmountSold"fieldwherethe"OrderCountry"fieldwas"USA,"youcouldsetthatupastheconditionunderwhichthefieldwouldbeadded.
TheresultwouldbethesumofallsalesfromtheUSA.
Inthe"Reset"section,youcanchooseunderwhichconditionstherunningtotalwillberesetbacktozero.
Ifyouselect"Never,"thefieldsvalueswillneverbesetbacktozerointhereport.
Youcanalsoselectthe"Onchangeoffield"optionbuttoninthe"Reset"sectiontohavetherunningtotalfieldgetresetbacktozeroonthechangeofvaluetoaspecifiedfield.
Ifyouselectthisoption,thenselectbywhichfieldyouwanttoresetthevaluefromthelistdisplayedinthe"AvailableTablesandFields:"listattheleftsideofthedialogbox,andclickthe">"arrowbuttontomovetheselectedfieldintothetextboxdisplayed.
Youcanalsoselectthe"Onchangeofgroup"option,andthenselectbywhichgroupschangingvaluesyouwishtoresettherunningtotalbacktozerofromthedrop-downwhichappears.
Youcanalsoclickthe"Useaformula"optionbutton,andthenclickthe"X+2"buttontoinvokethe"FormulaEditor.
"Inthe"FormulaEditor,"youcancreateaconditionthat,whenmet,willresetthevalueoftherunningtotalfieldbacktozero.
Onceyouhavesetthedesiredattributesoftherunningtotalfield,justclick"OK"inthe"CreateRunningTotalField"dialogbox.
Thefieldthatyoucreatedwillthenbedisplayedinthe"FieldExplorer"pane.
Youcantheninsertitintoyourreportjustasyouwouldanyothertypeoffield.
6AdvancedCrystalReportsTeachUcomp,Inc.
AdvancedReportingTools13.
2-CreatingParameterFields-(2011,2008&11):Aparameterfieldallowsyoutospecifyavaluethatwillbeusedbythereportwhenthereportdataisrefreshed.
Parameterscanservemultiplepurposesinreportsandareoneofthemostpowerfultoolsthatyouhave.
Youcanuseparameterstofilterreportdataatrun-time,selectingwhichrecordstodisplayandcalculate"on-the-fly.
"Youcouldalsohaveaparameterpromptyoutoenteravaluewhichcanthenbeusedbyaformulainthereport,forexample.
Youcreatetheparameterfieldsinthe"FieldExplorer"pane,justasyoucreatemanyothertypesoffields.
Youdohaveafewconsiderationstobearinmindasyoucreatetheparameterfieldsforuseinyourreports.
Firstoff,parameterfieldsthatwillbeusedbyreportgrouporrecordselectionformulasdonotneedtohavetheparameterfieldplacedintotheactualreport.
Simplycreatetheparameterfieldandthenreferenceitasneededwithintheselectionformula.
Also,youcancreateparametersthatwillaccept"string,""number,""currency,""boolean,""date,""time,"or"date/time"valuesforuseinthereport.
Tocreateaparameterfield,selectthe"ParameterFields"optioninthe"FieldExplorer"paneandthenclickthe"New"buttoninthetoolbaratthetopofthepane.
Thiswilllaunchthe"CreateNewParameter"dialogboxwhereyoucanspecifythesettingsfortheparameterfield.
The"Name:"and"Type:"aretheonlytworequiredargumentsinthisdialogbox.
Youcanspecifytheothervalues,asneeded.
Inthe"CreateNewParameter"dialogbox,enterthenameoftheparameterfieldthatyouwanttocreateintothe"Name:"textbox.
Itcanbeupto255charactersinlength,butshouldbeshort,descriptive,andeasytoreference.
Youcanthenusethe"Type:"drop-downtoselectthedatatypeoftheparameter.
Inthe"ListofValues:"area,youcancreatealistofpresetvaluesfromwhichtheusercanselectthedesiredvaluetousefortheparameterwhenrefreshingthereportdata.
Youcaneitherselectthe"Static"optionorthe"Dynamic"option.
Notethatyourchoicechangeswhatfieldsareavailableinthedialogbox.
Ifyouselect"Static,"thenyouarepresentingtheuserwithchoicesthatalwayscontainthesamevalues.
Thisisusedforpossibleparameterchoicesthatdonotchangeveryfrequently.
Ifyouchoose"Dynamic,"thenyoucreatealistofpossibleparameterchoicesthatcanbeupdated,asneeded.
Inaddition,youcancreatecascadingchoicesinthedynamicparameterprompts.
Thisallowsyoutomaketheuserselectfrommultiplefieldstospecifyanexactvalue.
Forexample,youcoulduseboththe"City"and"State"fieldsinadynamicprompttopreventconfusionaboutwhichcityisbeingreferredtowhenoneisselected.
Forexample,usingacascadingpromptyoucouldmaketheuserchoose"GrandRapids,MI"versus"GrandRapids,MN.
"Inastaticpromptyouwouldsimplyseethecityof"GrandRapids"showntwiceinthelist,withoutanyideawhichvaluewasassociatedwithwhichstate.
Ifyouselectthe"Static"option,thenyoucanprovidealistofvaluesfromadatabasefieldfromwhichtheusercanchoosebyselectingthenameofthedesireddatabasefieldfromthe"ValueField"drop-down.
Youcanusethe"DescriptionField:"drop-downtochooseadatabasefieldwhichdescribesthecontentsofthe"ValueField"choice,ifneeded.
Forexample,ifyouselectedthe"EmployeeID"fieldasthe"ValueField,"thenyoucouldselectthe"EmployeeName"fieldasthe"DescriptionField"sotheusercouldseeanameversusanumberwhenselectingaparametervalue.
Ifyouwishtomanuallytypealistofvaluesand,optionally,descriptions;thenyoucaneitherclickintothefirstrowofthe"Value"columntobeginenteringtheparametervalues,oryoucanclickthe"Insert"buttontoappendanewentrytothelistofvalues.
Inthevaluelist,youcanclickintoanyentrymade,andthenclickthe"Delete"button,whichlookslikeablackx,todeletetheselectedentry.
Youmayalsoclickthe"MoveUp"and"MoveDown"arrowbuttontomovetheselectedchoiceupordownthroughthelistofvalues.
Youcanusethe"Actions"drop-downbuttontoperformvariouscommandsonthevaluelistshown.
Ifyouselectedtouseadatabasefieldvalue,thenyoumustselectthe"Appendalldatabasevalues"commandtoloadthevaluesfromtheselectedfield(s)intothevaluelist.
Youcanselectthe"Clear"7AdvancedCrystalReportsTeachUcomp,Inc.
AdvancedReportingTools13.
2-CreatingParameterFields-(2011,2008&11-cont.
):commandtoremovealllistvaluesshown.
Youcanimportadelimitedlistofvaluesfromatextfilebyclickingthe"Import…"commandchoice.
Thislaunchesaseparatedialogbox,whichyoucanusetobrowseforandopenthedesireddelimitedtextfile.
Also,youcanselectthe"Export…"commandtoexportamanuallisttoadelimitedtextfileusingthe"SaveAs"dialogbox.
Ifyouchoose"Dynamic"inthe"ListofValues:"section,thenyouhavedifferentchoicestomakeinthissection.
Ifyouhaveacascadingparameterchoice,meaningitusesmultiplefields,thentypewhateveryouwouldliketohavedisplayedasthepromptingtextforthecascadingparameterintothe"PromptGroupText:"textbox.
Youcanusethiswithsingle-fieldprompts,aswell,butthetitleshowsupatthetopoftheparameterdialogboxpromptandnotovertheindividualfields.
Tocreateanewlistoffieldvaluesfromwhichtheusercanselect,ensurethatthe"New"choiceisselectedinthe"ChooseaDataSource:"section.
Youcanthenselectfromthelistoffieldsinthecurrentdatasourcebyusingthe"Insert"buttonorbyclickingintothefirstemptyrowofthe"Value"column.
Youcanselectanyfieldenteredintothelistandclickthe"Delete"buttontodeletethefield.
Youcanalsoreorganizeaselectedvaluebyclickingthe"MoveUp"and"MoveDown"arrowbuttons.
Ifyouwouldliketouseasecondaryfieldforthedescriptionofthefieldselectedinthe"Value"column,thenyoucanchooseafieldforthatpurposetotherightinthe"Description"column.
Inthe"Parameter"column,youcanclickonavaluetounbinditfromtheparameter.
Youcanalsoclickittobindanunboundparametervalue.
Onceyouhavesetyourvaluelist,thenyoucansetthedesiredoptionsforeachvalueinthe"Options"area.
Thechoicesfromwhichyoucanselectchangedependingonwhetherornotyouselected"Static"or"Dynamic"valuefields.
Forall"Static"valuesthatarenot"Boolean"(logical)values,youcansetthefollowingparameteroptionsbyclickingintothe"Setting"columnandenteringorchangingthevalue.
Inthe"PromptText:"option,youcanenterthetextthatyouwanttoappearastheparameterprompt.
Youcanchoose"True"or"False"forthe"PromptWithDescriptionOnly"toonlyallowthedescriptionfieldchoicestobeviewedintheparameterprompt(True),ortoshowboththevalueanddescriptionfields(False).
Youcanenteradefaultparametervaluetouseinthe"DefaultValue"option.
Ifyouselect"True"inthe"Allowcustomvalues"option,thentheuserscantypeintheirownvaluesinadditiontoselectingfromthevaluelist.
Ifsetto"False,"thentheymustonlychoosefromthevaluesshowninthelist.
Ifthe"Allowmultiplevalues"optionissetto"True,"thentheparameterpromptwillallowmultiplevaluestobeselected.
Thisalsoenablesyoutosetboththe"Allowdiscretevalues"and"Allowrangevalues"optionsto"True,"aswell.
Normally,youcanonlyselectoneofthetwooptions.
Youcansetthe"Allowdiscretevalues"optionto"True"toallowforonlysingularparametervaluestobeselected.
Althoughtherecanbemultiple,singularvalues-thismeansthattherearenorangedparametervalues,suchasallvaluesfrom$100to$1,000.
Youcansetthe"Allowrangevalues"optionto"True"toallowrangedparametervaluechoices.
Youcanusethe"Minlength"optiontoentertheminimumnumberofcharactersthatcanappearasavalueentry.
Youcanalsousethe"Maxlength"toenterthemaximumnumberofcharactersthatcouldappearasavalueentry.
Youcanusethe"EditMask"optiontoenterafieldmaskthatrestrictsthepossiblerangeofcharactersthatyouruserscouldinput,ifdesired.
Whensettingstatic,booleanparameteroptions,youcansetthe"PromptText,""PromptWithDescriptionOnly,"and"DefaultValue"options,asnormal.
Youcanalsoenterthe"Booleangroup#"optiontosetthenumberofthegrouptowhichyouwishtoaddtheselectedbooleanvalue.
BooleangroupsarecreatedwhenCrystalReportsrequiresuserstoenterapromptvalue.
BooleangroupscancontainmanyBooleanparameterfields.
Whenauserselectagroupofbooleanvalues,theycansetthesamevaluesordifferentvaluestoeachparameterinthegroup.
Youusethe"ExclusiveGroup"optiontosetthisbehavior.
Ifthisoptionissetto"True,"userscanonlyselectasingle"True"booleanvaluefromthebooleanoptions8AdvancedCrystalReportsTeachUcomp,Inc.
AdvancedReportingTools13.
2-CreatingParameterFields-(2011,2008&11-cont.
):presentedinthegroup.
Ifsetto"False,"thentheuserscansetmultipleoptionsinthegroupto"True.
"Ifyouselecteda"Dynamic"setofvalues,thenyoucansetthe"PromptText,""PromptWithDescriptionOnly,""Allowmultiplevalues,""Allowdiscretevalues,"and"Allowrangevalues"options,asnormal.
Inaddition,youcanusethe"SortOrder"optiontoselecthowtosortthefieldsdatavaluesintheparameterprompt.
Thevaluescanbesortedineitherascending(A-Z,1-9)orderordescending(Z-A,9-1)orderbyeitherthevaluefieldorthedescriptionfield.
Onceyouhavesetthedesiredparameteroptions,click"OK"inthe"CreateNewParameter"dialogboxtocreatethenewparameterfield.
13.
3-CreatingParameterFields-(10):Parametersaddalevelofflexibilitytoyourreports.
Manytimes,youhavevaluesthatyouwouldliketospecifyatrun-timeinareport.
Aparameterfieldallowsyoutospecifyavaluethatwillbeusedbythereportwhenthereportdataisrefreshed.
Parameterscanservemultiplepurposesinreportsandareoneofthemostpowerfultoolsthatyouhavetoallowforadditionalflexibilitywithinareport.
Youcanuseparameterstofilterreportdataatrun-time,selectingwhichrecordstodisplayandcalculate"on-the-fly.
"Youcouldalsohaveaparameterpromptyoutoenteravaluewhichcanthenbeusedbyaformulainthereport,forexample.
Youcreatetheparameterfieldsinthe"FieldExplorer"pane,justasyoucreatemanyothertypesoffields.
Youdohaveafewconsiderationstobearinmindasyoucreatetheparameterfieldsforuseinyourreports.
Firstoff,parameterfieldsthatwillbeusedbyreportgrouporrecordselectionformulasdonotneedtohavetheparameterfieldplacedintotheactualreport.
Simplycreatetheparameterfieldandthenreferenceitasneededwithintheselectionformula.
Also,youcancreateparametersthatwillaccept"string,""number,""currency,""boolean,""date,""time,"or"date/time"valuesforuseinthereport.
Tocreateaparameterfield,selectthe"ParameterFields"optioninthe"FieldExplorer"paneandthenclickthe"New"buttoninthetoolbaratthetopofthepane.
Thiswilllaunchthe"CreateParameterField"dialogboxwhereyoucanspecifythesettingsfortheparameterfield.
The"Name"and"ValueType"aretheonlytworequiredargumentsinthisdialogbox.
Youcanoptionallyspecifytheothervalues,asneeded.
Inthe"CreateParameterField"dialogbox,youcantypethenameoftheparameterfieldthatyouwanttocreateintothe"Name:"textbox.
Itcanbeupto255charactersinlength,butshouldbeshort,descriptive,andeasytoreference.
Inthe"Promptingtext:"textbox,youcantypethetextthatyouwanttohaveappearwhenthereportpromptsyoutoentertheparametervalue.
Thiscanbeupto255charactersinlength.
Youcanthenusethe"Valuetype:"drop-downtoselectthedatatypeoftheparameter.
Ifyouclickthe"DefaultValues…"buttoninthisdialogbox,youwillopenthe"SetDefaultValues"dialogbox.
Youcanusethisdialogboxtosetadefaultvaluetobeusedincasetheuserdoesntspecifyavalue.
Youcanalsousethisdialogboxtocreatealistofpresetvaluesfromwhichtheusercanselectthevaluetousefortheparameterwhenrefreshingthereportdata.
Ifyouwantthepossiblevaluesfromwhichtheusercouldselecttobedrawnfromadatabasetable,youcanspecifythenameofthetablefromthe"Browsetable:"drop-down.
Fromthere,youcanselectwhichfieldinthetabletousefromthechoicesinthe"Browsefield:"drop-down.
Thevalueswillthenappearinthe"Selectorentervalue:"listattheleftsideofthedialogbox.
Ifyouhadthevalueslistedinatextfilewhichyouwantedtoimport,youcouldclickthe"Import…"buttontolaunchthe"Open"dialogboxwhereyoucouldselectthetextfilewiththevalueswhichyouwantedtouse,andthenclick"Open"tolistthevaluesinthe"Selectorentervalue:"list.
Youcanthenusethearrowbuttonstomovetheselectedlistitemstoandfrom9AdvancedCrystalReportsTeachUcomp,Inc.
AdvancedReportingTools13.
3-CreatingParameterFields-(10-cont.
):the"DefaultValues"listattherightsideofthedialogbox.
Youcanevenclickintothetextboxthatisimmediatelybelowthe"Selectorentervalue:"labelandtypeinthevaluewhichyouwishtoaddtothedefaultvalueslist.
Thenclickthe">"arrowbuttontomoveittothedefaultvalueslist.
Inthe"DefaultValues"listyoucanclickonalistedelementtoselectit.
Youcanthenclickthe"SetDescription…"buttontochangethedescriptionusedfortheselectedvalue,ifdesired.
Alsonoticethatiftheelementsaddedtothe"DefaultValues"listarentinthedesiredorder,youcanselectanentryandthenclickthe"Up"and"Down"arrowsintheupperrightcornerofthelisttoreorganizetheentries,ifdesired.
Inthe"Options"section,youcancheckthe"Lengthlimit"checkboxtorestrictthedataentryoftheparametertoaspecifiedsizerange.
Youcanthentypea"MinLength"anda"MaxLength"intothetextboxesprovided.
Ifyouinsteadprefertospecifyaninputmasktousefortheparameter,youcantypeaninputmaskusingacceptedmaskingcharactersintothe"Editmask:"textbox.
Youcanalsosetthe"Display:"drop-downtoeither"ValueandDescription"or"Description"tochoosewhatwillbeshowninthepicklistusedbythereportuser.
Ifyouwanttosorttheentriesshowninthedefaultvalueslist,youcanchooseasortingmethodfromthe"Order:"drop-down.
Youcanthenusethe"Orderbasedon:"drop-downtochoosetosorteitherbythe"Values"or"Descriptions"used.
Whenyouhavemadeanychangestothesettingsofthedefaultvaluesusedbytheparameterfieldthatyouwanttoapply,click"OK"toreturntothe"CreateParameterField"dialogbox.
Inthisdialogbox,ifyouwanttheusertobeabletochoosemorethanonevaluefromyourlistofdefaultvalues,checkthe"Allowmultiplevalues"checkbox.
Otherwise,theuserwillonlybeallowedtospecifyasinglevaluefromthelistofdefaultsspecified.
Ifyouselectthe"Discretevalue(s)"option,youcanchoosemultiple,individualvaluestousefortheparameter.
Ifyouselect"Rangevalue(s)"instead,youcanselectarangeofvaluesbetweenwhichalloftheothervalueswouldalsobeselected.
Youcouldalsochoose"DiscreteandRangeValues"option.
Youcanalsocheckthe"Alloweditingofdefaultvalueswhenthereismorethanonevalue"checkboxifyouwishtoenablethatfeature.
Wheneveryouhavethedesiredsettingsforthetypeofparameterfieldyouwanttocreatesetinthe"CreateParameterField"dialogbox,click"OK"tocreatetheparameterfield.
13.
4-ParameterizedRecordSelection:OneoftheprimaryreasonstocreateanduseparameterswithinCrystalReportsisforrecordselection.
Imagineifyouhadareportwhichshowedsalesbyregionofyourcompany.
Ifyouhadaparameterwhichyoucoulduseforthe"region"variable,youcouldusethesamereportandchangetheparameter(inthisexample,theregion)eachtimetoshowdifferentregionalsales.
Touseaparameterforrecordselectionaftercreatingthenecessaryparameterfield,clickthe"SelectExpert"buttonintheExpertstoolbar.
Inthe"SelectExpert"dialogboxyouselectthefieldagainstwhichtocomparetheparametervalueandthedesiredcomparisonoperationasnormal.
Thistime,noticethatwhenyouchoosethevalueagainstwhichtocomparethefieldfromthedrop-downavailable,thatthereisaparameterpromptatthetopofthedrop-downofchoicesinthefollowingformat:{ParameterName}.
Ifyouhavemultipleparametersfromwhichyoucouldchoose,thenselectthenameoftheparameterwhosevalueyouwanttousefortherecordselection.
Afteryouhavemadetheselectioncriteria,click"OK.
"Itisimportanttonotethattheparametervalueandthefieldagainstwhichyouarecomparingtheparametervaluemustsharethatsamedatatype.
Forexample,ifyouhada"Number"parameterfield,youcouldnotcompareittoa"String"fieldsvalue.
10AdvancedCrystalReportsTeachUcomp,Inc.
AdvancedReportingTools13.
6-EnteringParameterValues-(10):Afteryouhaveenteredaparameterfieldintoyourreport,youcanpreviewthereporttoforcethereporttorefreshitsdataandenteraparametervalueforuse.
Onceyouhavecreatedthepreviewandsetthevalue,simplyswitchingbetweenthe"Design"and"Preview"tabswillnotnecessarilypromptyoutore-enteranewparametervalue.
Youcanalwaysforcea"refresh"ofthedatabyselecting"Report|RefreshReportData"fromtheMenuBar.
Whenyoudothisinareportthatcontainsparameterizedvaluesusedforthe"Preview,"CrystalReportsinvokesadialogboxaskingifyouwishto"Usecurrentparametervalues"or"Promptfornewparametervalues.
"Selectthedesiredoptionandthenclick"OK"tocontinue.
Whenyouareinitiallyenteringaparametervalue,orifyouselecttore-enteraparametervaluewhenrefreshingreportdata,youwilldosothroughthe"EnterParameterValues"dialogbox.
Inthisdialogbox,youwillseethenamesofthereportparameterslistedinthe"ParameterFields:"list.
Youcanclickonaparameterlistedtodisplayitssettingsandtheparameterspromptbelowthelist.
Thelastselectedvaluefortheparameterisdisplayedatthebottomofthedialogbox.
Youcanclickthe"Reset"buttontoresetalltheparametervaluesbacktotheirdefaultvalues,ifneeded.
Otherwise,allparameterswillretaintheirlastsetting,andyouonlyneedtoselectandchangethevalueoftheparametersthatyouneedtoinordertodisplaythedatayouwanttoseeinthe"Preview.
"Dependingonthetypeofparameterthatyoucreated,youenterthevalueorrangeofvaluestouseforeachparameterintothetextbox(es)ordrop-down(s)atthebottomofthisdialogbox.
Thevalueorvalueswhichyouthenspecifyareusedtobytheparametertoselectrecords,displaythechosenvalue,formatfields,orwhateverelseyoumayuseparametervaluesforinareport.
Onceyouhaveenteredthevaluesforuse,click"OK"toapplythenewparameters.
13.
5-EnteringParameterValues-(2011,2008&11):Afteryouhaveenteredaparameterfieldintoyourreport,youcanpreviewthereporttoforcethereporttorefreshitsdataandenteraparametervalueforuse.
Onceyouhavecreatedthepreviewandsetthevalue,simplyswitchingbetweenthe"Design"and"Preview"tabswillnotnecessarilypromptyoutore-enteranewparametervalue.
Youcanalwaysforcea"refresh"ofthedatabyselecting"Report|RefreshReportData"fromtheMenuBar.
Whenyoudothisinareportthatalreadycontainsparameterizedvaluesusedforthe"Preview,"CrystalReportsinvokesadialogboxaskingifyouwishto"Usecurrentparametervalues"or"Promptfornewparametervalues.
"Selectthedesiredoptionandthenclick"OK"tocontinue.
Whenyouareinitiallyenteringaparametervalue,orifyouselecttore-enteraparametervaluewhenrefreshingreportdata,youwilldosothroughthe"EnterValues"dialogbox.
Inthisdialogbox,youwillseethenamesofthereportparameters,andyoucanselectorenterthedesiredvaluestouseforthereportforeachoneshown.
Afterinitiallyselectingparametervalues,allparameterswillretaintheirlastsetting,andyouonlyneedtoselectandchangethevalueoftheparametersthatyouneedto,inordertodisplaythedatayouwanttoseeinthe"Preview.
"Thevalueorvalueswhichyouthenspecifyareusedtobytheparametertoselectrecords,displaythechosenvalue,formatfields,orwhateverelseyoumayuseparametervaluesforinareport.
Onceyouhaveenteredthevaluesforuse,click"OK"toapplythenewparameters.
11AdvancedCrystalReportsTeachUcomp,Inc.
AdvancedReportingTools13.
7-CreatingSubreports:Anothersophisticatedreporttoolwhichyoucanuseisthesubreport.
Asubreportiscreatedinthesamemannerasanormalreport,butitisthenembeddedwithinamainreportasareportobjectanditcannotcontainanothersubreportwithinit.
Thisallowsyoutoaccessanddisplayinformationfromtwounrelatedreportsinasinglereport,ortodisplaymultipleviewsofreportdatainasinglereport.
Youcancreateeitherlinkedorunlinkedsubreports.
Unlinkedsubreportssimplyhavenorelationshipbetweentherecordsdisplayedinthesubreportandtherecordsdisplayedinthemainreport.
Thedataisunrelatedtoeachotherinmuchthesameway"unlinked"dataintablesisunrelated.
Inlinkedsubreportsthedatainthesubreportismatcheduptodataintheprimaryreport.
Forexample,Ifyoucreatean"Orders"report,youcancreatealinkedsubreportthatdisplaysthe"OrderDetails"foreachrecordinthe"Orders"table.
Thiscouldbeusedasanotherwayofdisplayingthe"one-to-many"typejoinbetweendatainrelatedtables.
Tocreateasubreport,youcanselect"Insert|Subreport…"fromtheMenuBarorclickthe"InsertSubreport"buttonintheInserttoolbar.
Thiswillinvokethe"InsertSubreport"dialogbox.
Inthisdialogboxyoucanselecthowyouwanttocreatethesubreportusingthetwooptionsdisplayed:"Chooseanexistingreport"or"CreateasubreportwiththeReportWizard.
"Ifyouselectthefirstoption,thenclickthe"Browse…"buttontoinvokethe"Open"dialogboxwhereyoucanchoosewhichreportyouwanttoembedasasubreportwithinthemainreport.
Ifyouwantedtocreatethesubreport"on-the-fly"withintheprimaryreport,youcaninsteadchoosethelatteroptionbuttonandthenclickthe"ReportWizard…"buttontolaunchtheReportWizarddialogboxwhichstepsyouthroughthecreationofastandardreport.
Youcanalsocheckthe"On-demandsubreport(similartoahyperlink)"checkboxtocreateasubreportwhichdoesntdisplayitsdatauntiltheuserdouble-clicksonthesubreportlinktodrill-downanddisplaythesubreportdataonanother"Preview"tab.
Theyaredisplayedwithintheirownobjectframeinthemainreport,whichreducestheamountofdisplayspacerequiredwithinthemainreport.
Inaddition,datafroman"On-demandsubreport"isntaccessedfromthedatabaseuntiltheuserdouble-clicksonthesubreporttodisplaythedetaildata.
Youcanlateraccessthesubreportobjectandchangeitscaptionusingthe"FormatEditor.
"Assumingyouwantedtocreateanunlinkedsubreport,youcouldjustclickthe"OK"buttonatthispointandthenclickintothereportattheplacewhereyouwantedtodisplaythesubreportdata.
However,ifyouwantedtocreatealinkedsubreport,youmustthenclickthe"Link"tabinthe"InsertSubreport"dialogbox.
Whenyoucreatealinkbetweentheprimaryreportandthesubreport,theyarelinkedbyaparameterfieldcreatedbythelinkingprocess.
Theparameterfieldisthenusedasareferenceforthesubreportsrecordselectionformula,whichfilterstherecordsdisplayed.
Onthe"Link"tab,youusethe"Forsubreport:"drop-downtochoosewhichsubreporttolinktofromthedrop-downdisplayed.
Theninthe"ContainerReportfield(s)tolinkto"list,selectthereportfieldorunderlyingdatabasefieldwhichwillserveasthebasisforthelinkbetweenthedatainthetworeports.
Thenclickthe">"arrowbuttontomovetheselectedfield(s)intothe"Field(s)tolinkto:"listattherightsideofthedialogbox.
Atthebottomofthedialogbox,usethedrop-downattheleftsideofthedialogboxtoselecttheparameterfieldtousefromtheprimaryreport,andtheassociatedfieldfromthesubreporttouseforthelinkfromthedrop-downattherightsideofthedialogbox.
Oncetheassociationbetweenthefieldshasbeencreated,justclick"OK"atthebottomofthedialogbox.
Thenyoucanclickintothepositionwithinthereportatwhichyouwanttoplacethelinkedsubreport.
12AdvancedCrystalReportsTeachUcomp,Inc.
AdvancedReportingTools13.
8-ReportAlerts:Youcansetreportalertstonotifytheuserofconditionsorinformationinareportthatareoutsideofthedefined"norm.
"Manytimesinbusinessyouwillwanttoseethesetypesofreports,whichareoftencalled"exceptionreports,"becausetheycanalertyoutopotentialproblems.
CrystalReportsusesreportalertstoidentifyandnotifytheuserwhencertainspecifiedcriteriaaremet.
Forexample,youcouldcreateareportalertwhichinformsthemanagementstaffwithacustommessagewhensalesforaspecifiedperiodareunderacertainspecifiedvalue.
Tocreateareportalert,choose"Report|Alerts|CreateorModifyAlerts…"fromtheMenuBar.
Thiswilllaunchthe"CreateAlerts"dialogbox.
Youcanclickthe"New"buttoninthedialogboxtolaunchthe"CreateAlert"dialogbox.
Hereyoumusttypeanameforthealertintothe"Name"textbox.
Youcanthentypethemessagethatyouwanttodisplaywhentheconditionwhichyouwillsetismetintothe"Message"textbox.
Ifyouwishtocreateaformulathatdisplaysatextvalueormakesreferencetootherreportfields,youcaninsteadclickthe"X+2"buttontotherightofthe"Message"textboxandthencreatetheformulainthe"FormulaEditor"whichyouwilldisplaywhenthecriteriaismet.
Clickthe"Condition…"buttontoinvoketheFormulaEditorwhereyoucancreatetheformula,thatwhenmet,willtriggerthedisplayofthemessagewhichyoucreated.
Thenclick"SaveandClose"intheFormulaEditorwindowtoreturntothe"CreateAlert"dialogbox.
Youcanthenclick"OK"inthisdialogboxtoreturntothe"CreateAlerts"dialogbox.
Notethe"Enabled"checkboxischecked,whichindicatesthatthealertis"on.
"Youcanalwaysreturntoanalertthatyouwishtotemporarilydeactivateanduncheckthischeckboxtoturnanalert"off"withouthavingtodeletethealert.
Ifyouwishtodeleteanalertwhichyoucreatedbutnolongerneed,youcanselectthenameofthealertfromthe"CreateAlerts"dialogboxandthenclickthe"Delete"buttontodeletetheselectedalert.
Youcanalsoclickonthenameofanalertinthisdialogboxandthenclick"Edit…"toedittheselectedalertsconditionormessageifneeded.
Youcanalsoclickthe"New…"buttontocreateasmanyadditionalalertsasyoufeelyouneedforthereport.
Whenyouarefinished,youcanclickthe"Close"buttontoreturntothereport.
Whenyoupreviewthedataorrefreshthereportdata,anyalertswillbetriggerediftheymeetthecriteriawhichyouspecified.
Theywillappearintheirown"ReportAlerts"dialogbox,whereyoucanseethenameofthealertandthemessagewhichwasentered.
Inthisdialogbox,youcanselectthenameofthealertwhichwastriggeredandthenclickthe"ViewRecords"buttontoviewthedatarecordswhichtriggeredthereportalert.
Whenyouarefinishedreviewingthedata,youcanclickthe"Close"buttoninthe"reportAlerts"dialogbox.
13.
9-ReportAlertFunctions:CrystalReportscontainsthreefunctionswhichevaluatethestatusofthealertswithinareport.
Thesefunctionsallreturna"True"valueor"False"value(boolean)usedforevaluatingthestatusofalerts.
Youcanusethesefunctionstodeterminewhetherornotanalerthasbeenactivated.
Youcanusethe"IsAlertEnabled"functiontodetermineifthe"enabled"checkboxischeckedforanalert.
Youcanusethe"IsAlertTriggered"functiontodetermineiftherecordbeingevaluatedistriggeringthealert.
Youcanusethe"AlertMessage"functiontoreturnthemessage(ortheformula)thatwastypedintothe"Message"textboxinthe"CreateAlert"dialogbox.
13AdvancedCrystalReportsTeachUcomp,Inc.
ACTIONS-AdvancedReportingToolsCREATINGARUNNINGTOTALFIELD:1.
Clickonthe"RunningTotalFields"entryinthe"FieldExplorer"pane.
2.
Clickthe"New"buttoninthetoolbaratthetopofthe"FieldExplorer"panetolaunchthe"CreateRunningTotalField"dialogbox.
3.
Inthe"RunningTotalName:"textboxyoucantypeanamefortherunningtotalfield.
4.
Inthe"Summary"section,youselectwhichfieldsvaluestocalculate.
Clickonthefieldtosummarizewithinthe"AvailableTablesandFields:"listattheleftsideofthedialogbox,andthenclickthe">"arrowbuttontomovetheselectedfieldintothe"Fieldtosummarize"textboxattheright.
5.
Usethe"Typeofsummary"drop-downtoselectwhattypeofsummarycalculationtoperformoverthechosenfield.
6.
Inthe"Evaluate"sectionyoucansettheparametersunderwhichthecalculationwillbeperformedfortheselectedfieldsvalues.
Youcanselectthe"Foreachrecord"optiontocalculatethechosenfunctionforeveryrecordinthereport.
Youcanalsochoosethe"Onchangeoffield"optiontocalculateavaluebasedonthechangetothevalueshowninanotherfield.
Ifyoudochoosethatoption,thenclickonthefieldtouseforthechangingvaluesinthe"AvailableTablesandFields"listattheleftofthedialogboxandclickthe">"arrowbuttontomoveitintothe"Onchangeoffield"textboxattherightside.
7.
Youcouldalsochoosethe"Onchangeofgroup"optionbuttoninthe"Evaluate"sectiontoevaluatetheselectedfieldonthechangeofagroupedvalue.
Ifyouchoosethisoption,thenselectwhichgroupsvaluesyouwanttousefromthedrop-downtotherightofthe"Onchangeofgroup"label.
8.
Youcanalsoselectthe"Useaformula"optionbuttonandthenclickthe"X+2"buttontoinvokethe"FormulaEditor.
"IntheFormulaEditor,youcancreateaformulathat,whenevaluatedandfoundtobetrue,willthenperformtheselectedcalculationofthechosenfield.
9.
Inthe"Reset"section,youcanchooseunderwhichconditionstherunningtotalwillberesetbacktozero.
Ifyouselect"Never,"thefieldsvalueswillneverbesetbacktozerointhereport.
10.
Ifyouselectthe"Onchangeoffield"optionbuttoninthe"Reset"sectiontohavetherunningtotalfieldgetresetbacktozeroonthechangeofvaluetoaspecifiedfield.
Ifyouselectthisoption,thenselectbywhichfieldyouwanttoresetthevaluefromthelistdisplayedinthe"AvailableTablesandFields:"listattheleftsideofthedialogbox,andclickthe">"arrowbuttontomovetheselectedfieldintothetextboxdisplayed.
11.
Ifyouselectthe"Onchangeofgroup"option,andthenselectbywhichgroupschangingvaluesyouwishtoresettherunningtotalbacktozerofromthedrop-downwhichappears.
Youcanalsoclickthe"Useaformula"optionbutton,andthenclickthe"X+2"buttontoinvokethe"FormulaEditor.
"Inthe"FormulaEditor,"youcancreateaconditionthat,whenmet,willresetthevalueoftherunningtotalfieldbacktozero.
12.
Onceyouhavesetthedesiredattributesoftherunningtotalfield,justclick"OK"inthe"CreateRunningTotalField"dialogbox.
13.
Thefieldthatyoucreatedwillthenbedisplayedinthe"FieldExplorer"pane.
Youcantheninsertitintoyourreportjustasyouwouldanyothertypeoffield.
14AdvancedCrystalReportsTeachUcomp,Inc.
ACTIONS-AdvancedReportingToolsCREATINGAPARAMETERFIELD-(2011,2008&11):1.
Selectthe"ParameterFields"optioninthe"FieldExplorer"pane,andthenclickthe"New"buttoninthetoolbaratthetopofthepane.
2.
Inthe"CreateNewParameter"dialogbox,typethenameoftheparameterfieldthatyouwanttocreateintothe"Name:"textbox.
3.
Youcanthenusethe"Type:"drop-downtoselectthedatatypeoftheparameter.
4.
Inthe"ListofValues:"area,youcaneitherselectthe"Static"optionorthe"Dynamic"option.
Notethatyourchoicechangeswhatfieldsareavailableinthedialogbox.
5.
Ifyouselectthe"Static"option,thenyoucanprovidealistofvaluesfromadatabasefieldfromwhichtheusercanchoosebyselectingthenameofthedesireddatabasefieldfromthe"ValueField"drop-down.
6.
Youcanusethe"DescriptionField:"drop-downtochooseadatabasefieldwhichdescribesthecontentsofthe"ValueField"choice,ifneeded.
7.
Ifyouwishtomanuallytypealistofvaluesand,optionally,descriptions;thenyoucaneitherclickintothefirstrowofthe"Value"columntobeginenteringtheparametervalues,oryoucanclickthe"Insert"buttontoappendanewentrytothelistofvalues.
8.
Inthevaluelist,youcanclickintoanyentrymade,andthenclickthe"Delete"button,whichlookslikeablackx,todeletetheselectedentry.
9.
Youmayalsoclickthe"MoveUp"and"MoveDown"arrowbuttontomovetheselectedchoiceupordownthroughthelistofvalues.
10.
Youcanusethe"Actions"drop-downbuttontoperformvariouscommandsonthevaluelistshown.
Ifyouselectedtouseadatabasefieldvalue,thenyoumustselectthe"Appendalldatabasevalues"commandtoloadthevaluesfromtheselectedfield(s)intothevaluelist.
11.
Youcanselectthe"Clear"commandtoremovealllistvaluesshown.
12.
Youcanimportadelimitedlistofvaluesfromatextfilebyclickingthe"Import…"commandchoice.
Thislaunchesaseparatedialogbox,whichyoucanusetobrowseforandopenthedesireddelimitedtextfile.
13.
Youcanselectthe"Export…"commandtoexportamanuallisttoadelimitedtextfileusingthe"SaveAs"dialogbox.
14.
Ifyouchoose"Dynamic"inthe"ListofValues:"section,thenyouhavedifferentchoicestomakeinthissection.
15.
Ifyouhaveacascadingparameterchoice,meaningitusesmultiplefields,thentypewhateveryouwouldliketohavedisplayedasthepromptingtextforthecascadingparameterintothe"PromptGroupText:"textbox.
Youcanusethiswithsingle-fieldprompts,aswell,butthetitleshowsupatthetopoftheparameterdialogboxpromptandnotovertheindividualfields.
16.
Tocreateanewlistoffieldvaluesfromwhichtheusercanselect,ensurethatthe"New"choiceisselectedinthe"ChooseaDataSource:"section.
Youcanthenselectfromthelistoffieldsinthecurrentdatasourcebyusingthe"Insert"buttonorbyclickingintothefirstemptyrowofthe"Value"column.
17.
Youcanselectanyfieldenteredintothelistandclickthe"Delete"buttontodeletethefield.
18.
Youcanalsoreorganizeaselectedvaluebyclickingthe"MoveUp"and"MoveDown"arrowbuttons.
19.
Ifyouwouldliketouseasecondaryfieldforthedescriptionofthefieldselectedinthe"Value"column,thenyoucanchooseafieldforthatpurposetotherightinthe"Description"column.
20.
Inthe"Parameter"column,youcanclickonavaluetounbinditfromtheparameter.
Youcanalsoclickittobindanunboundparametervalue.
21.
Youcansetthedesiredoptionsforeachvalueinthe"Options"area.
Thechoicesfromwhichyoucanselectchangedependingonwhetherornotyouselected"Static"or"Dynamic"valuefields.
(cont…)15AdvancedCrystalReportsTeachUcomp,Inc.
ACTIONS-AdvancedReportingToolsCREATINGAPARAMETERFIELD-(2011,2008&11-CONT.
):22.
Forall"Static"valuesthatarenot"Boolean"(logical)values,youcansetthefollowingparameteroptionsbyclickingintothe"Setting"columnandenteringorchangingthevalue.
23.
Inthe"PromptText:"option,youcanenterthetextthatyouwanttoappearastheparameterprompt.
24.
Youcanchoose"True"or"False"forthe"PromptWithDescriptionOnly"toonlyallowthedescriptionfieldchoicestobeviewedintheparameterprompt(True),ortoshowboththevalueanddescriptionfields(False).
25.
Youcanenteradefaultparametervaluetouseinthe"DefaultValue"option.
26.
Ifyouselect"True"inthe"Allowcustomvalues"option,thentheuserscantypeintheirownvaluesinadditiontoselectingfromthevaluelist.
Ifsetto"False,"thentheymustonlychoosefromthevaluesshowninthelist.
27.
Ifthe"Allowmultiplevalues"optionissetto"True,"thentheparameterpromptwillallowmultiplevaluestobeselected.
Thisalsoenablesyoutosetboththe"Allowdiscretevalues"and"Allowrangevalues"optionsto"True,"aswell.
Normally,youcanonlyselectoneofthetwooptions.
28.
Youcansetthe"Allowdiscretevalues"optionto"True"toallowforonlysingularparametervaluestobeselected.
Althoughtherecanbemultiple,singularvalues-thismeansthattherearenorangedparametervalues,suchasallvaluesfrom$100to$1,000.
29.
Youcansetthe"Allowrangevalues"optionto"True"toallowrangedparametervaluechoices.
30.
Youcanusethe"Minlength"optiontoentertheminimumnumberofcharactersthatcanappearasavalueentry.
31.
Youcanalsousethe"Maxlength"toenterthemaximumnumberofcharactersthatcouldappearasavalueentry.
32.
Youcanusethe"EditMask"optiontoenterafieldmaskthatrestrictsthepossiblerangeofcharactersthatyouruserscouldinput,ifdesired.
33.
Whensettingstatic,booleanparameteroptions,youcansetthe"PromptText,""PromptWithDescriptionOnly,"and"DefaultValue"options,asnormal.
34.
Youcanalsoenterthe"Booleangroup#"optiontosetthenumberofthegrouptowhichyouwishtoaddtheselectedbooleanvalue.
Whenauserselectagroupofbooleanvalues,theycansetthesamevaluesordifferentvaluestoeachparameterinthegroup.
35.
Ifthe"ExclusiveGroup"optionissetto"True,"userscanonlyselectasingle"True"booleanvaluefromthebooleanoptionspresentedinthegroup.
Ifsetto"False,"thentheuserscansetmultipleoptionsinthegroupto"True.
"36.
Ifyouselecteda"Dynamic"setofvalues,thenyoucansetthe"PromptText,""PromptWithDescriptionOnly,""Allowmultiplevalues,""Allowdiscretevalues,"and"Allowrangevalues"options,asnormal.
37.
Inaddition,youcanusethe"SortOrder"optiontoselecthowtosortthefieldsdatavaluesintheparameterprompt.
Thevaluescanbesortedineitherascending(A-Z,1-9)orderordescending(Z-A,9-1)orderbyeitherthevaluefieldorthedescriptionfield.
38.
Onceyouhavesetthedesiredparameteroptions,click"OK"inthe"CreateNewParameter"dialogboxtocreatethenewparameterfield.
16AdvancedCrystalReportsTeachUcomp,Inc.
ACTIONS-AdvancedReportingToolsCREATINGAPARAMETERFIELD-(10):1.
Selectthe"ParameterFields"optioninthe"FieldExplorer"paneandthenclickthe"New"buttoninthetoolbaratthetopofthepanetolaunchthe"CreateParameterField"dialogbox.
2.
Typethenameoftheparameterfieldthatyouwanttocreateintothe"Name:"textbox.
3.
Inthe"Promptingtext:"textbox,typethetextthatyouwanttohaveappearwhenthereportpromptsyoutoentertheparametervalue.
4.
Youcanusethe"Valuetype:"drop-downtoselectthedatatypeoftheparameter.
5.
Ifyouclickthe"DefaultValues…"buttoninthisdialogbox,youwillopenthe"SetDefaultValues"dialogbox.
Youcanusethisdialogboxtosetadefaultvaluetobeusedincasetheuserdoesntspecifyavalue.
Youcanalsousethisdialogboxtocreatealistofpresetvaluesfromwhichtheusercanselectthevaluetousefortheparameterwhenrefreshingthereportdata.
6.
Inthe"SetDefaultValues"dialogbox,youcanrestrictthepossiblevaluesfromwhichtheusercouldselecttovaluesfromadatabasetablebyspecifyingthenameofthetablefromthe"Browsetable:"drop-down.
7.
Selectwhichfieldinthetabletousefromthechoicesinthe"Browsefield:"drop-down.
Thevalueswillthenappearinthe"Selectorentervalue:"listattheleftsideofthedialogbox.
8.
Ifyouhadthevalueslistedinatextfilewhichyouwantedtoimport,youcouldinsteadclickthe"Import…"buttontolaunchthe"Open"dialogboxwhereyoucouldselectthetextfilewiththevalueswhichyouwantedtouse,andthenclick"Open"tolistthevaluesinthe"Selectorentervalue:"list.
9.
Youcanthenusethearrowbuttonstomovetheselectedlistitemstoandfromthe"DefaultValues"listattherightsideofthedialogbox.
10.
Youcanevenclickintothetextboxthatisimmediatelybelowthe"Selectorentervalue:"labelandtypeinthevaluewhichyouwishtoaddtothedefaultvalueslist.
Thenclickthe">"arrowbuttontomoveittothedefaultvalueslist.
11.
Inthe"DefaultValues"listyoucanclickonalistedelementtoselectit.
Youcanthenclickthe"SetDescription…"buttontochangethedescriptionusedfortheselectedvalue,ifdesired.
12.
Noticethatiftheelementsaddedtothe"DefaultValues"listarentinthedesiredorder,youcanselectanentryandthenclickthe"Up"and"Down"arrowsintheupperrightcornerofthelisttoreorganizetheentries,ifdesired.
13.
Inthe"Options"section,youcancheckthe"Lengthlimit"checkboxtorestrictthedataentryoftheparametertoaspecifiedsizerange.
Youcanthentypea"MinLength"anda"MaxLength"intothetextboxesprovided.
14.
Ifyouinsteadprefertospecifyaninputmasktousefortheparameter,youcantypeaninputmaskusingacceptedmaskingcharactersintothe"Editmask:"textbox.
15.
Youcanalsosetthe"Display:"drop-downtoeither"ValueandDescription"or"Description"tochoosewhatwillbeshowninthepicklistusedbythereportuser.
16.
Ifyouwanttosorttheentriesshowninthedefaultvalueslist,youcanchooseasortingmethodfromthe"Order:"drop-down.
Youcanthenusethe"Orderbasedon:"drop-downtochoosetosorteitherbythe"Values"or"Descriptions"used.
17.
Whenyouhavemadeanychangestothesettingsofthedefaultvaluesusedbytheparameterfieldthatyouwanttoapply,click"OK"toreturntothe"CreateParameterField"dialogbox.
18.
Inthisdialogbox,ifyouwanttheusertobeabletochoosemorethanonevaluefromyourlistofdefaultvalues,checkthe"Allowmultiplevalues"checkbox.
Otherwise,theuserwillonlybeallowedtospecifyasinglevaluefromthelistofdefaultsspecified.
(cont…)17AdvancedCrystalReportsTeachUcomp,Inc.
ACTIONS-AdvancedReportingToolsENTERINGPARAMETERVALUES-(10):1.
Ifnecessary,youcanforcea"refresh"ofthedatabyselecting"Report|RefreshReportData"fromtheMenuBar.
2.
Whenyoudothisinareportthatcontainsparameterizedvalues,CrystalReportsinvokesadialogboxaskingifyouwishto"Usecurrentparametervalues"or"Promptfornewparametervalues.
"Selectthedesiredoptionandthenclick"OK"tocontinue.
3.
Inthe"EnterParameterValues"dialogbox,youwillseethenamesofthereportparameterslistedinthe"ParameterFields:"list.
4.
Youcanclickonaparameterlistedtodisplayitssettingsandtheparameterspromptbelowthelist.
Thelastselectedvaluefortheparameterisdisplayedatthebottomofthedialogbox.
Youcanclickthe"Reset"buttontoresetalltheparametervaluesbacktotheirdefaultvalues,ifneeded.
Otherwise,allparameterswillretaintheirlastsetting,andyouonlyneedtoselectandchangethevalueoftheparametersthatyouneedtoinordertodisplaythedatayouwanttoseeinthe"Preview.
"5.
Dependingonthetypeofparameterthatyoucreated,youenterthevalueorrangeofvaluestouseforeachparameterintothetextbox(es)ordrop-down(s)atthebottomofthisdialogbox.
Thevalueorvalueswhichyouthenspecifyareusedtobytheparametertoselectrecords,displaythechosenvalue,formatfields,orwhateverelseyoumayuseparametervaluesforinareport.
6.
Onceyouhaveenteredthevaluesforuse,click"OK"toapplythenewparameters.
ENTERINGPARAMETERVALUES-(2011,2008&11):1.
Youcan"refresh"reportdatabyselecting"Report|RefreshReportData"fromtheMenuBar,ifneeded.
2.
Whenyourefreshreportdatathatcontainsparameterizedvalues,CrystalReportsinvokesadialogboxaskingifyouwishto"Usecurrentparametervalues"or"Promptfornewparametervalues.
"Selectthedesiredoptionandthenclick"OK"tocontinue.
3.
Whenyouareinitiallyenteringaparametervalue,orifyouselecttore-enterparametervalueswhenrefreshingreportdata,youwilldosothroughthe"EnterValues"dialogbox.
Inthisdialogbox,youwillsetorenterthedesiredvaluestouseforeachparametershown.
Afterinitiallyselectingparametervalues,allparameterswillretaintheirlastsetting,andyouonlyneedtoselectandchangethevalueoftheparametersthatyouneedto,inordertodisplaythedatayouwanttoseeinthe"Preview.
"4.
Onceyouhaveenteredthevaluestouse,click"OK"toapplythenewparameters.
CREATINGAPARAMETERFIELD-(10):CONT.
:19.
Ifyouselectthe"Discretevalue(s)"option,youcanchoosemultiple,individualvaluestousefortheparameter.
20.
Ifyouselect"Rangevalue(s)"instead,youcanselectarangeofvaluesbetweenwhichalloftheothervalueswouldalsobeselected.
21.
Youcouldalsochoose"DiscreteandRangeValues"optiontoallowfortheselectionofbothrangedanddiscretevaluesfortheparameter.
22.
Youcanalsocheckthe"Alloweditingofdefaultvalueswhenthereismorethanonevalue"checkbox,ifyouwishtoenablethatfeature.
23.
Wheneveryouhavethedesiredsettingsforthetypeofparameterfieldyouwanttocreatesetinthe"CreateParameterField"dialogbox,click"OK"tocreatetheparameterfield.
18AdvancedCrystalReportsTeachUcomp,Inc.
ACTIONS-AdvancedReportingToolsCREATINGASUBREPORT:1.
Select"Insert|Subreport…"fromtheMenuBarorclickthe"InsertSubreport"buttonintheInserttoolbar.
2.
Inthe"InsertSubreport"dialogbox,selecthowyouwanttocreatethesubreportusingthetwooptionsdisplayed:"Chooseanexistingreport"or"CreateasubreportwiththeReportWizard.
"Ifyouselectthefirstoption,thenclickthe"Browse…"buttontoinvokethe"Open"dialogboxwhereyoucanchoosewhichreportyouwanttoembedasasubreportwithinthemainreport.
Ifyouwantedtocreatethesubreport"on-the-fly"withintheprimaryreport,youcaninsteadchoosethelatteroptionbuttonandthenclickthe"ReportWizard…"buttontolaunchtheReportWizarddialogboxwhichstepsyouthroughthecreationofastandardreport.
3.
Youcancheckthe"On-demandsubreport(similartoahyperlink)"checkboxtocreateasubreportwhichdoesntdisplayitsdatauntiltheuserdouble-clicksonthesubreportlinktodrill-downanddisplaythesubreportdataonanother"Preview"tab.
4.
Assumingyouwantedtocreateanunlinkedsubreport,youcouldjustclickthe"OK"buttonatthispointandthenclickintothereportattheplacewhereyouwantedtodisplaythesubreportdata.
However,ifyouwantedtocreatealinkedsubreport,youmustthenclickthe"Link"tabinthe"InsertSubreport"dialogbox.
5.
Onthe"Link"tab,youusethe"Forsubreport:"drop-downtochoosewhichsubreporttolinktofromthedrop-downdisplayed.
6.
Theninthe"ContainerReportfield(s)tolinkto"list,selectthereportfieldorunderlyingdatabasefieldwhichwillserveasthebasisforthelinkbetweenthedatainthetworeports.
7.
Clickthe">"arrowbuttontomovetheselectedfield(s)intothe"Field(s)tolinkto:"listattherightsideofthedialogbox.
8.
Atthebottomofthedialogbox,usethedrop-downattheleftsideofthedialogboxtoselecttheparameterfieldtousefromtheprimaryreport,andtheassociatedfiledfromthesubreporttouseforthelinkfromthedrop-downattherightsideofthedialogbox.
9.
Oncetheassociationbetweenthefieldshasbeencreated,justclick"OK"atthebottomofthedialogbox.
10.
Thenclickintothepositionwithinthereportatwhichyouwanttoplacethelinkedsubreport.
CREATINGREPORTALERTS:1.
Choose"Report|Alerts|CreateorModifyAlerts…"fromtheMenuBartolaunchthe"CreateAlerts"dialogbox.
2.
Clickthe"New"buttoninthedialogboxtolaunchthe"CreateAlert"dialogbox.
3.
Typeanameforthealertintothe"Name"textbox.
4.
Typethemessagethatyouwanttodisplaywhentheconditionwhichyouwillsetismetintothe"Message"textbox.
Ifyouwishtocreateaformulathatdisplaysatextvalueormakesreferencetootherreportfields,youcaninsteadclickthe"X+2"buttontotherightofthe"Message"textboxandthencreatetheformulainthe"FormulaEditor"whichyouwilldisplaywhenthecriteriaismet.
5.
Clickthe"Condition…"buttontoinvoketheFormulaEditorwhereyoucancreatetheformula,thatwhenmet,willtriggerthedisplayofthemessagewhichyoucreated.
Thenclick"SaveandClose"intheFormulaEditorwindowtoreturntothe"CreateAlert"dialogbox.
6.
Youcanthenclick"OK"inthisdialogboxtoreturntothe"CreateAlerts"dialogbox.
19AdvancedCrystalReportsTeachUcomp,Inc.
ACTIONS-AdvancedReportingToolsENABLINGANDDISABLINGREPORTALERTS:1.
Choose"Report|Alerts|CreateorModifyAlerts…"fromtheMenuBartolaunchthe"CreateAlerts"dialogbox.
2.
Selectthenameofthealerttoturnonorofffromthelistshown,andthenclickthe"Edit…"button.
3.
Ifthe"Enabled"checkboxischecked,thealertis"on.
"Youcanalwaysuncheckthischeckboxtoturnanalert"off"withouthavingtodeletethealert.
4.
Click"OK"whenyouarefinishedtoreturntothe"CreateAlerts"dialogbox.
DELETINGREPORTALERTS:1.
Choose"Report|Alerts|CreateorModifyAlerts…"fromtheMenuBartolaunchthe"CreateAlerts"dialogbox.
2.
Selectthenameofthealerttodeletefromthelistshown,andthenclickthe"Delete"buttontodeletetheselectedalert.
EDITINGREPORTALERTS:1.
Choose"Report|Alerts|CreateorModifyAlerts…"fromtheMenuBartolaunchthe"CreateAlerts"dialogbox.
2.
Selectthenameofthealerttoeditfromthelistshown,andthenclickthe"Edit…"buttontoedittheselectedalertinthe"EditAlert"dialogbox.
3.
Click"OK"whenyouarefinishedmakingyourchangestothereportalert.
20AdvancedCrystalReportsTeachUcomp,Inc.
EXERCISES-AdvancedReportingToolsPurpose:1.
TobeabletoapplyadvancedreportingtoolstoenhancereportsinCrystalReports10.
Exercises:1.
OpenCrystalReports10andclick"Cancel"inthe"WelcometoCrystalReports"dialogbox.
2.
Select"File|Open…"fromtheMenuBartolaunchthe"Open"dialogbox.
3.
Navigatetothe"MyDocuments"folderwhereyoustoredthe"CustomerOrderReport"whichwecreatedinthe"Chapter11-Exercise.
"4.
Clickonthe"CustomerOrderReport"toselectit,andthenclickthe"Open"buttontoopenit.
5.
Clickonthe"ParameterFields"entrytoselectit,andthenclickthe"New"buttoninthetoolbaratthetopofthe"FieldExplorer"pane.
6.
Inthe"CreateParameterField"dialogbox,type"Customer"intothe"Name:"textbox.
7.
Inthe"Promptingtext:"textboxyoucantypethefollowingtext:"Selectthenamesofthecustomersforwhichyouwishtoviewthesalestotalsfromthedrop-downbelow.
"8.
Select"String"fromthe"Valuetype:"drop-down.
9.
Inthe"Options"section,checkthe"Allowmultiplevalues"checkbox.
10.
Ensurethatthe"Discretevalue(s)"optionisselected.
11.
Clickthe"DefaultValues…"buttontolaunchthe"SetDefaultValues"dialogbox.
12.
Usethe"Browsetable:"drop-downtoselect"Customer.
"13.
Usethe"Browsefield:"drop-downtoselect"CustomerName.
"14.
Clicktheright-pointing,double-arrowbutton">>"tomovetheselectedvaluesfromthelistattheleftsideofthedialogboxtothelistattherightsideofthedialogbox.
15.
Inthelowerrightcorner,select"Alphabeticalascending"fromthe"Order:"drop-down.
16.
Ensurethat"Value"isselectedfromthe"Orderbasedon:"drop-down.
17.
Click"OK"atthebottomofthedialogboxtoreturntothe"CreateParameterField"dialogbox.
18.
Click"OK"atthebottomofthe"CreateParameterField"dialogbox.
19.
Select"Report|SelectExpert…"fromtheMenuBar.
20.
Inthe"ChooseField"dialogboxwhichappears,clickon"Customer.
CustomerName"toselectit.
21.
Click"OK"tolaunchthe"SelectExpert"dialogbox.
22.
Onthe"Customer.
CustomerName"tab,usethedrop-downtoselect"isequalto"attheleftsideofthedialogbox.
23.
Usethedrop-downwhichappearstotherighttochoose{Customer}fromthetopofthedrop-downlist.
24.
Click"OK"tosettheselectioncriteria.
25.
Select"File|PrintPreview"fromtheMenuBartoviewthereportonthe"Preview"tab.
Ifyoualreadyhavea"Preview"tab,youcanjustswitchtothe"Preview"tabandthenchoose"Report|RefreshReportData"fromtheMenuBartoinvokethe"EnterParameterValues"dialogbox.
26.
Inthedialogbox,usethe"DiscreteValue"drop-downtoselect"ArubaSport.
"27.
Clickthe"Add"buttontoaddthemtothe"Value"listbox.
28.
Usethe"DiscreteValue"drop-downtochoose"Bikefest.
"29.
Clickthe"Add"buttontoaddthemtothe"Value"listbox.
30.
Click"OK"toviewthesalestotalsforthetwoselectedcustomers.
31.
Select"File|Save"fromtheMenuBar.
32.
Select"File|Close"toclosethereport.
21AdvancedCrystalReportsTeachUcomp,Inc.
EXERCISES-AdvancedReportingToolsPurpose:1.
TobeabletoapplyadvancedreportingtoolstoenhancereportsinCrystalReports2011,2008&11.
Exercises:1.
OpenCrystalReports2011,2008or11.
2.
Select"File|Open…"fromtheMenuBartolaunchthe"Open"dialogbox.
3.
Navigatetothe"MyDocuments"folderwhereyoustoredthe"CustomerOrderReport"whichwascreatedinthe"Chapter11-Exercise.
"4.
Clickonthe"CustomerOrderReport"toselectit,andthenclickthe"Open"buttontoopenit.
5.
Clickonthe"ParameterFields"entrytoselectit,andthenclickthe"New"buttoninthetoolbaratthetopofthe"FieldExplorer"pane.
6.
Inthe"CreateNewParameter"dialogbox,type"Customer"intothe"Name:"textbox.
7.
Select"String"fromthe"Type:"drop-down.
8.
Select"Static"fromthe"ListofValues:"choices.
9.
Select"CustomerName"fromthe"ValueField"drop-down.
10.
Select"CustomerName"fromthe"DescriptionField"drop-down.
11.
Clickthe"Actions"buttonandselect"Appendalldatabasevalues.
"12.
Inthe"Options:"section,enterthefollowing"PromptText:"string:"Selectthenamesofthecustomersforwhichyouwishtoviewthesalestotalsfromthedrop-downbelow.
"13.
Setthe"PromptWithDescriptionOnly"optionto"True.
"14.
Setthe"Allowcustomvalues"optionto"False.
"15.
Setthe"Allowmultiplevalues"optionto"True.
"16.
Ensurethatthe"Allowdiscretevalues"optionissetto"True.
"17.
Click"OK"atthebottomofthe"CreateNewParameter"dialogbox.
18.
Clickthe"SelectExpert"buttonwithintheExpertstoolbar.
19.
Inthe"ChooseField"dialogboxwhichappears,clickon"Customer.
CustomerName"toselectit.
20.
Click"OK"tolaunchthe"SelectExpert"dialogbox.
21.
Onthe"Customer.
CustomerName"tab,usethedrop-downtoselect"isequalto"attheleftsideofthedialogbox.
22.
Usethedrop-downwhichappearstotherighttochoose{Customer}fromthetopofthedrop-downlist.
23.
Click"OK"tosettheselectioncriteria.
24.
Select"File|PrintPreview"fromtheMenuBartoviewthereportonthe"Preview"tab.
Ifyoualreadyhavea"Preview"tab,youcanjustswitchtothe"Preview"tabandthenchoose"Report|RefreshReportData"fromtheMenuBartoinvokethe"EnterValues"dialogbox,ifneeded.
25.
Inthe"EnterValues"dialogbox,select"ArubaSport"fromthe"AvailableValues:"list.
26.
Clickthe">"buttontoadd"ArubaSport"tothe"SelectedValues:"list.
27.
Select"Bikefest"fromthe"AvailableValues:"list.
28.
Clickthe">"buttontoadd"Bikefest"tothe"SelectedValues:"list.
29.
Click"OK"toviewthesalestotalsforthetwoselectedcustomers.
30.
Select"File|Save"fromtheMenuBar.
31.
Select"File|Close"toclosethereport.

BGPTO独服折优惠- 日本独服65折 新加坡独服75折

BGPTO是一家成立于2017年的国人主机商,从商家背景上是国内的K总和有其他投资者共同创办的商家,主营是独立服务器业务。数据中心包括美国洛杉矶Cera、新加坡、日本大阪和香港数据中心的服务器。商家对所销售服务器产品拥有自主硬件和IP资源,支持Linux和Windows。这个月,有看到商家BGPTO日本和新加坡机房独服正进行优惠促销,折扣最低65折。第一、商家机房优惠券码这次商家的活动机房是新加坡...

快云科技:香港沙田CN2云服务器低至29元/月起;美国高防弹性云/洛杉矶CUVIP低至33.6元/月起

快云科技怎么样?快云科技是一家成立于2020年的新起国内主机商,资质齐全 持有IDC ICP ISP等正规商家。云服务器网(yuntue.com)小编之前已经介绍过很多快云科技的香港及美国云服务器了,这次再介绍一下新的优惠方案。目前,香港云沙田CN2云服务器低至29元/月起;美国超防弹性云/洛杉矶CUVIP低至33.6元/月起。快云科技的云主机架构采用KVM虚拟化技术,全盘SSD硬盘,RAID10...

LOCVPS:VPS主机全场8折,德国/荷兰/美国KVM终身7折

LOCVPS发来了针对元旦新年的促销活动,除了全场VPS主机8折优惠外,针对德国/荷兰KVM #1/美国KVM#2 VPS提供终身7折优惠码(限量50名,先到先得)。LOCVPS是一家成立于2012年的国人VPS服务商,提供中国香港、韩国、美国、日本、新加坡、德国、荷兰、俄罗斯等地区VPS服务器,基于KVM或XEN架构(推荐优先选择KVM),均选择直连或者优化线路,国内延迟低,适合建站或远程办公使...

parameters add为你推荐
google竞价排名google关键字广告和百度排名有什么区别,又有什么相同点?中国电信互联星空电信的互联星空服务是什么?照片转手绘怎么把图片P成手绘手机区号有的手机号中间的号码是地区区号,那是什么卡显卡温度多少正常显卡温度多少算正常数码资源网哪个网站可以直接在线做照片?功能要齐全的`qq空间装扮qq空间怎么装扮彩信中心短信中心号码是多少iphone越狱后怎么恢复苹果越狱后怎么恢复出厂设置iphone越狱后怎么恢复苹果越狱后如何恢复
qq域名邮箱 最便宜的vps 国内免备案主机 美国翻墙 国外idc 特价空间 绍兴高防 空间论坛 爱奇艺vip免费试用7天 稳定免费空间 卡巴斯基破解版 双线asp空间 架设邮件服务器 ebay注册 美国盐湖城 华为k3 测速电信 江苏徐州移动 闪讯网 贵州电信 更多