Charting on Printtime Formulas

I have a report that contains a subreport and uses shared variables calculated WhilePrintingRecords. I tried charting the finished data but found that some of the fields do not appear in the Chart Expert. Then through this forum I found a Business Objects paper: cr9_charting_print_time.pdf. This paper explains why charting directly on print time formulas will not work. But it describes a workaround. My problem is that I have so far been unsuccessful in applying the workaround to my particular report.
I run into problems on page 5 of the paper. A new subreport called ChartSub has been creasted. The example is to enter the following Record Selection formula in the subreport: {Customer.Customer Name} in split({Pm-@OnChangeOf},"^").
The array OnChangeOf has been previously created. In my report it is simply the names of the months. The finished chart I want is a simple line chart with month names as the y axis and values as the x axis. But in my database I have no table tthat contains monthnames other than multiple records (the equivalent of "Customer" in the example).
It seems that I am able to create the workaround up to the point that I have two array formulas that contain the x axis and y axis data points. But I can't figure out how to create a chart from this.
I know this is not a simple question. But if anyone would like to dig up the article, I'd be glad to furnish additional details.
Many of my reports use printtime formulas and shared variables, and I really need to figure out how to chart this type of data.
Thank you,
Art

Thank you Jehanzeb.
Before I get to your specific questions, let me see if I can insert links to the three screenshots I wanted to show you in my previous posting. I used Photobucket as you suggested:
[Before Chart - Preview|http://i435.photobucket.com/albums/qq77/aschwalge/Charting1.png]
[Before Chart - Design|http://i435.photobucket.com/albums/qq77/aschwalge/Charting2.png]
[String Arrays|http://i435.photobucket.com/albums/qq77/aschwalge/Charting3.png]
Answering your specific questions:
Formula to calculate Total Cost ('MfgCost'), placed in GF #2c:
'MfgCost
WhilePrintingRecords
'From Matl subreport
Shared nMatlCost As Number
Global nProdCost As Number
Global nMfgCost As Number
nMfgCost = nProdCost + nMatlCost
Formula = nMfgCost
Formula which calculates the shared variable, which is placed in GF #2 of the Material subreport:
WhilePrintingRecords
Shared nMatlCost As Number
nMatlCost = Sum ({MatlUsageTran.Cost-Total-Material}, {MatlUsageTran.Posting-Period})
Formula = nMatlCost
The Material subreport is placed in GF #2b of the Main Report.
You are concerned that the Total Cost  may be bringing more than one value for each month. I believe it is only bringing in one value - I don't think this is the problem.
Does the Main Report and Subreport have the same record selection formula? Not quite, The only difference is in the inequality sign for Posting-Period:
Main Report:
{ProductionTran.System-ID} = {?Company}
and
{ProductionTran.Posting-Fiscal-Year} = {?Fiscal Year}
and
{ProductionTran.Posting-Period} <= {?Posting Period}
and
{ProductionTran.Work-Type-ID} = "RN"
and
{ProductionTran.Distribution-Type} <> "Distributed"
Material Subreport:
{MatlUsageTran.System-ID} = {?Pm-ProductionTran.System-ID}
and
{MatlUsageTran.Posting-Fiscal-Year} = {?Pm-ProductionTran.Posting-Fiscal-Year}
and
{MatlUsageTran.Posting-Period} = {?Pm-ProductionTran.Posting-Period}
and
{MatlUsageTran.Work-Type-ID} = "RN"
and
{MatlUsageTran.Distribution-Type} <> "Distributed"
"When you say, month number will be your X-Axis, providing you have set the report and formulas for 2007 only, it should show only 1-12 months of 2007 on the chart. However if the multiple records are getting pulled for each month, the chart would not be able to fit everything, hence I suspect it doesn't show the records on the graph. Are you sure, the records you pulling from main report are (one single total cost record for each month?)using sharedvars?"
I think the Total Cost number is unique, as discussed earlier. I think the problem is that there are multiple records for month number in ChartSub.  Although my string array strOnChangeOf has unique month numbers, in ChartSub I have the following record selection formula:
{ProductionTran.Posting-Fiscal-Year} = 2007
and
CStr({ProductionTran.Posting-Period}) in split ({?Pm-@OnChangeOf},"^"}
ProductionTran.Posting-Period has MANY records for each month number (posting-period). This seems to me to be the ONLY real difference between the BO article, where Customer.CustomerName is used for record selection in ChartSub.
Once again, thank you for your help!
Art

Similar Messages

  • Chart cells with Formulas?

    I am attempting to chart a row of calcuated percentages. When I select the row and create a 3D line chart its blank with no series. Why?

    That's not a bug, Michael, it's the designed behaviour. Labels are picked up from the header row or column automatically, as may be seen in the example in my previous post.
    Row 1, containing the labels, is a header row. Column A, containing the series label, is a header column. Note that the labels in this row appear as category axis labels on the chart, and the "Percentage" label in column A appears as the series label in the legend below the chart.
    Apple provides some excellent documentation for Numbers; the Numbers '09 User Guide, downloadable via the Help menu in Numbers. As a newcomer to Numbers, you would benefit greatly by reading at least the first four chapters of this guide. With respect to your curent question, you'll find a more detailed answer in Chapter 7, Creating Charts from Data. The rest can be set aside for reference on an as needed basis.
    If you are writing formulas for your spreadsheet documents, you will also want the iWork Formulas and Functions User Guide, available via the same route.
    Regards,
    Barry

  • Charts with formulas

    Post Author: archon4239
    CA Forum: Charts and Graphs
    I'm using Crystal Reports XI and I can't seem to use the chart functionality with formulas.  I see detail formulas available in the chart wizard (data tab), but I don't see my sum formulas in the wizard.  The sum formulas are based variables that total numbers in the group footer. 
    Anyway I can create charts with these formulas that sum up values in the group footer?

    Post Author: acarey
    CA Forum: Charts and Graphs
    A big short coming with CR is that it doesn't let you chart WhilePrintingRecords formulas. I tore my hair out for a while with this one.
    Eventually I found a document with a work around on the Business Objects website. Its a SERIOUS pain in the *** but it does work.
    The Doc is for CR9 but I'm using XI and it works. The document is called cr9_charting_print_time.pdf. Unfortunately I can't remember the exact location but you should be able to search for it.
    If anyone knows an easier way don't hesitate to TELL SOMEONE. The thing with these forums is that questions like this don't seem to get answered to often.
    Good luck mate

  • How can I define more than one baseline in a line chart??

    How can I add more than one straight line across a graph to indicate a target value? The values are percentages.
    Thanks a lot!!!

    When I have needed to indicate a target line on a chart, I have written a formula that would return a negative or positive number for each group. Then when I chart on the formula, it creates a baseline, with those groups beating the target above the baseline, and those failing to meat the target below the baseline. Percentage calculations work well on these types of charts.

  • SSRS Use a formula for a line graph y = mX + b

    Hi I want to show a line on a line chart using a formula in the form y = mX + b.   Can't seem to get this to work.   I inputted the formula into the "Value field" of the "Data field" but the line doesn't show up.
    X = value for X axis (it's a date);  m and b are query fields (both type real)    The data is grouped on two fields that are specified in the "series field"
    There are multiple values for X but only one value for M and B.
    So for all dates (X) for each Group 1 AND Group 2 combo: chart this line.
    Using: SSRS Visual Studio 2008

    Hi 317704,
    Linear Regression line might be what you need, you have to get the records in the database using the T-SQL for all the points on the X-Axis following the below formula. Where n is the total number of data points, and the tis and yis are the components of
    the data point tuples (ti, yi).
     I give a sample below,
    My datasource(AdventureWorksDW2008):
    DECLARE @start_month
    SMALLDATETIME
    DECLARE @end_month
    SMALLDATETIME
    SET @start_month
    = '2002-01-01'
    SET @end_month
    = '2002-12-01';
    SELECT
    CAST(CONVERT(CHAR(6),DimTime.FullDateAlternateKey,112)
    + '01'
    AS
    SMALLDATETIME)
    AS CalendarMonth
    ,SUM(SalesAmount)
    AS y
    FROM FactInternetSales
    INNER
    JOIN DimSalesTerritory
    ON FactInternetSales.SalesTerritoryKey
    = DimSalesTerritory.SalesTerritoryKey
    INNER
    JOIN DimTime
    ON FactInternetSales.OrderDateKey
    = DimTime.TimeKey
    WHERE DimSalesTerritory.SalesTerritoryKey
    = 9 --Australia
    AND
    DATEPART(YEAR,DimTime.FullDateAlternateKey)
    BETWEEN
    DATEPART(YEAR,@start_month)
    AND DATEPART(YEAR,@end_month)
    AND
    DATEPART(MONTH,DimTime.FullDateAlternateKey)
    BETWEEN
    DATEPART(MONTH,@start_month)
    AND DATEPART(MONTH,@end_month)
    GROUP
    BY CONVERT(CHAR(6),DimTime.FullDateAlternateKey,112)
    You could get some reference from top sample.
    Thanks,
    Challen Fu
    Challen Fu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Chart Cummulative Percentage Total?

    Post Author: Kanshouzhe
    CA Forum: Charts and Graphs
    I have seen one other post for one similar to this... but no answer. 
    I have created a Crystal 9 bar chart showing the percentage of days to resolve helpdesk tickets.  Nice... but I really want to create a running total (cummulative) of the percentages.  I have been able to create a formula for the cummulative total, but the chart excludes my formula:
    WhilePrintingRecords;Numbervar TotalPercent;TotalPercent := TotalPercent + (DistinctCount (, {@DaysOpen})/DistinctCount ())*100;
    I have tried creating various formulas, running total Summaries and combinations to no avail.  Could someone please help me skin this cat?  Thanks!

    paulclark wrote:
    I have a spreadsheet full of clients from different cities, and I'd like to create a chart (3D ideally) showing which cities have the most clients and which have the fewest.
    For example, 158 live in City A, 132 City B all the way down to 1 client in City V.
    Currently my spreadsheet has first, last, street, ZIP, city, state, misc info A, misc info B, misc info C Etc Etc.
    I may also like to create a chart showing totals of one of the Misc columns.
    Use a subsidiary table to collect the names of the cities in your list, and to count them. Chart the results. Here's an example.
    Cities are listed in column B, and may be in any order. Spelling counts, as the formula in column E identifies each city by the exact contents of the cell.
    Column E contains a formula that counts the number of different entries in column B, and marks the row containing the first occurrence of each with a serial number.
    The formula in E2 is
    =IF(COUNTIF($B$1:B2,B)=1,MAX($E$1:E1)+1,"")
    Fill down to the end of the column.
    Column A in the second table (For Graph) contains a formula that constructs a reference to the cell containing the first occurrence of each City name on the Main table, and copies that name to it's cell.
    The formula in A2 is
    =IFERROR(OFFSET(Main :: $A$1,MATCH(ROW()-1,Main :: $E,0)-1,1),"")
    Fill down to the end of the column.
    Column B contains a formula that counts all occurrences in column B of the Main table of the name in its row in column A.
    The formula in B2 is
    =IF(COUNTIF(Main :: B,A2)>0,COUNTIF(Main :: B,A2),"")
    Fill down to the end of the column.
    Regards,
    Barry
    PS: Descriptions of each function used, and further examples of their use can be found in the iWork Formulas and Functions User Guide. You can download the guide (and the Numbers '09 User Guide) through the Help menu in Numbers.
    B

  • Chart scale

    Post Author: nick_m
    CA Forum: Charts and Graphs
    I don't see this is an option anywhere but I thought I would ask anyway. Is it possible to adjust the chart to only show whole numbers as the minimum scale increment? For example I'm displaying data that will only be in whole numbers but the scale lists 1.5, 2.5, 3.5 etc. I still want it to automatically display the scale and range for me, but only want whole numbers as the minimum increment.

    Post Author: V361
    CA Forum: Charts and Graphs
    I have CR XI
    you may need to create a formula to "Roundup" your numbers, then chart off the formula.
    RoundUp(4.1,0)   will Return 5.

  • Spanning simple chart across pages

    Hi,
    I want to clean up some formatting on a report with a simple chart plotting a formula result against customer names.
    The first chart contains the top 15 customers sorted top down using the Top N =15 option in chart group sort.
    However, how can I display the next 15 customers on the second page?
    Is it easier to do this via subreports? or if there a function that I can use?
    thanks, Eddie

    thanks Panda. Just to clarify.
    I have about 100 customer ids, sorted against a rating value high to low.
    I put this in the section expert as a formula for next page after for the section.
    nothing seemed to happen.
    Did I place formula in correct location? I couldn't find an appropriate location in Charting options - I haven't got my head around why I would put this formula in section expert yet and not mention the chart.
    I am running crystal xi rel2.
    thanks, Eddie

  • Charting Running Totals as Percentage

    I'm trying to show a running total as a percent of another running total in a chart.
    The report details have a unit ID (serial Number) and a flag indicating whether or not the unit went through rework.
    Running total 1 is a distinct count of unit ID, running total 2 is a distinct count of unit ID where the flag is No.
    I can make a chart that shows both counts, but running total 2 is always a count, and I'd like to show it as a percent of running total 1.
    I can create a formula that shows total2 as a percent of total 1 and put this in the group footer - but I can't chart on that formula.
    Is what I'm trying to do possible?
    Thanks
    Edited by: Doug McLauchlan on Mar 26, 2010 7:22 PM - Spelling

    I finally found an answer here:
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f055d37d-2ddc-2c10-6ea3-d454e6f3bf94
    The technique involves building your charted values into strings and passing them to a sub-report to do the charting.
    I found I had to make several changes to way the report works in my situation - mainly because of grouping.

  • BUG: GROUP BY NOT WORKING (please help)

    Hi,
    My company is using Crystal Reports XI. Every installation for crystal has the same problem here:
    If you create a formula, it does not appear as a selection for the group by -- regardless of whether the formula is being used in the report or not.
    Is anyone else seeing this problem? (there was no problem with this feature 2 weeks ago when I last created a report using these features).
    Please help.
    Thanks
    Anna Bogdanova
    Data Analyst
    Recombinant Data Corporation

    Please copy and paste the formula into a reply and we can be more specific but I suspect you're utilizing a function that must be processed later on in the 3-pass report generation model.  One can only group on simple formulas so that the results of the formula will be available at the point the groups are created.
    Once we see the formula we can provide more specifics and workarounds.  Crystal Reports is intelligent and will not display those printtime formulas when selecting a field or formula on which to group - as it knows that this cannot be done.
    There are workarounds based on what functions are being used in your formula.

  • Can I used numbers 09 to make histograms?

    I need to now if is possible to used Numbers 09 to work with experimental data to do histograms analysis. Tks.

    A histogram is a bar chart showing the count of data values falling within each of a set of equal ranges. So what's needed is a means of restating the data in the form required by the chart.
    Here the original data (a biased random generated set of 408 items) is recorded in column B of the table on the left (Table 1). The MAX, MIN and COUNT values in column D were checks to confirm the range of values generated.
    The second table (highlighted as the source data for the chart) contains two formulas:
    A2 (and filled down until the last value is greater than the MAX of the data values):
    =10*(ROW()-1)
    Where 10 is the range of data values for each bar on the histogram.
    B2 (and filled down to the las row containing a value in column A):
    =COUNTIFS(Table 1::$B,">"&A1,Table 1::B,"<="&A2)
    Regards,
    Barry
    NOTE:
    As written, the formula will not include a count of zero values. To include these in the first bar, you will need to insert an = sign after the > sign in the formula above in cell B2 ONLY, after filling the formula down the column. If the = sign is added before filling the formula down, it will result in data values matching the values in column a being counted in both the range labeled with that value AND in the range above (ie greater than) that. (eg, a data value of 20 would be shown in the count for the second bar AND the count in the third bar.)

  • SSRS 2008 Column Chart with Calculated Series (moving average) "formula error - there are not enough data points for the period" error

    I have a simple column chart grouping on 1 value on the category axis.  For simplicity's sake, we are plotting $ amounts grouping by Month on the category axis.  I right click on the data series and choose "Add calculated series...".  I choose moving average.  I want to move the average over at least 2 periods.
    When I run the report, I get the error "Formula error - there are not enough data points for the period".  The way the report is, I never have a guaranteed number of categories (there could be one or there could be 5).  When there is 2 or more, the chart renders fine, however, when there is only 1 value, instead of suppressing the moving average line, I get that error and the chart shows nothing.
    I don't think this is entirely acceptable for our end users.  At a minimum, I would think the moving average line would be suppressed instead of hiding the entire chart.  Does anyone know of any workarounds or do I have to enter another ms. connect bug/design consideration.
    Thank you,
    Dan

    I was having the same error while trying to plot a moving average across 7 days. The work around I found was rather simple.
    If you right click your report in the solution explorer and select "View Code" it will give you the underlying XML of the report. Find the entry for the value of your calculated series and enter a formula to dynamically create your periods.
    <ChartFormulaParameter Name="Period">
                      <Value>=IIf(Count(Fields!Calls.Value) >= 7 ,7, (Count(Fields!Calls.Value)))</Value>
    </ChartFormulaParameter>
    What I'm doing here is getting the row count of records returned in the chart. If the returned rows are greater than or equal to 7 (The amount of days I want the average) it will set the points to 7. If not, it will set the number to the amount of returned rows. So far this has worked great. I'm probably going to add more code to handle no records returned although in my case that shouldn't happen but, you never know.
    A side note:
    If you open the calculated series properties in the designer, you will notice the number of periods is set to "0". If you change this it will overwrite your custom formula in the XML.

  • Information from formula that returns an array is not shown on chart

    Hello experts,
    I have a chart (combination) which should show information from a group of cells that have a formula in it and returns an array ().
    {=SUM((Plan1!L2:L43=L2)(Plan1!I2:I43=D3)Plan1!M2:M43)}
    In the spreadsheet and on the chart, while developing the dashboard, it shows perfectly.
    What happens is that while previewing.....no data is shown at all on the chart.
    Please advise on how to solve it.
    Carlos Henrique Matos da Silva - SAP BusinessObjects BI - Brazil.

    Hi Carlos,
    Excel Array entered formulae are not supported in Xcelsius.
    When you are designing the dashboard Xcelsius is using native Excel functrionality and calculation engine to display the results.  When you preview the dashboard Xcelsius convertys all of the spreadsheet formulae to Flash/ActionScript which does not have the equivalent array functionality, adn so when previewed the results do not show.
    Hope this helps
    Charles

  • Chart Expert - Why are some formula fields not available?

    I have a report where I had to do Running Totals with formulas.  Following what I learned long ago from the documentation, I laid in my formulas, and then setup some "Display" formulas to print out the results at the end of my report.
    Now I am adding a chart to show a sort of 'summarized' version of the report - its a simple Pie chart...
    But when I go into the Chart Expert and want to select those Display formula fields (there are 4 of them) - they do not appear in the list?
    FYI - These four Display formulas are in the Report Footer of the report, and my chart is in the Report Header. 
    Why do some of my formula fields appear in the Chart Expert "select field" list - while others do not?
    I checked the documentation on this, but it is very "lite" and does not indicate why this might be...
    Any help is most appreciated!

    Read again -  "Problem has been circumvented" NOT "worked around".  In other words, when you pay a fortune for a poorly documented piece of software and you are dependent on answers from a Forum, where at times no one answers your question(s) and your boss is shouting at you as to how you selected such a lousy piece of software with such "lite" documentation and is hardly going to pay any more money for a support call to answer a simple question that should have been covered (and then some) in the documentation, (let alone support of the problem) - you CIRCUMVENT, i.e. give up and find some other way to do what you were trying to do.
    Hence, problem circumvented, NOT worked around.
    Thanks for asking - here's 10 points for your efforts.

  • How to apply formula field for a chart object in crystal report XI

    Hi
    how to add formula field for a chartobject, i tried the following code but returns invalid condition field.
    i want to show  different chart in same crystal report viewer with different coursestatus values.
    please suggest where ia m wrong.
                   FormulaField oFormulaField;
                   oFormulaField = new FormulaField();
                   oFormulaField.Name = "Status1";
                   oFormulaField.Text = "{CSP_PROCESS_REPORT.Coursestatus} = 'Mastered'";
                   oFormulaField.Syntax = CrFormulaSyntaxEnum.crFormulaSyntaxCrystal;
                   oFormulaField.Type = CrFieldValueTypeEnum.crFieldValueTypeStringField;
                    boChartObject.ChartDefinition.ConditionFields.Add(oFormulaField);
    regards,
    Padmanaban V

    i missed the following line in my code.
    rcDoc.DataDefController.FormulaFieldController.Add(oFormulaField);
    now it works......
    my next issue is that,
    chart returns True & False captions. but i want to show actual value. how its to be done
    regards,
    Padmanaban V

Maybe you are looking for