Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need to group 2 tables by month

Status
Not open for further replies.

yolly12

MIS
Mar 21, 2005
83
0
0
hello,

I am writing a report using CR8.5 dev and GMCE 6.7 /SQL 2000 SP4 backend.

I am writing a report that looks at closed sales and open sales. Both of these values are stored in different database tables, cal & conthist.

these values need to be displayed on the same line. I have tried to do with with subreport and it displays well but then I need to add the two together and for some reason shared numbervars just dont want to work so I am starting the report over from scratch and trying another apporach

I am trying to build a group for generic months since the sales need to do primary sort by month however I cant build a group off of one table then expect the report to run just fine when I insert a formula into that group for the other table. So I started thinking about creating a formula that says if month({cal.date}, {conthist.date}) = 8 then "August" and so on. I am thinking that I can create my group from that formula and then list in specified order so i can get my months to show in order user wants and then insert my formulas in the group footer.

but I am drawing a total brain fart on getting the Month() to work for more than one table in same statement. or can it not be done with what I am using? or is there a better way? I am open to suggestions.

Thanks!
 
Shared variables will be zero in the report section that called the subreport, because Crystal assesses them before the subreport is run. The way round is to use them in the section below.

I'd also have thought you could combine the data as a single row or detail line, maybe using Left Outer.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top