5Cognos Report Studio 练习.docx

上传人:b****5 文档编号:29112859 上传时间:2023-07-20 格式:DOCX 页数:21 大小:381.21KB
下载 相关 举报
5Cognos Report Studio 练习.docx_第1页
第1页 / 共21页
5Cognos Report Studio 练习.docx_第2页
第2页 / 共21页
5Cognos Report Studio 练习.docx_第3页
第3页 / 共21页
5Cognos Report Studio 练习.docx_第4页
第4页 / 共21页
5Cognos Report Studio 练习.docx_第5页
第5页 / 共21页
点击查看更多>>
下载资源
资源描述

5Cognos Report Studio 练习.docx

《5Cognos Report Studio 练习.docx》由会员分享,可在线阅读,更多相关《5Cognos Report Studio 练习.docx(21页珍藏版)》请在冰豆网上搜索。

5Cognos Report Studio 练习.docx

5CognosReportStudio练习

{0>Demo6-1:

CreateaComplexReport<}0{>演示6-1:

建立一个复杂报表<0}

{0>Purpose:

WehavebeenaskedbytheVicePresidentofSalestoprovideareportshowingthequantitysold,revenueandgrossprofitonallproductsandrelatedorderinginformation.<}0{>目的:

销售副总要求我们提供一个报表显示所有产品的销售数量、收入和毛利以及相关的定购信息。

<0}{0>Todothis,wewillincludealist,chart,andcrosstabinthesamereporteachreportingonadifferentmeasure.<}0{>为此,我们将在同一个报表中引用一个列表、图表和交叉表,对不同的度量进行报告。

<0}{0>Wewillalsoaddaheadertothereporttoexplainitscontent.<}0{>我们将给报表添加一个表头解释其内容。

<0}

注意:

报表中使用模型路径为“公共文件夹”->“Samples”->“Model”->“GO销售(查询)”

{0>Task1.<}0{>任务1.<0}{0>Additemstoalistreport.<}0{>将对象添加到列表型报表。

<0}

1.{0>CreateanewBlankreport.<}0{>创建一个新的Blank报表。

<0}

2.{0>IntheInsertableObjectspane,clicktheToolboxtab,andthendraganddropaTableontotheworkarea.<}0{>在InsertableObjects(可插入对象)窗格中点击Toolbox标签页,然后将一个Table(表格)拖放到工作区。

<0}出现InsertTable对话框。

3.{0>Leavethenumberofcolumnsandrowsas2and1respectively,andclickOK.<}0{>让列数和行数分别为2和1,点击OK。

一个有左右两个单元格的表格出现在工作区顶部。

<0}

4.{0>DraganddropaListintotheleftcellofthetable.<}0{>将一个List(列表)拖到表格的左边单元格。

出现Create-List对话框。

<0}

5.{0>UnderBasedon,withNewqueryselected,typeListtonamethequery,andthenclickOK.<}0{>在Basedon区域中的NewQuery处输入’List’,对查询进行命名,然后点击OK。

结果显示如下:

<0}

{0>Noticethatthelistdoesnottakeuptheentirelefttablecell.<}0{>注意该列表并不会占用整个左边的表格单元格。

<0}{0>Thespacetotherightofthelistisstillpartofthelefttablecell.<}0{>列表右边的空间仍然是左边表格单元格的一部分。

<0}{0>Therighttablecellisthethincellonthefarright.<}0{>右边的表格单元格是最右边的窄单元格。

<0}

6.{0>DraganddropaChartintotherightcellofthetable.<}0{>将一个Chart(图表)(柱状图)拖放到表格的右边单元格。

<0}

7.{0>NamethenewqueryChart,andthenclickOK.<}0{>把这个新查询命名为Chart,然后点击OK。

<0}

8.{0>IntheInsertChartdialogbox,acceptthedefaultsettingofacolumnchart,andthenclickOK.<}0{>在弹出的InsertChart对话框中接受柱状图的默认设置,然后点击OK。

<0}

9.{0>DraganddropaCrosstabtotherightofthetabletoplaceitbelowthetable.<}0{>拖放一个Crosstab(交叉表)到表格最右端,这实际是要将图表放在表格下面。

<0}

10.{0>NamethenewqueryCrosstab,andthenclickOK.<}0{>对新的查询Crosstab进行重命名。

<0}

{0>Theresultsappearasfollows:

<}0{>结果显示如下:

<0}

{0>Wecannowaddqueryitemstoeachofthereportobjects.<}0{>我们现在可以给每个报表对象添加查询对象。

<0}

{0>Task2.<}0{>任务2。

<0}{0>AddItemstothereportobjects.<}0{>将对象添加到报表对象。

<0}

11.{0>IntheInsertableObjectspane,clicktheModeltab,expandOrders,andthendraganddropOrdernumberontothefirstcolumnofthelistwhenaflashingblackbarappearsasshownbelow:

<}0{>在InsertableObjects窗格中点击Model标签页,展开<销售(查询)>-><产品>,然后拖放[产品系列]到列表的第一个列,出现一个闪动的黑色条:

<0}

12.{0>Double-clickOrderdatetoaddittothelist.<}0{>双击<产品>->[产品类型]将其添加到列表。

<0}

13.{0>ExpandProducts,double-clickProductname,andunderOrdersdouble-clickQuantitytoaddthemtothelist.<}0{>在<销售>下双击[数量],将它们添加到列表中。

<0}

14.{0>OntheChart,draganddropRevenueontoMeasures,ProductLineontoCategories,andOrdermethodontoSeries.<}0{>在Chart上,将<销售>下的[收入]拖放到Measures区,将<产品>下的[产品系列]拖放到Categories区,将<订购方法>下的[订购方法]拖放到Series区。

<0}

15.

{0>OntheCrosstab,draganddropProducttypeontorows,OrdermethodontoColumns,andGrossprofitontoMeasures.<}0{>在Crosstab上,将<产品>下的[产品类型]拖放到行,<订购方法>下的[订购方法]拖放到列,将<销售>下的[毛利润]拖放到Measures区。

<0}显示如下:

16.{0>Runthereport.<}0{>运行报表。

ReportViewer中出现一个大的报表,列表的右边显示图表,底部显示交叉表。

<0}{0>Wewillnowaddaheadertoprovideuserswithinformationaboutthereport.<}0{>我们将添加一个表头,给用户提供报表信息。

<0}

{0>Task3.<}0{>任务3。

<0}{0>Addaheadertothereport.<}0{>给报表增加一个页头<0}

17.{0>ClickClose,andthenonthetoolbarclickPageHeader&Footer

.<}0{>在工具栏点击PageHeader&Footer

<0}

18.{0>InthePageHeader&Footerdialogbox,clickthecheckboxbesideHeader,andthenclickOK.<}0{>在弹出的PageHeader&Footer对话框中点击Header旁的复选框,然后点击OK。

一个空页头出现在工作区顶端,下面以红色点线作为强调。

<0}

19.{0>FromtheToolboxtaboftheInsertableObjectspane,draganddropaBlockintotheheader.<}0{>在InsertableObjects窗格的Toolbox标签页上,将一个Block(块)拖放到页头。

结果显示如下:

<0}

20.{0>DraganddropanotherBlockintotheheader,totherightofthefirstblock,whenathinblacklineappearstotherightofthefirstblock.<}0{>将另一个Block拖放到页头,放在第一个block的右边,这时一个窄的黑色线条出现在第一个Block的右边。

鼠标松手后第二个Block排列在了第一个Block的下面。

结果如下:

<0}

21.{0>DraganddropaTextItemontothetopheaderblock.<}0{>将一个TextItem(文本项目)拖放到顶部的headerblock。

<0}

22.{0>IntheTextdialogbox,typeProductReport,andthenclickOK.<}0{>在Text对话框中输入’ProductReport’,然后点击OK。

<0}

23.{0>Repeatsteps5and6toaddatextitemtothebottomblockreading,ProductOrdersbyQuantity,Revenue,andGrossProfit.<}0{>重复第5和第6步,再把另一个TextItem加到下面的block,输入文本为’ProductOrdersbyQuantity,Revenue,andGrossProfit’。

表头的层次结构为:

 页头(PageHeader)

           ┗━Block

              ┗━文本项(TextItem)

<0}

{0>Task4.<}0{>任务4.<0}{0>Applystyletotheheader.<}0{>给表头应用样式。

<0}

24.{0>ClickProductReportintheheader,andthenonthetoolbarclickFont.<}0{>点击页头中的’ProductReport’,然后在工具栏上点击Font。

确保仅选择文本对象而不是整个block。

<0}

25.{0>IntheFontdialogbox,clickArialBlackand20pt,andthensettheForegroundcolortoRed.<}0{>在“属性”的Font对话框中点击ArialBlack和20pt,然后将Foregroundcolor设置为Red。

<0}

26.{0>ClickApplytoseethenewfontsettings,andthenclickOK.<}0{>点击Apply查看新的字体设置,然后点击OK。

<0}

27.{0>在工具栏上点击ContainerAlignment,然后点击

AlignTopCenter

.<}0{>在工具栏上点击“居中”,使标题居中显示<0}。

28.{0>FormatthetextiteminthebottomblocktobeArial,14pt,anditalics,withaForegroundcolorofRed.<}0{>将第二个block中的文本对象格式化为Arial、14pt和Italic,Foregroundcolor为Red。

<0}

29.{0>AlignthetextiteminthebottomblocktobeAlignTopCenter.<}0{>使用“居中”对第二个block中的文本对象进行排列。

<0}

30.{0>Runthereport.<}0{>运行报表。

页头出现在报表的上中部。

<0}

31.{0>ClickClose,andthensavethereportasDemo6-1.<}0{>点击Close,然后保存报表为“演示6-1”。

<0}

32.{0>LeaveReportStudioopenforthenextdemo.<}0{>保持ReportStudio处于打开状态用于下一个演示。

<0}

{0>Results:

<}0{>结果:

<0}

{0>Wecreatedareportcontainingthreedifferentreportobjects.<}0{>我们创建了一个含有三种不同报表对象的报表。

<0}{0>Eachtypereportsondifferentmeasuresrelatingtoproductorders.<}0{>每种类型都对与产品订单相关的不同度量进行报告。

<0}{0>Wethenaddedaheadertoexplaintouserswhatthisreportcontains,andappliedstyletoittoaddemphasis.<}0{>然后我们添加了一个表头向用户解释报表包含的内容,还给其应用了样式。

<0}

{0>Workshop6-1:

CustomDesignaPromptPage<}0{>练习6-1:

定制设计一个提示页。

<0}

{0>TheVicePresidentofSaleswantstoanalyzesalesrepresentativeperformancefordifferentcountries,overdifferenttimeframes,andforvaryinglevelsofsalesrevenue.<}0{>销售副总希望对各种销售收入级别、不同国家在不同时期的销售代表绩效状况进行分析。

<0}{0>Ratherthancreatingnewfiltersforeachrequest,youwillcreateapromptpagefortheSalesRepresentativePerformanceReportthatwillincludefiltersforOrderdate,Country,Revenuelessthan,andRevenuegreaterthanacertainamount.<}0{>我们将给SalesRepresentativePerformanceReport创建一个提示页,其中包括Orderdate、Country、Revenue小于和Revenue大于某个数值的过滤。

<0}{0>TheOrderdatepromptwillbemandatory,buttheotherpromptswillbeoptional.<}0{>Orderdate提示是强制的,但是其它提示则是可选的。

<0}

{0>Toaccomplishthis:

<}0{>要完成这个工作:

<0}

∙创建一个列表,包含<销售(查询)>-><时间维度>的[日期]创建{0><}0{>创建报表;<销售(查询)>-><零售商场地><0}的[零售商国家/地区]、[零售商城市]和[零售商名称];<销售(查询)>-><销售>的[收入]。

∙将[日期]从列表中剪切,注意不是删除。

∙{0>BuildaPromptpageandadda2column,2rowtabletoit.<}0{>创建一个Prompt页面并给其添加一个2行2列的表格。

(在页面资源管理器中插入一个页面)<0}

∙{0>AddaDatePrompttothetoplefttablecellusingtheOrderdatequeryitemandan"in_range"operator.<}0{>使用[日期]查询项和一个"in_range"运算符给左上表格单元格添加一个DatePrompt。

<0}

∙{0>AddaValuePrompttothetoprighttablecellusingtheCountryqueryitemfromtheSalesbranchaddresssubjectqueryandan"in"operator.<}0{>使用来自<零售商场地>查询主题的[国家/地区]查询项和一个"in"运算符给右上的表格单元格添加一个ValuePrompt。

<0}

∙{0>AddaTextItemtothebottomlefttablecelltoserveasaheaderreadingRevenueLessThan.<}0{>给左下的表格单元格添加一个TextItem,作为RevenueLessThan表头。

<0}

∙{0>AddaTextBoxPromptaftertheTextItemusingtheRevenuequeryitemandthelessthan(<)operator.<}0{>使用[收入]查询项和小于(<)运算符在TextItem后添加一个TextBoxPrompt。

<0}

∙{0>AddaTextItemtothebottomrighttablecelltoserveasaheaderreadingRevenueGreaterThan.<}0{>给右下表格单元格添加一个TextItem,作为RevenueGreaterThan表头。

<0}

∙{0>AddaTextBoxPromptaftertheTextItemusingtheRevenuequeryitemandthegreaterthan(>)operator.<}0{>使用[收入]查询项和大于(>)运算符在TextItem后添加一个TextBoxPrompt。

<0}

∙{0>ReturntoPage1ofthereportandsettheRevenuefilterstofilterafteraggregation.<}0{>返回报表的Page1并设置[收入]过滤在汇总后进行过滤。

<0}

∙{0>Runthereportandtestthepromptpagetoviewdatafor2002,forCanada,Mexico,andtheUnitedStatesforrevenuegreaterthan$1,000,000.<}0{>运行报表并测试提示页,查看2005年中国的收入大于$2,000,000的数据。

<0}

∙{0>SavethereportasWkshp6-1.<}0{>将报表保存为练习6-1。

<0}

{0>Formoredetailedinformationoutlinedastasks,seetheTaskTableonthenextpage.<}0{>更多细节信息,参见下一页的任务表。

<0}

{0>Forthefinalqueryresults,seetheWorkshopResultssectionthatfollowstheTaskTable.<}0{>最后的查询结果,请参见任务表后的练习结果部分。

<0}

{0>Workshop6-1:

TaskTable<}0{>练习6-1:

任务表<0}

{0>Task<}0{>任务<0}

{0>WheretoWork<}0{>任务完成地点<0}

{0>Hints<}0{>提示<0}

1.{0>OpenWkshp4-2banddeleteallfilters.<}0{>新建报表,添加对象。

<0}

Toolbar\<0}

∙{0>Tabularfilters:

Orderdate,andRevenue<}0{><销售(查询)>-><时间维度>的[日期]创建{0><}0{>创建报表;

∙<销售(查询)>-><零售商场地><0}的[零售商国家/地区]、[零售商城市]和[零售商名称];

∙<销售(查询)>-><销售>的[收入]<0}

2.在表格对象中剪切[日期]acd

Toolbar\

∙注意使用剪切,而不是删除

3.{0>AddanOrderdateprompt.<}0{>添加一个[日期]提示。

<0}

{0>Toolbar\BuildPromptPage<}0{>Toolbar\BuildPromptPage<0}

{0>InsertableObjectspane\Toolbox\DatePrompt<}0{>InsertableObjectspane\Toolbox\DatePrompt<0}

∙{0>Parametername:

Date_Range<}0{>参数名称:

Date_Range<0}

∙{0>Item:

Orders\Orderdate<}0{>对象:

<时间维度>\[日期]<0}

∙{0>Operator:

in_range<}0{>运算符:

in_range<0}

4.{0>AddaCountryprompt.<}0{>添加一个[国家/地区]提示。

<0}

{0>Insertabl

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 党团工作 > 其它

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1