Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: chart - problem .... :( Post Reply Post New Topic
Author Message
mrowa
Newbie
Newbie
Avatar

Joined: 31 Jul 2007
Online Status: Offline
Posts: 5
Quote mrowa Replybullet Topic: chart - problem .... :(
    Posted: 31 Jul 2007 at 1:46am

Hello,

 

I have problem with realize one of the function under CR XI. I would be persuade if any of us would like to help me.

1)     1) From database (basically from one table), I take data to make report. Each of record have appropriate fields:

|dteData|intYear|intMonth|intDate|

2)     2) I want to realized comparison data from two or more periods of time on one chart and in one table. For easily explanation I will describe problem on two periods.

For instance, user want to display and compare on chart date (type monthly -sum data of each month) from 2007.02 – 2007.05 with date from 2006.03 – 2006.06. So we compare month 2007.02 with 2006.03; 2007.03 with 2006.04; 2007.04 with 2006.05; 2007.05 with 2006.06

On char I would like to display bars with comparison of months.

Problem is that I don’t know how to write something similar. I can use one period without any problems, but two and mores I can’t realized.

Detail description:

I passed two parameters two report:

{?from}, {?to} –for first period

 {?offset}, it means {?from}+{?offset}, {?to}+{?offset}  - for second period

On axis Y I have Sum(intDate);On X (year + month). But on each value x( example 20007.02) I need to have two values (bars). Value for standard period and offset.

For example for x=2007.02, I need two bars one equal 2007.02 and second with offset – 2006.03

Movement to next value (bar) is persuade by fields {data.rok}&{data.month} first or second period. This is combination of two elements year&month defined under Formula. Problem persist in that both period has different year.month and here problem starts once again. I don’t know how to solve it. I have found out one solution but it limits user only for two periods (I want to compare more).

My idea for compare only two periods:

I make one query in CR for one period and second query for second period.

Firs query:
 "SELECT 
       year ,
      month
        . ........"

Second query
"SELECT 
       year + FLOOR({month + offset} % 13),
      {month + offset} % 13
        . ........"

 

Then in CR I connect two periods and make “table” (results of queries) with JOIN on fields year and month.

This solution is not functional, because I need to make reports for days and hours as well. In this solution I can’t use (%31), because not all months has 31 days.

I use CR in WEB app made in Visual Studio 2005. Maybe from aspx we can manipulate with date to get exact solution, and solve problem with SELECT.

 

Hope my description clearly describe problem and someone will be able to help me. I would be thankful.

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.