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.

华纳云新人下单立减40元/香港云服务器月付60元起,香港双向CN2(GIA)

华纳云(HNCloud Limited)是一家专业的全球数据中心基础服务提供商,总部在香港,隶属于香港联合通讯国际有限公司,拥有香港政府颁发的商业登记证明,保证用户的安全性和合规性。 华纳云是APNIC 和 ARIN 会员单位。主要提供数据中心基础服务、互联网业务解决方案, 以及香港服务器租用、香港服务器托管、香港云服务器、美国云服务器,云计算、云安全技术研发等产品和服务。其中云服务器基于成熟的 ...

RAKSmart VPS主机半价活动 支持Windows系统 包含香港、日本机房

RAKSmart 商家最近动作还是比较大的,比如他们也在增加云服务器产品,目前已经包含美国圣何塞和洛杉矶机房,以及这个月有新增的中国香港机房,根据大趋势云服务器算是比较技术流的趋势。传统的VPS主机架构方案在技术层面上稍微落后一些,当然也是可以用的。不清楚是商家出于对于传统VPS主机清理库存,还是多渠道的产品化营销,看到RAKSmart VPS主机提供美国、香港和日本机房的半价促销,当然也包括其他...

LOCVPS全场8折,香港云地/邦联VPS带宽升级不加价

LOCVPS发布了7月份促销信息,全场VPS主机8折优惠码,续费同价,同时香港云地/邦联机房带宽免费升级不加价,原来3M升级至6M,2GB内存套餐优惠后每月44元起。这是成立较久的一家国人VPS服务商,提供美国洛杉矶(MC/C3)、和中国香港(邦联、沙田电信、大埔)、日本(东京、大阪)、新加坡、德国和荷兰等机房VPS主机,基于XEN或者KVM虚拟架构,均选择国内访问线路不错的机房,适合建站和远程办...

parameters add为你推荐
邮箱群发163的邮箱如何群发iphone5解锁iphone5密码忘了怎么解锁金山杀毒怎么样金山杀毒好吗?安卓应用平台有没有什么安卓游戏都能找到的应用商店或者游戏中心二层交换机什么是二层交换机和三层交换机???网络广告投放怎样在网络上进行广告的投放?网站优化方案网站优化方案如何写?去鼠标加速度win7怎么去鼠标加速度如何修改ie主页IE主页怎样修改?请客网中国有几种请客的原因
长沙虚拟主机 godaddy域名注册 com域名价格 阿里云os java主机 tier 全站静态化 1g内存 raid10 网页提速 广州虚拟主机 cdn网站加速 mteam 谷歌搜索打不开 美国主机侦探 hosting24 美国服务器 ping值 hosts文件 winserver2008下载 更多