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.

HostKvm($4.25/月),俄罗斯CN2带宽大升级,俄罗斯/香港高防限量5折优惠进行中

HostKvm是一家成立于2013年的国外VPS服务商,产品基于KVM架构,数据中心包括日本、新加坡、韩国、美国、俄罗斯、中国香港等多个地区机房,均为国内直连或优化线路,延迟较低,适合建站或者远程办公等。本月,商家旗下俄罗斯、新加坡、美国、香港等节点带宽进行了大幅度升级,俄罗斯机房国内电信/联通直连,CN2线路,150Mbps(原来30Mbps)带宽起,目前俄罗斯和香港高防节点5折骨折码继续优惠中...

如何低价香港服务器购买?有没有便宜的香港服务器推荐?

如何低价香港服务器购买?想要做一个个人博客,想用香港服务器,避免繁琐备案,性能不需要多高,只是记录一些日常而已,也没啥视频之类的东西,想问问各位大佬有没有低价的香港服务器推荐?香港距大陆近,相比美国服务器最大的优势在于延迟低,ping值低,但是带宽紧张,普遍都是1M,一般戏称其为“毛细血管”。同时价格普遍高,优质稳定的一般价格不菲。大厂云梯队阿里云、腾讯云两家都有香港服务器,要注意的是尽量不要选择...

Friendhosting四五折促销,VPS半年付7.5欧元起

Friendhosting发布了针对“系统管理日”(每年7月的最后一个星期五)的优惠活动,针对VPS主机提供55%的优惠(相当于四五折),支持1-6个月付款使用,首付折扣非永久,优惠后最低套餐首半年7.18欧元起。这是一家保加利亚主机商,成立于2009年4月,商家提供VDS和独立服务器租用等,数据中心目前可选美国洛杉矶、保加利亚、乌克兰、荷兰、拉脱维亚、捷克和波兰等8个地区机房。下面以最低套餐为例...

parameters add为你推荐
绵阳电信绵阳电信宽带资费spgnux思普操作系统怎么样怎么在qq空间里添加背景音乐如何在QQ空间中添加背景音乐1433端口怎么去看1433端口手机区号手机号码+86是移动区号还是联通的区号?网站联盟怎样进入网站联盟网店推广网站网店怎么推广?godaddyGodaddy域名怎么接受ios7固件下载iOS7如何升级固件?分词技术中文分词的应用
欧洲欧洲vps 域名停靠一青草视频 enom 息壤主机 mediafire mach 鲜果阅读 2017年黑色星期五 好玩的桌面 日本空间 发包服务器 京东商城0元抢购 腾讯云分析 php空间推荐 电信虚拟主机 hktv 香港亚马逊 zencart安装 超低价 游戏服务器 更多