Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to put labels on x-axis when no data for an item?
Message
De
12/09/2002 02:37:06
Walter Meester
HoogkarspelPays-Bas
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Divers
Thread ID:
00699464
Message ID:
00699646
Vues:
21
Hi steve,

Yes, this is a problem I also encountered in some of my reports.
I ended up with creating 0 values for the missing items on the x-axis and force the graph only to show values between 0.01 and the maximum alowable value.

Your VB solution is a very interesting one, though I don't understand how it should work or be implemented. Can you point me to the KB article. Maybe we can find how to get this to work together.

Walter,


>I have a Crystal Report chart with an x-axis and y-axis.
>
>On the x-axis I want labels in minutes from 0 to 20 across the bottom below the x-axis line using labels such as 0 min., 1 min., 2 min., 3 min., and so on up to 20.
>
>The problem is that the data does not have any value for 1 min. or 3 min. so when I preview the chart I see 2 min., 4 min., 5 min., 6 min., and so on up to 12 min. for the x-axis labels?
>
>How can I get around this problem without touching the data to fake out the report? Thanks for the help.
>
>I found on the Crystal website where I could write a VB routine to make this work, but I have not tried it. I was wondering if there was a way I could take the VB routine and plug it directly into a Crystal formula and skip the VB formula and re-write the formula in Crystal or something
>
>Here is what the VB code looks like
>
>'@date
>'thisdate and nextdate will be used to determine if gaps exist in the database
>dim thisdate as date;
>dim nextdate as date;
>
>'output will be used to create the on-screen formula display
>dim output as string
>
>thisdate={master.date}+1;
>nextdate=nextvalue{master.date};
>
>do while nextrdate - thisdate > 0;
>output = output + totext(thisdate, "mm/dd/yyyy") + chr(10);
>thisdate = thisdate + 1;
>loop;
>
>formula = output;
>
>'output is creating a string running total to create the dates which do not exist
>'the chr(10) in output creates a new line for each new date created
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform