Chart on Grouped report

I only see one chart demo. It appears pretty easy but I can't get a chart to work in a report I have that has 2 groups. Here is a sample query I'm using:

select cast(u1.last_name || '', '' || '+
u1.goesby as varchar(50)) as Name, s1.*,
c1.Category
from schedule s1
join users u1 on u1.userid = s1.userid
join Categories c1 on c1.catid = s1.catid
where
s1.schDate >= '2004-06-01'
and s1.schDate < '2004-08-01'

Report groups are on Name and Category. I want a pie chart of the how much time (which is s1.duration) the user spent in each Category.

Delphi 6 Pro, FR 2.5, DBISAM 3.73

Thanks.

Comments

  • edited 2:22PM
    I changed the query to do a sum and now it is working. I'm grouping by the Name field. But the sum in the group footer of the report is zero with one pass, and just reflects the last record on 2-pass.
  • gordkgordk St.Catherines On. Canada.
    edited 2:22PM
    Don 2 requirements with sum function
    first [Sum([var or dfldname],bandname of mdband, 1)] use of extended syntax.
    2nd must be used in correct footer, ie in a group with 2 header footers
    it will work fine in the inner footer, which is summing the values of the current group. to get a total on outer footer, create a var in outerheader obp event and initialize to 0
    mytot :=0;
    in obp of mdband
    mytot :=[mytot] +[var or dfldname];
    then use [mytot] in memo in outer footer.
    You may have problems using the chart tied to a memo, as the num of points in a series is the num of times the memo repeats.
    ;)
  • gordkgordk St.Catherines On. Canada.
    edited 2:22PM
    hi Don
    i mislead you a bit sorry
    the sum function should be fine with extended syntax,
    i was thinking of prob;ems with avg and count.
    ;)
  • edited 2:22PM
    It is looking good now. Only other problems are:

    1. My labels in the legend have little square boxes on the end of them.

    2. When I display the report for mutiple users I want a new graph for each user's set of data. Currently only one graph displays at the end showing totals for all users. What band do I put the graph in to get it to do separate ones for each user?

    Thanks for your help.
  • edited 2:22PM
    I think I got problem 2 solved. Just moved the chart to the group footer. Don't know what's causing problem 1 though.
  • gordkgordk St.Catherines On. Canada.
    edited 2:22PM
    Check the contents of the memo your using for labels, make sure you havent added text to it after a variable.
    ;)
  • edited 2:22PM
    I got it working. Stretched was True for the Master Data band that this memo is on. I turned stretching off and the legend looks fine now. Go figure. :-)
  • gordkgordk St.Catherines On. Canada.
    edited 2:22PM
    Glad to here you got it working
    What may be happening with stretched on, a cflf may have been inserted and that is what was showing. check memo's props and make sure wordwrap and stretched are off also.
    ;)

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.