ActiveReports Developers 7 Now Available in Beta!! (click for details)

DynamiCube Support

Started by Rashies at 04-21-2010 4:43 AM. Topic has 6 replies.

Print Search Rate
Sort Posts:    
   04-21-2010, 4:43 AM
Rashies is not online. Last active: 4/21/2010 5:53:19 PM Rashies

Not Ranked
Joined on 04-21-2010
Posts 4
I can't show data more than 8 field in DCube
Hi, I'm newbie but I will try to develop this program.
When I try to add field more than 8 field. DCube will not show data in field 9th. Why...

Code :
On Error GoTo ErrorHandle
DCube1.Fields.DeleteAll
DCube1.DCConnectType = DCCT_ODBC
DCube1.DCConnect = "DSN=smart_report;UID=itvuser;PWD=savingitv"
DCube1.DCDatabaseName = "smart_report"
DCube1.DCRecordSource = "exec Rpt_TieIn_Income " & CInt(cboMonth.ListIndex) + 1 & "," & CInt(cboYear.Text) - 543 & "," & "3"

DCube1.QueryByPass = True

Set f = DCube1.Fields.Add("QNO", "QNO", DCRow)
Set f = DCube1.Fields.Add("LineItem", "Line Item", DCRow)
Set f = DCube1.Fields.Add("ProgramName", "Program Name", DCColumn)
Set f = DCube1.Fields.Add("OnAirDate", "Onair Date", DCColumn)
Set f = DCube1.Fields.Add("OnAirTime", "Onair Time", DCPage)
Set f = DCube1.Fields.Add("TotalMinute", "Total Minute", DCPage)
Set f = DCube1.Fields.Add("PricePerMin", "Price/Min", DCPage)
Set f = DCube1.Fields.Add("IncType", "Inc Type", DCPage)
Set f = DCube1.Fields.Add("TotalPrice", "Total", DCData)
f.NumberFormat = "###,###,###,###,###.00"
Set f = DCube1.Fields.Add("Discount", "Discount%", DCData)
f.NumberFormat = "###,###,###,###,###.00%"
Set f = DCube1.Fields.Add("NetPrice", "Net Price", DCData)
f.NumberFormat = "###,###,###,###,###.00"

DCube1.TotalsBackColor = RGB(229, 255, 229)
DCube1.RefreshData
DCube1.AutoDataRefresh = True

Exit Sub

Result from SQL :
<img src="http://i1006.photobucket.com/albums/af182/l2ashiesZa/Dcube/result.jpg" border="0" />

Show on dynamicube:
<img src="http://i1006.photobucket.com/albums/af182/l2ashiesZa/Dcube/Show.jpg" border="0" />

Thank a lot!
   Report 
   04-21-2010, 10:54 PM
Andrey - DD is not online. Last active: 8/25/2011 5:42:49 PM Andrey - DD

Top 25 Posts
Joined on 08-01-2007
Russia, Novosibirsk
Posts 671

DDStaff
Re: I can't show data more than 8 field in DCube

Rashies,

Please ensure that you are using the latest DynamiCube version available:
http://www.datadynamics.com/forums/40/ShowForum.aspx

From your code I've recognized that you are using DCube1.QueryByPass = True property. (You are using stored procedure). This property sets whether DynamiCube uses the RecordSource SQL statement as is (True) or if it generates an internal GROUPBY SQL statement to summarize the data (False).

When you are setting this property to True you take on the responsibility of ensuring that the data is retrieved in the correct order (that is Row, Column, Page, Data) and you should add fields to DynamiCube in this order.

You would also need to ensure that your query is returning the correctly aggregated data (DynamiCube doesn't summarize the data in this case).

I would suggest that you add fields to DynamiCube in the order they are presented in database, i.e. move
Set f = DCube1.Fields.Add("IncType", "Inc Type", DCPage) after
Set f = DCube1.Fields.Add("NetPrice", "Net Price", DCData)

Also ensure that you are using correct NumberFormat:
http://www.datadynamics.com/Help/DynamiCube3/FormattingNumbers.html

If this doesn't help can you please send me a sample to reproduce the issue?

Thank you,
Andrey T.

   Report 
   04-22-2010, 1:48 AM
Rashies is not online. Last active: 4/21/2010 5:53:19 PM Rashies

Not Ranked
Joined on 04-21-2010
Posts 4
Re: I can't show data more than 8 field in DCube
Thanks, Andrey

your reply can't help me.
If I remove 1 or more field ( DCPage ). The data will show in DCData. Because DCData field is 7th field but in 8th field data is not show. And I remove formatNumber.

My sql statement :
SELECT [QNO]
,[LineItem]
,[ProgramName]
,[OnAirDate]
,[OnAirTime]
,[TotalMinute]
,[PricePerMin]
,[IncType]
,[TotalPrice]
,[Discount]
,[NetPrice]
FROM [airtime].[dbo].[QuotationDetail]

it not generates an internal GROUPBY
Here is result in DCube:
<img src="http://i1006.photobucket.com/albums/af182/l2ashiesZa/Dcube/result2.jpg" border="0" />

if I remove field IncType
Here is result in DCube:
<img src="http://i1006.photobucket.com/albums/af182/l2ashiesZa/Dcube/result3.jpg" border="0" />

Why, I remove field then datafield show data??
   Report 
   04-22-2010, 10:20 PM
Andrey - DD is not online. Last active: 8/25/2011 5:42:49 PM Andrey - DD

Top 25 Posts
Joined on 08-01-2007
Russia, Novosibirsk
Posts 671

DDStaff
Re: I can't show data more than 8 field in DCube

Attachment: dcFields.zip

Rashies,

I've recognized that your cube view is wrong based on cube fields configuration you've provided. Can you please tell me what exact DynamiCube version you are using?
I've created a simple application with the same fields configuration (used Unbound mode because I don't have a database) and it shows correct results. (note that Totals are turned off). Please see the attached screenshot and sample. This sample uses the latest DynamiCube3 build 3.3.0.1216.
Can you please send me sample so I can reproduce the issue? You can attach it to your post or send it to DynamiCube.support@grapecity.us.com.

Thank you,
Andrey T.


   Report 
   04-22-2010, 10:22 PM
Andrey - DD is not online. Last active: 8/25/2011 5:42:49 PM Andrey - DD

Top 25 Posts
Joined on 08-01-2007
Russia, Novosibirsk
Posts 671

DDStaff
Re: I can't show data more than 8 field in DCube

Attachment: dcFields.JPG
Screenshot.

   Report 
   04-23-2010, 2:17 AM
Rashies is not online. Last active: 4/21/2010 5:53:19 PM Rashies

Not Ranked
Joined on 04-21-2010
Posts 4
Re: I can't show data more than 8 field in DCube
Thanks, Andrey

I used
DCube1.DCConnectType = DCCT_UNBOUND
and I coding on Event DCube1_FetchData()
Here is code:
Private Sub DCube1_FetchData()
Set Cmd = New ADODB.Command
Set Rs = New ADODB.Recordset
With Cmd
.ActiveConnection = cnn_smart_report
.CommandText = "Rpt_Tiein_Income"
.CommandType = adCmdStoredProc
.CommandTimeout = 60
.Parameters.Append .CreateParameter("@month", adInteger, adParamInput, , 3)
.Parameters.Append .CreateParameter("@year", adInteger, adParamInput, , 2010)
.Parameters.Append .CreateParameter("@type", adInteger, adParamInput, , 3)
Set Rs = .Execute
End With
If Not Rs.EOF Then
While Not Rs.EOF
DCube1.AddRowEx Array(Rs("Oth_Ord_Item_Name").value, Rs("Oth_type").value, Rs("Cmp_name").value, Rs("firstname").value, Rs("Oth_Code").value, Rs("OnAirDate").value, Rs("price").value, Rs("discount1").value, Rs("discount2").value)
Rs.MoveNext
Wend
End If
End Sub

it's ok and show all data in dynamicube.

Thanks again, Andrey
   Report 
   04-23-2010, 2:22 AM
Rashies is not online. Last active: 4/21/2010 5:53:19 PM Rashies

Not Ranked
Joined on 04-21-2010
Posts 4
Re: I can't show data more than 8 field in DCube
I using DynamiCube Version 2.5. Because this project is so old.
Thanks
   Report 
GrapeCity » Product Support » DynamiCube Supp... » I can't show data more than 8 field in DCube

Privacy Policy | Copyright © 1997-2012 — GrapeCity, inc.
All trademarks mentioned are the property of their respective owners.