Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Text Disappears In Chart In VB Report


Helllo, I have a excel file with a chart that I'm trying to imbed into my VB report. (the sheet is actually updated by a macro in the VB)

Everything looks fine in design mode, but when I preview or print the text (legend and values) dissapear. Is this a size issue or Is there another way to get the chart on my report. Thanks!




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Data In PowerPoint Chart Disappears
I do quite a lot of automation of graphs in PowerPoint from Excel. Occasionally, a chart will look like it has the correct data in, but when you double-click into it, the data reverts back to what was originally in the PPT chart (prior to automation).

I can't really attach my code because it is part of quite a large app. However, the following shows how I am referencing the PowerPoint objects:


Code:
Dim oActiveSlide As PowerPoint.Slide
Dim oObject As Object
Dim oDataSheet As Object

'set reference to graph object and datasheet
Set oObject = oActiveSlide.Shapes(MyShapeName).OLEFormat.Object
Set oDataSheet = oObject.Application.DataSheet

'put data into datasheet
oDataSheet.Cells(2, 2).Value = "2"
'...etc

oObject.Application.Update
oObject.Application.Quit

I am using version 10 of Excel and PowerPoint. Back when we first got version 10 we had a similar problem, but it appeared to be fixed by using Application.Update & Application.Quit after putting data into the chart.

Although this problem only happens occasionally, it seems to be "random" - I can't see any pattern to when it happens, and it is not replicable. Has anyone else come across this problem?

Thanks.

DrawString Text Disappears
I am using very simple DrawString code. The text displays, but after resizing the form, it goes away. Is there some additioinal call I need?

The code is something like:

Dim gr As Graphics = Me.ipInkPicture.CreateGraphics
gr.DrawString("This is a test", Font, Brushes.Black, x, y)
gr.Flush(Drawing2D.FlushIntention.Sync)

Highlighted Text Disappears
Hi,
I am coding a MUD client. The client has the incoming text stored in an RTF Text Box. Whenever text is highlighted, no cut or any command done, it disappears when you press enter. It also has this problem when you hit a button.

Thanks!

Combo Box Text Disappears!
I have a combo box that's supposed to show all values in a given database. The procedure works fine until it gets to the end, then for some reason the combo box loses its text. The list items are there, it just no longer shows the item I selected. I ran a quick debug, and it happens right on the first Exit Sub (the one before the error handler.)


Code:
Private Sub MasterControl_Click()
Set fso = New FileSystemObject
On Error GoTo ErrorHandler
MasterControl.Text = Replace(MasterControl.Text, " ", "")
If fso.FileExists(App.Path & "Databases" & MasterControl.Text & ".mdb") = False Then
For i = 0 To MasterControl.ListCount
If MasterControl.Text = MasterControl.List(i) Then
MasterControl.RemoveItem i
End If
Next i
Set rs = New ADODB.Recordset
RecordSource = "SELECT * FROM Headers ORDER BY Name"
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "DatabasesHeaders.mdb"
rs.Open RecordSource, ConnectionString, adOpenKeyset, adLockOptimistic
If Not rs.BOF Then
rs.MoveFirst
End If
For i = 1 To rs.RecordCount
If rs!Name = MasterControl.Text Then
rs.Delete adAffectCurrent
Else
rs.MoveNext
End If
If rs.EOF = True Then Exit For
Next i
End If
OrganizerDatabase.ListItems.Clear
Set rs = New Recordset
Set Win32Script = CreateObject("WScript.Shell")
For i = 0 To Data.Count - 1
Data(i).Locked = False
Data(i).BackColor = vbWhite
Next i
RecordSource = "SELECT * FROM " & MasterControl.Text & " ORDER BY SiteName"
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "Databases" & MasterControl.Text & ".mdb"
Win32Script.RegWrite "HKEY_CURRENT_USERSoftware" & App.Title & "CurrentSelectedItem", MasterControl.Text
rs.Open RecordSource, ConnectionString, adOpenKeyset, adLockOptimistic
If rs.BOF = False Then
rs.MoveFirst
End If
For i = 1 To rs.RecordCount
If rs.EOF = True Then Exit For
OrganizerDatabase.ListItems.Add , , rs!SiteName
rs.MoveNext
Next i
Set fso = Nothing
Set rs = Nothing
Set Win32Script = Nothing
Exit Sub
ErrorHandler:
MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, "Program Error"
Exit Sub
End Sub

Combo Text Disappears
Hi All,

Here's a strange one. I have 2 combo boxes of the same type on screen. I also have 2 grids and the grids are bound to different ADO recordsets. When I select an item from one of the combos the recordpointer on the associated grid moves to the item where a column has the associated value and all is fine. I do exactly the same with the other combo and grid, but after the recordpointer has moved on the grid, the value in the combo disappears. When stepping the code at the 'End Sub' line of the combo's click event the correct values are still in the combos text property. As soon as I F8/F5 off, the text disappears. I've removed and replaced the control, put debug statements into every event incase somthing else is triggering and nothing is.

Text Disappears When Focus Is Lost?
txtMyRef.Text Properties:
Data Field = MyRef
DataSource = adcInvoiceDisplay

adcInvoiceDisplay Properties:
Command Type = 8 - adCmdUnknown
RecordSource = "SELECT * FROM Invoice"

If the RecordSource has a specific index, then the text field is ok, however on start up, if the database is empty, i type something in the text field, change the focus to another field, and the text vanishes, as though the ADODC is still trying to load data that doesn't exist yet?

Any ideas?

When Moving Item Down In The Listbox The Text Disappears
Okay dont know why but the text is dissapearing when an item is moved down the list box.

Image1 displays before the move down
Image2 displays after the move down
Code is also attached. I am very confused I have been through this code througherly and I am sure there is not an error in the code.




Code:
' check: only proceed if there is a selected item
' check: last item can't be moved down
' save items text and items indexvalue
' remove item
' place item back on new position
' if you keep that item selected
' you can keep moving it by pressing cmdDown
' for arLoopCount adds the new playlist entrys from
' lstPlayList.
' list1 refreshes
' lstPlayList refreshes
Dim tempStr As String
Dim iIndex As Integer
Dim arLoopCount As Integer
List1.Clear ' Debugging orriented object to display the contents of arFilePlayList Array
If lstPlayList.SelCount = 1 Then
If lstPlayList.ListCount - 1 = lstPlayList.ListIndex Then
Exit Sub
Else
tempStr = lstPlayList.List(List1.ListIndex)
iIndex = lstPlayList.ListIndex
lstPlayList.RemoveItem lstPlayList.ListIndex
lstPlayList.AddItem tempStr, iIndex + 1
lstPlayList.Selected(iIndex + 1) = True
End If
End If
For arLoopCount = 0 To lstPlayList.ListCount
arFilePlayList(arLoopCount) = lstPlayList.List(arLoopCount)
List1.AddItem arFilePlayList(arLoopCount)
Next arLoopCount
List1.Refresh
lstPlayList.Refresh

Picturebox Text Disappears When Backcolor Changed (RESOLVED)
Changing the backcolor as below causes the text in it not to appear.
Any ideas?

Code:Picture2.Cls
Picture2.Print Format(tr1, "fixed"); Chr(10);
If tr1 >= 1.5 Then Picture2.BackColor = vbGreen Else Picture2.BackColor = vbWhite

Also,While I'm here, , how can I choose a fixed no. of decimal places? In the code above it is set to 2.

Thanks for any help

Jim



Edited by - jimvt on 6/18/2004 4:54:02 AM

Why Cant Display Report That Contain Chart In Crystal Report?
I done my crystal report and everything works fine until i try to call a report that contain chart, nothing come out when i try to call it, anybody knows why?

CR1.ReportSource = crptReport
CR1.ReportFileName = "statistic.rpt"
CR1.ReplaceSelectionFormula (str)
CR1.WindowState = crptMaximized
CR1.PrintReport
CR1.PageZoom (100)

Text Box Text Disappears
I am using the following code.
Code:
Private Sub txtData_KeyPress(Index As Integer, KeyAscii As Integer)
Dim strText As String
Dim rsText As ADODB.Recordset
Dim i As Integer

If KeyAscii = 13 Then
strText = "select * from TableName where Field_Name='"
strText = strText & txtData(0).Text
strText = strText & "'"

Set rsText = New ADODB.Recordset
rsText.Open strText, strConnStr, adOpenStatic, adLockPessimistic

For i = 0 To rsText.Fields.Count - 1
If IsNull(rsText.Fields(i).Value) Then
txtData(i).Text = ""
Else
txtData(i).Text = rsText.Fields(i).Value
End If
Next
End If
End Sub
User enters value from the field in txtData(0) and will press 'Enter' key. When observed during debugging, all the text boxes will have appropriate value. But, when the control comes out of End Sub, txtData(0) becomes blank. Does any one know why it happens?

Chart Report In Cystal Report 8.5
hi everyone,

i have a problem with dates in chart report and i need this report on my vb6 application.

this is the scenario:

i'm using crystal report 8.5 and i'am making a chart displaying the khw_used as my data and months as my group.

how can i display the whole year ex. if the month today is AUGUST, i need to display the months of SEPT 2004 - AUGUST 2005.
 
and what if i have only 2 months in the database (july and august)... still i need to display the whole year of SET 2004 - AUGUST 2005 but months with no data like SEPT 2004 - JUNE 2005 will be on the 0 level.

kindly help me..i need this report already.

Chart Report In Cystal Report 8.5
hello!

i am newbie here...

i'm making a project in vb6 and i want to create a chart report displaying the months...i want to display the whole year even if i have only 2 months...btw i'm using mysql as my database...

hope u could help me with my problem...


tnx!!!

Chart Report In Cystal Report 8.5
hi everyone,

i have a problem with dates in chart report.

this is the scenario:

i'm using crystal report 8.5 and i'am making a chart displaying the khw_used as my data and months as my group.

how can i display the whole year ex. if the month today is AUGUST, i need to display the months of SEPT 2004 - AUGUST 2005.


and what if i have only 2 months in the database (july and august)... still i need to display the whole year of SET 2004 - AUGUST 2005 but months with no data like SEPT 2004 - JUNE 2005 will be on the 0 level.

kindly help me..i need this report already.
 

Report And Chart
Hello everyone

Please Can someone help me
I have problem in creatintg two pages of crystal report. I mean I want to ask how could I put 2 pages in Crystal Report .
 And also how could i put chart in VB6 with values that I want in it ( the value will be from my MS Access data base)

DLL Or Lib For Crystal Report Chart
Hi all,

In my program I used Crystal report to make charts (bubble and collective chart). When creating the installation, which dll, ocx, lib,.. must I include in the installation source to make my program run correctly on other PC without installing Crystal report

Thanks a lot.

Chart On A Report In Access
I would like to add a pie chart to a report in Access 2003. Here is the problem:

Access only allows you up to six different variables. I have 18.

Not so big a deal if I could get it to take the top six (count wise) and graph them, but I have no idea how to go about that.

I have never built a report in VBA, but I assume that is the only way I can do this.

Any help is greatly appreciated.

-J

Crystal Report Chart
Hi all,
In my program I there a report with chart on it but when I setup my program to another PC, the chart disappear.
If we use crystalreport chart which files we must include into the installation?

Thanks a lot for helping me.

Crystal Report Chart???
I'm wondering if there is a way to put a total and the name of the machine on the same axis?

It should look like this:

total
machine name

I've tried different ways, but I'm not having any luck. Any suggestions?!

How To Make A Chart Report
hello!

i am newbie here...

i'm making a project in vb6 and i want to create a chart report displaying the months...i want to display the whole year even if i have only 2 months...btw i'm using mysql as my database...

hope u could help me with my problem...


tnx!!!

Crystal Report Chart And VB6 Help??
Hello!....I m using crystal report with visual basic 6.......i develop a report in crystal report in which i add a chart control......when i see preview in crystal report and move mouse over chart then on Tool tip i get each data point shown on mouse movement......
but when i open this report in VB...and run project and move mouse over it then i only get "CHART"...for whole movement.....how i can get data values for mouse movement in VB6??.....thanks in advance........

Crystal Report And Chart
I have developed code using Crystal report.
I am using the Chart of the crystal report.
Can any onr tell me what are the files that I should distribute with this application

Thanks in advance.

Crystal Report Chart
Hi Babu,

I've created a report with a line chart. When I call the report from vb6 on a windows XP, it's running fine; but when the same report is called on Windows 98, the chart just dissapeared. Is there anything to do with any missing file? However, I didn't get any error message. The other info in the report was displayed properly. I'm using CR8.5.

Thanks
yeosc

Data Report And Chart
I want to show some data from the database in the form of charts in data report.
There seems to be no control avilable for doing so in data report designer at design time!
Is There any way how I can overcome this problem?
Is it possible to use Crystal Reports' tools in VB without installing it?
Reply.
This is a bit urgent.

Creating A Chart In Excel From A Report
I have asked this question before and did not get any clear answers, so will try a different approach to it.

I have a report in Access 2002 and at the report footer, I have four percents. These four different percents equal 100. I want to make a pie chart out of these four percents (which will change everytime the database is updated with new data).

I can do this in Excel and then insert the chart object, but my data won't be updated everytime.

Is it possible for me to take these 4 numbers from my report, send these numbers to Excel which in turn updates the already existing data in the spreadsheet and updates the chart, then sends the chart back to Access for printing with the report?? I think this may be possible, I just need some help doing it.

Make any sense? If no I'll try to clarify.

Crystal Report Chart Problem
Hi all, I'm using CR8.5 & VB6.0 SP5
and I have this problem:

The report is designed with two graphs (one overlaying the another). The top one is set to have a transparent background so that the bottom chart can be seen beneath it.
The graphing combination previews correctly in the Report Designer, however, once the report is viewed through the viewer the transparent background of the first chart becomes opaque and the bottom chart is no longer visible.

Why is the top graph no longer transparent when viewed through the viewer?

Please help, thanks in advance

Marcotta

Cystal Report: Chart Design
I have 2 little problems designing a chart on Crystal Report. I included a picture of the chart created with my report.

1) Group label:
As you can see the labels go from 0 to 7. I tghink that is very strange since this is the number of the month. In my query the months are numbered from 1 to 7.
It would be even better if I could show the names of the months.

2) Legend:
Can I change the text in the legend? And if so how do I do that?

Crystal Report, Bar Chart Question.
I currently chart dated records from an access db such that there is a count of how many records where generated per Day. There may be times when no records will be generated for a certain Day, resulting in a graph of only the dates which had records generated. I would like to graph this data from my database, but I want all days of a month show up on the graph even if no records where generated for certain dates.

I suspect this could be done by a formula but I can't figure out how to get the forumula to graph the required data.

THANKS!

Crystal Report, Bar Chart Formatting
So I have this bar chart that graphs out some dates. They are currently displayed in MM/DD/YYYY format. I would like to just display the day (DD) on the Group Axis but I don't see any options to do this. I suspect it can be done via a formula but I am not sure how to do that.

Refreshing Crystal Report's Chart
I've made a chart which linked to MsAccess DB file.

Whenever I do a call from VB,


Code:
CrystalReport1.Destination = crptToWindow
CrystalReport1.Action = 1


The chart is not updated with the latest content from the DB file.

Can anyone help me with the command to refresh the chart?

Thanks

Harddisk

Insert Ms Chart In Data Report
Is it possible to insert a ms chart in data report??

How To Present A Excel Report With Chart
<html><div style='background-color:'><DIV></DIV>
<DIV></DIV>
<P>Hi All,</P>
<P>I have doubt in Excel Report. Is anybody has an idea how to represent chart type report generation in excel sheet? Already i have database results in the sheet. But i aslo need graphical representation of datas. If anybody have the samples or suggestion, please let me know. Because i am doing an important project in VB.</P>
<P>I have coding like this to produce datas in Excel Sheet,</P>
<P>Dim ob As Excel.Application</P>
<P>Set ob = New Excel.Application<BR>ob.Visible = True<BR>ob.SheetsInNewWorkbook = 1<BR>ob.Workbooks.Add<BR>But  how to add chart representation this coding? </P>
<DIV>Dinagar.V </DIV>Programmer
<DIV></DIV>
<DIV></DIV>Promen Technologies (P) Limited
<DIV></DIV></div><br clear=all><hr>Get your FREE download of MSN Explorer at <a href='http://go.msn.com/bql/hmtag_etl_EN.asp'>http: //explorer.msn.com</a>.<br></html>

2 Pages In Crtystal Report Also A Chart
Hi all,

      I just want to ask how could I put 2 pages in Crystal Report , and also the chart how could i put it and put the value I want in it ( the value will be from my MS Access data base)


please help me



Thanks in advance

Crystal Report 8- Cannot Display The Chart
Well, things were all going fine, until I upgraded my Crystal repports from version 7.0 to 8.0.
I am able to open a report (that does not have a chart) perfectly alright from VB. But if the report has a chart, it is giving an error 'run time error 20998'.

Why is this happening? Is there a dll I/m missing? Why does it open a report but not a chart? Please let me know. It's kinda urgent here.

thanks

Crystal Report With Line Chart
Hi,

I need to do a line chart report, which accept input like
1. Start date
2. Number of Months
3. Minimun length (of the 3 types pressure)
4. Maximum length (of the 3 types pressure)
5. 3 types of pressures

where the X-axis is the month(of Start date), Y-axis is the pressure(with the minimum and maximum pressure)

How could I set the variables in the chart ?

Thank you...

rerds,
Yen

Crystal Report Chart - Logarithm
Hi people!

I included a chart (bar type) in a report where the data fields are in completely different rage, for example;

field 1 = 0,820
filed 2 = 53.000,000

I´m trying to use the logarithm scale but I can´t show numbers smaller than 1. My intention is to have the logarithm data scale varying from 0,100 to 100.000 for instance.

Any help will very appreciated.

Ricardo

P.S. Please forgive for this is not VB programming!

Call Respective Report By Clicking On A Particular Bar Of A Chart
Dear all
I have a problem, I displayed chart based on types of services provided on x axis and number of user on y axis. Now my requirement is that I want when I click on a bar which e.g displaying the data of SMS services then a crystal report should be callled which is purly based on these values. Means all personnel using sms service, now if I click on second nod which displays ton service then it should call the report which is prepared for ton service and so on.Please guide me how can I handle this situation.
thanx
aman

Ms Chart + Recordset Filter + Active Report
Dear All
I have DataSet with the folowing Filds
SID Val 1 Date
raf001 10 MM/DD/YY
raf001 20 MM/DD/YY
raf001 30 MM/DD/YY
raf002 15 MM/DD/YY
raf002 10 MM/DD/YY


I Need To represent on a graph Date in X Axis and Val in Y Axis in Active Report for Each SID - Lets say that my recirdsetName is rsG1
and when i page the report for the next Sid i will have another Garph for Other SID

I guess in need to filter the recordset. how will the graph will change for each paging ???

Creating An Access Report Containing A Filtered Chart
I'm having trouble creating the report I want in Access. I'm sure it should be simple, but there's something I'm missing.

I have two tables, tblPlayer and tblHeight.

tblPlayer is indexed on PlayerID, tblHeight on HeightID. tblHeight also has columns for PlayerID, Height and Date.

I have a form that displays the data for an individual player and has a button that creates a report on that player. This works fine. Where I hit problems is when I try and add a graph showing that player's height changes to the report. The graph shows all the player's heights correctly, but it is repeated down the report for a number of times equal to the number of matching records in the table. The result is a nice looking single page report followed by the same graph 'x' times for the next several pages.

The details are:

The button's OnClick event calls:
DoCmd.OpenReport "PlayerReport", acPreview, "Player", "PlayerID = " & me![PlayerID]


The report's properties are as follows:
RecordSource = Player
Filter = (PlayerID = 1) (though this value changes with the latest button press)
FilterOn = Yes

The report contains a subreport, its properties are as follows:
SourceObject = Report.HeightReport
LinkChildFields = PlayerID
LinkMasterField = PlayerID

The HeightReports properties are as follows:
RecordSource = GetHeightsSimple
Filter = (PlayerID = 1)
FilterOn = No (If I set FilterOn = Yes, then it only works for the specific player described in Filter.)

GetHeightsSimple is a query: SELECT PlayerID, HeightDate, Height FROM Heights;


If you've got this far and can suggest a solution, you would be making my day.



JamieD.

- Please remove pants when emailing me -

Chart Invisible In Client Side (Crystal Report 8.5)
My program is delevoped using VB6.0, MKSQL 2K and Crystal Report 8.5.

I want to create a report with a line chart on it. Its normal when using in my PC (bcoz i've installed Crystal report 8.5). However, I try to install it to my client PC and run the program. The report pop-up, but the chart invisible.

I cannot install Crystal report to the client PC. What can I do???
I've tried to copy some dll to the client PC, but still not work!

Can anyone help me??


Stephanie

Change Chart Title In Report (Not A Form) At Runtime
I have a chart on a report, and I want to change the title of the chart at runtime using VB code. I know how to do this on a form, but the same technique does not work for a chart on a report.

Changing Line Color Of Crystal Report Chart Object
Hi,
The following problems encountered while plotting the line graph in crystal report.

Dev Environment: Visual Basic .NET 2003
Graph object used: Crystal report chart

Pb1) I want to change the line colors in plots. There are five to six variables in my graph. The object assigns random colors to the line. Many times two lines are drawn by same color. How do I change the line color in chart object?

Pb2) In the same chart I want to change the legend names. As per "ReleaseNotes.Doc" document this problem is fixed in crystal report Ver 9.0("ReleaseNotes.DocADAPT 13986"). I am using the "9.1.5000.0" version. (This is what it shows on all crystal report dlls). How do I change the legend names?

Thanks in advance for the information you will provide.

Regards,
Ani

Vb Bar Chart Text
when the text shown on a Vb bar chart exceeds a certain amount, depending on the bar chart length, the text is not readable on the screen or on the printout. this happens when the text is turned vertical to allow the text to fit.


is there any way to make it clearer?

would a better video card or monitor help?

my monitor is .24 dot pitch and brand new.

can someone give some advice on how to fix this?

Vb Bar Chart Text
when The VB bar chart text exceeds a certain length, the text is turned vertical. the text then becomes unreadable.

would a better video card help? or a better monitor?

my monitor is .24 dot pitch and new but i still am not able to read the text when vertical.

any ideas??

Add Text To Chart Object Using VB?
I have a chart sheet as a member of a workbook and the boss man wants me to add a model number to this chart. Is there any way I can add text to a sheet that is a chart object and not a normal sheet? Can I edit the chart title through VB? If I can make changes to that it would work.

Thanks.

Legend Text Of Chart
Hi All

How can i access the text of legend in chart?

Atif

Chart Text/Label
Hi,

I created a tool in Excel VBA that creates a chart given a dataset. The chart's X-axis are dates (whose range change depending on the dataset). I have several "milestones" that I need to denote on the chart with text boxes in the correct position corresponding to the correct date. (Therefore the position of these boxes would change depending on how the X-axis is setup which depends on the dataset.) Do you know how I could accomplish this?
Essentially I have a dynamic dataset which results in a dynamic X-axis which is what the text boxes depend on in figuring out their positions. (Oh, and the text boxes are all aligned vertically FYI.)

This is quite a conundrum...

Thanks in advance,

IronHell

Text Files To Chart Is It Possible?
Hello Everyone,

I'm very new to VB6 and i'm worried that some of the things i'm trying to do may not be possible.

My Scenario:

I have a text file and this file contains different things, so i want to search for specific words (say, 'red sport car'), the count the number of times the word appear in the file and then plot this in various charts.

I've been trying different things, but still no result, so i was wondering if you guys can put some light to this problem.

I really appreciate your help. In the main time, i'll keep on searching for similar problem (if any)!

Thanks in advance

Nick

How To Add Text On Excel Chart Through VB
Hi,

My VB6 application exports data and plot a chart on Excel sheets.

1. When I use chObject.Chart.ChartTitle.Caption = "abc" or chObject.Chart.ChartTitle.Text = "abc", both got error as "Unable to set the Text (or Caption) property of the ChartTitle Class. How come?

2. Besides title, I need to add some more remarkable information such as date, job number, etc. on the chart. How can I make more space for those remarks and how can I add those text or labels?

Thanks,

Make Text In Chart
Can I write text to a chart and save chart as GIF ?

Copyright © 2005-08 www.BigResource.com, All rights reserved