1 Attachment(s)
VBNET 2005 and Crystal Reports
Hello, I have the Crystal Reports that was installed with my trial of VS2005 .NET. I also have an access backend with a table containing the following columns:
ID
Year
Month
CustomerName
Amount
What I want to do, is make a chart in CR that has the months on the bottom:
Jan...Feb...March...April.................Jan...Feb...March...April....Jan...Feb...March...April
Along the left side of the graph, will be the amount increments. And in the chart itself (the data being graphed) will be the amounts for each customername. Attached is a screenshot of a graph of what I need made in excel.
How can I do this in CR?
1 Attachment(s)
Re: VBNET 2005 and Crystal Reports
Alright, I was able to mimic the above chart...but I noticed that the graphed lines are VERY thin and light when I print them. Also, the bottom axis jumbles everything together as shown in the attached image. How do I fix these?
Re: VBNET 2005 and Crystal Reports
Does anyone know of any good tutorials with using Crystal Reports and VB.NET 2005? The biggest thing im looking for is the ability to set recordsets (and SQL statements) via code...instead of binding everything. Below is an example of how it was done in VB6.0's Data Reports..
VB Code:
Option Explicit
Public X As String
Private Sub DataReport_Initialize()
'Dimming of variables used.
Dim strSQL As String 'SQL String.
Dim oConn As New ADODB.Connection 'New ADODB Connection.
Dim oRS As New ADODB.Recordset 'New ADODB Recordset
Dim BarCode As String
'Connection string
oConn.CursorLocation = adUseClient
oConn.ConnectionString = "Provider=MSDASQL.1;Password=tmm;Persist Security Info=True;User ID=sysprogress;Password=PASSWORD;Data Source=tmm_db10" 'Connection String.
oConn.Open
'Below checks to see which criteria was checked, then runs the SQL query
'Based on the criteria..
'Changes the title and caption of the report to show the date range.
strSQL = "SELECT DISTINCT pub.fin.""Station"", pub.blq.""Item-code"", pub.blq.""Item-desc-2"", pub.iix.""Item-desc-1"" "
strSQL = strSQL & "FROM pub.fin, pub.iix, pub.bmq, pub.blq, pub.ssd "
strSQL = strSQL & "WHERE pub.fin.""Station"" <> 'TUMBLE' AND "
strSQL = strSQL & "pub.fin.""Station"" <> 'ZZZMPI' AND "
strSQL = strSQL & "pub.fin.""Station"" < 'I' AND "
strSQL = strSQL & "pub.fin.""Job"" = pub.ssd.""Job"" AND "
strSQL = strSQL & "pub.fin.""Item-code-mfgd"" = pub.bmq.""Item-code"" AND "
strSQL = strSQL & "pub.bmq.""Branch"" = 'MPI' AND "
strSQL = strSQL & "pub.bmq.""Quote-type"" = 2 AND "
strSQL = strSQL & "pub.bmq.""Quote-set"" = 1 AND "
strSQL = strSQL & "pub.blq.""Master-item-code"" = pub.bmq.""Item-code"" AND "
strSQL = strSQL & "pub.blq.""Master-branch"" = pub.bmq.""Branch"" AND "
strSQL = strSQL & "pub.blq.""Master-quote-type"" = pub.bmq.""Quote-type"" AND "
strSQL = strSQL & "pub.blq.""Master-quote-set"" = pub.bmq.""Quote-set"" AND "
strSQL = strSQL & "pub.blq.""Element"" = 'FORM' AND "
strSQL = strSQL & "pub.iix.""Item-code"" = pub.blq.""Item-code"" "
strSQL = strSQL & "ORDER BY pub.fin.""Station"", pub.fin.""schedule-order"" "
'Connecting...
Debug.Print strSQL
oRS.Open strSQL, oConn, adOpenForwardOnly
'Connection made.
Set rptDataReport.DataSource = oRS
End Sub