<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'How to display an OLAP Report with Crystal Report and VB.NET 2005 ?' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'How to display an OLAP Report with Crystal Report and VB.NET 2005 ?' posted on the 'VB.NET' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Wed, 19 Jun 2013 22:12:38 -0700</pubDate>
    <lastBuildDate>Wed, 19 Jun 2013 22:12:38 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>How to display an OLAP Report with Crystal Report and VB.NET 2005 ?</title>
      <link>http://www.programmersheaven.com/mb/VBNET/411480/411480/how-to-display-an-olap-report-with-crystal-report-and-vbnet-2005-/</link>
      <description>I used Ms SQL Server 2005, Ms Analysis Service 9.0.&lt;br /&gt;
And I want to make an OLAP report with Crystal report and displaying the report into my form in VB.NET 2005.&lt;br /&gt;
Please tell me how, if you have any suggestion,&lt;br /&gt;
coz I havent found any working articles yet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
thanks &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/411480/411480/how-to-display-an-olap-report-with-crystal-report-and-vbnet-2005-/</guid>
      <pubDate>Mon, 04 Jan 2010 08:34:34 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: How to display an OLAP Report with Crystal Report and VB.</title>
      <link>http://www.programmersheaven.com/mb/VBNET/411480/411527/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#411527</link>
      <description>Read and fully understand this:&lt;br /&gt;
&lt;a href="http://www.aspfree.com/c/a/Database/Crystal-Report-from-OLAP-Data-Introduction/"&gt;http://www.aspfree.com/c/a/Database/Crystal-Report-from-OLAP-Data-Introduction/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Then read and fully understand this:&lt;br /&gt;
&lt;a href="http://www.codeproject.com/KB/recipes/CrystalReports_in_VBNET.aspx"&gt;http://www.codeproject.com/KB/recipes/CrystalReports_in_VBNET.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Once you read and fully understand those, you should now be able to figure out how to create a Crystal report for your OLAP data and display it in a Vb.Net form.&lt;br /&gt;
&lt;br /&gt;
I can help you with code that isn't working, but I cannot teach you how to do this... Good luck!&lt;br /&gt;
Sean Campbell&lt;br /&gt;
firesickle.com</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/411480/411527/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#411527</guid>
      <pubDate>Tue, 05 Jan 2010 11:09:47 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: How to display an OLAP Report with Crystal Report and VB.</title>
      <link>http://www.programmersheaven.com/mb/VBNET/411480/411541/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#411541</link>
      <description>thanks for your reply.&lt;br /&gt;
I've managed to display data from the cube in crystal report.&lt;br /&gt;
&lt;br /&gt;
But I failed when displaying it to the vb.net&lt;br /&gt;
this is the code&lt;br /&gt;
&lt;pre class="sourcecode"&gt;Friend Function ViewReport(ByVal sReportName As String, _
        Optional ByVal sSelectionFormula As String = "", _
        Optional ByVal param As String = "") As Boolean

        'Declaring variablesables

        Dim intCounter As Integer
        Dim intCounter1 As Integer

        'Crystal Report's report document object

        Dim objReport As New _
            CrystalDecisions.CrystalReports.Engine.ReportDocum
ent

        'object of table Log on info of Crystal report

        Dim ConInfo As New CrystalDecisions.Shared.TableLogOnInfo

        'Parameter value object of crystal report 

        ' parameters used for adding the value to parameter.

        Dim paraValue As New CrystalDecisions.Shared.ParameterDiscreteValue

        'Current parameter value object(collection) of crystal report parameters.

        Dim currValue As CrystalDecisions.Shared.ParameterValues

        'Sub report object of crystal report.

        Dim mySubReportObject As _
            CrystalDecisions.CrystalReports.Engine.SubreportOb
ject

        'Sub report document of crystal report.

        Dim mySubRepDoc As New _
            CrystalDecisions.CrystalReports.Engine.ReportDocum
ent

        Dim strParValPair() As String
        Dim strVal() As String
        Dim index As Integer

        Try

            'Load the report

            objReport.Load(sReportName)

            'Check if there are parameters or not in report.

            intCounter = objReport.DataDefinition.ParameterFields.Count

            'As parameter fields collection also picks the selection 

            ' formula which is not the parameter

            ' so if total parameter count is 1 then we check whether 

            ' its a parameter or selection formula.


            If intCounter = 1 Then
                If InStr(objReport.DataDefinition.ParameterFields(0).
ParameterFieldName, ".", CompareMethod.Text) &amp;gt; 0 Then
                    intCounter = 0
                End If
            End If

            'If there are parameters in report and 

            'user has passed them then split the 

            'parameter string and Apply the values 

            'to their concurrent parameters.


            If intCounter &amp;gt; 0 And Trim(param) &amp;lt;&amp;gt; "" Then
                strParValPair = param.Split("&amp;amp;")

                For index = 0 To UBound(strParValPair)
                    If InStr(strParValPair(index), "=") &amp;gt; 0 Then
                        strVal = strParValPair(index).Split("=")
                        paraValue.Value = strVal(1)
                currValue = _ 
                    objReport.DataDefinition.ParameterFields(strVal(0)
).CurrentValues
                        currValue.Add(paraValue)
                        objReport.DataDefinition.ParameterFields(strVal(0)
).ApplyCurrentValues(currValue)
                    End If
                Next
            End If

            'Set the connection information to ConInfo 

            'object so that we can apply the 

            'connection information on each table in the report

            ConInfo.ConnectionInfo.UserID = ""
            ConInfo.ConnectionInfo.Password = ""
            ConInfo.ConnectionInfo.ServerName = "localhost"
            ConInfo.ConnectionInfo.DatabaseName = "IBU_OLAP"

            For intCounter = 0 To objReport.Database.Tables.Count - 1
                objReport.Database.Tables(intCounter).ApplyLogOnIn
fo(ConInfo)
            Next

            ' Loop through each section on the report then look 

            ' through each object in the section

            ' if the object is a subreport, then apply logon info 

            ' on each table of that sub report


            For index = 0 To objReport.ReportDefinition.Sections.Count - 1
                For intCounter = 0 To _
                    objReport.ReportDefinition.Sections(index).ReportO
bjects.Count - 1
                    With objReport.ReportDefinition.Sections(index)
                        If .ReportObjects(intCounter).Kind = _
                        CrystalDecisions.Shared.ReportObjectKind.Subreport
Object Then
                            mySubReportObject = CType(.ReportObjects(intCounter), _
                              CrystalDecisions.CrystalReports.Engine.SubreportOb
ject)
                            mySubRepDoc = _
                     mySubReportObject.OpenSubreport(mySubReportObject.
SubreportName)
                            For intCounter1 = 0 To mySubRepDoc.Database.Tables.Count - 1
                                mySubRepDoc.Database.Tables(intCounter1).ApplyLogO
nInfo(ConInfo)
                                mySubRepDoc.Database.Tables(intCounter1).ApplyLogO
nInfo(ConInfo)
                            Next
                        End If
                    End With
                Next
            Next
            'If there is a selection formula passed to this function then use that

            If sSelectionFormula.Length &amp;gt; 0 Then
                objReport.RecordSelectionFormula = sSelectionFormula
            End If
            'Re setting control 

            rptViewer.ReportSource = Nothing

            'Set the current report object to report.

            rptViewer.ReportSource = objReport

            'Show the report

            rptViewer.Show()
            Return True
        Catch ex As System.Exception
            MsgBox(ex.Message)
        End Try
    End Function
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
and this in my form load&lt;br /&gt;
&lt;pre class="sourcecode"&gt; 
Dim objForm As New Form1
objForm.ViewReport("C:\Report1.rpt", , "")
objForm.show()
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Im not sure about this&lt;br /&gt;
&lt;pre class="sourcecode"&gt;ConInfo.ConnectionInfo.DatabaseName = "IBU_OLAP"&lt;/pre&gt;&lt;br /&gt;
IBU_OLAP is my database name&lt;br /&gt;
I try replacing it with my Microsoft Analysis Service Project Name,&lt;br /&gt;
But neither worked&lt;br /&gt;
&lt;br /&gt;
then I traced it, and I got "Invalid report file path"&lt;br /&gt;
But Im sure 100% that the path is correct&lt;br /&gt;
&lt;br /&gt;
Do you have any idea about this?&lt;br /&gt;
&lt;br /&gt;
thanks&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/411480/411541/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#411541</guid>
      <pubDate>Tue, 05 Jan 2010 22:31:41 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: How to display an OLAP Report with Crystal Report and VB.</title>
      <link>http://www.programmersheaven.com/mb/VBNET/411480/411586/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#411586</link>
      <description>Did it throw an exception? (crash) If so, can you paste the Line of code it failed on, and the full text from the "Details &amp;gt;&amp;gt;" section of the Exception message? That will help me determine exactly what is happening.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/411480/411586/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#411586</guid>
      <pubDate>Wed, 06 Jan 2010 07:15:05 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: How to display an OLAP Report with Crystal Report and VB.</title>
      <link>http://www.programmersheaven.com/mb/VBNET/411480/411606/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#411606</link>
      <description>this is the exception message&lt;br /&gt;
objReport.DataDefinition.ParameterFields(0)&lt;br /&gt;
&lt;br /&gt;
"Invalid index. (Exception from HRESULT : 0x8002000B (DISP_E_BADINDEX))"&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
thanks for taking your time to see my problem...&lt;br /&gt;
&lt;br /&gt;
I want to ask one thing, Does Crystal Report Viewer in VS.net 2005 support the Multidimensional-Cube OLAP report?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/411480/411606/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#411606</guid>
      <pubDate>Wed, 06 Jan 2010 20:44:50 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: How to display an OLAP Report with Crystal Report and VB.</title>
      <link>http://www.programmersheaven.com/mb/VBNET/411480/411638/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#411638</link>
      <description>Is that the full text from the exception? I was expecting to see something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
Source File: c:\Documents and Settings\Marelizee\My Documents\Visual Studio 2005\WebSites\MSDNTutorials\Default.aspx.cs Line: 41

Stack Trace:

[COMException (0x8002000b): Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))]
CrystalDecisions.ReportAppServer.DataDefModel.Fiel dsClass.get_Item(Int32 Index) +0
CrystalDecisions.CrystalReports.Engine.ParameterFi eldDefinitions.get_Item(Int32 index) +77
CrystalDecisions.CrystalReports.Engine.ParameterFi eldDefinitions.get_Item(String fieldName) +98
CrystalDecisions.CrystalReports.Engine.ReportDocum ent.SetParameterValue(String name, Object val) +266
_Default.ConfigureCrystalReports() in c:\Documents and Settings\Marelizee\My Documents\Visual Studio 2005\WebSites\MSDNTutorials\Default.aspx.cs:41
_Default.Page_Init(Object sender, EventArgs e) in c:\Documents and Settings\Marelizee\My Documents\Visual Studio 2005\WebSites\MSDNTutorials\Default.aspx.cs:76
System.Web.Util.CalliHelper.EventArgFunctionCaller (IntPtr fp, Object o, Object t, EventArgs e) +31
System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(Object sender, EventArgs e) +68
System.Web.UI.Control.OnInit(EventArgs e) +89
System.Web.UI.Page.OnInit(EventArgs e) +28
System.Web.UI.Control.InitRecursive(Control namingContainer) +459
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1743&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
From what I see in your code, you have a try catch which is probably handling the error and you are copying what is displayed from Ex.Message.&lt;br /&gt;
&lt;br /&gt;
Comment out your Try Catch Block, and allow the program to crash with an exception. Click the "Details&amp;gt;&amp;gt;" button and copy the text from in there.&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
From the information you provided, it seems that objReport.DataDefinition.ParameterFields(0) does not exist, which is something you refer to in a few different lines of code. We need to find out exactly which line of code you are crashing on (it should be apparant once you remove the try catch block).&lt;br /&gt;
&lt;br /&gt;
------&lt;br /&gt;
I am sorry, I cannot answer your question. I have no experience with Crystal Reports whatsoever, much less trying to connect it to OLAP data. I have a gut feeling that you are referring to SAP BW Cubes? I would think that a multidimensional cube would act like a single table of data (or more correctly a Sql DB View), but that is pure speculation, I really do not know the answer.&lt;br /&gt;
&lt;br /&gt;
-Sean Campbell&lt;br /&gt;
firesickle.com&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/411480/411638/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#411638</guid>
      <pubDate>Thu, 07 Jan 2010 06:39:27 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: How to display an OLAP Report with Crystal Report and VB.</title>
      <link>http://www.programmersheaven.com/mb/VBNET/411480/411640/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#411640</link>
      <description>this is what happen when I remove the try and catch block&lt;br /&gt;
I took the whole screen shot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://img254.imagevenue.com/img.php?image=74819_1_122_224lo.png"&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://img157.imagevenue.com/loc1063/th_74822_2_122_1063lo.png"&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/411480/411640/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#411640</guid>
      <pubDate>Thu, 07 Jan 2010 07:38:02 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: How to display an OLAP Report with Crystal Report and VB.</title>
      <link>http://www.programmersheaven.com/mb/VBNET/411480/411642/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#411642</link>
      <description>I am not quite following what you just said?</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/411480/411642/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#411642</guid>
      <pubDate>Thu, 07 Jan 2010 08:07:49 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: How to display an OLAP Report with Crystal Report and VB.</title>
      <link>http://www.programmersheaven.com/mb/VBNET/411480/411643/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#411643</link>
      <description>this is the first image&lt;br /&gt;
&lt;br&gt;&lt;br&gt;&lt;strong&gt;Attachment:&lt;/strong&gt; &lt;a href="http://www.programmersheaven.com/mb/DownloadAttachment.aspx?AttachmentID=1465"&gt;1.png&lt;/a&gt; (25815 bytes | downloaded 106 times)</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/411480/411643/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#411643</guid>
      <pubDate>Thu, 07 Jan 2010 08:13:22 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: How to display an OLAP Report with Crystal Report and VB.</title>
      <link>http://www.programmersheaven.com/mb/VBNET/411480/411644/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#411644</link>
      <description>and this is the second&lt;br /&gt;
&lt;br&gt;&lt;br&gt;&lt;strong&gt;Attachment:&lt;/strong&gt; &lt;a href="http://www.programmersheaven.com/mb/DownloadAttachment.aspx?AttachmentID=1466"&gt;2.png&lt;/a&gt; (18376 bytes | downloaded 92 times)</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/411480/411644/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#411644</guid>
      <pubDate>Thu, 07 Jan 2010 08:14:46 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: How to display an OLAP Report with Crystal Report and VB.</title>
      <link>http://www.programmersheaven.com/mb/VBNET/411480/432183/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#432183</link>
      <description>Hi,&lt;br /&gt;
I do have the same requirement to render the Crystal Olap report in my asp.net web form crystal report viewer.&lt;br /&gt;
SAP people are saying it is not pooible to integrate with VS 2008 with CR 2008. Will you be able to guide me.&lt;br /&gt;
Any of you input is highly appreciated&lt;br /&gt;
Thank you,&lt;br /&gt;
Usha&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/411480/432183/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#432183</guid>
      <pubDate>Wed, 29 May 2013 12:33:24 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Re: How to display an OLAP Report with Crystal Report and VB.</title>
      <link>http://www.programmersheaven.com/mb/VBNET/411480/432184/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#432184</link>
      <description>Hi,&lt;br /&gt;
I do have the same requirement to render the Crystal Olap report in my asp.net web form crystal report viewer.&lt;br /&gt;
SAP people are saying it is not pooible to integrate with VS 2008 with CR 2008. Will you be able to guide me.&lt;br /&gt;
Any of you input is highly appreciated&lt;br /&gt;
Thank you,&lt;br /&gt;
Usha&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/411480/432184/re-how-to-display-an-olap-report-with-crystal-report-and-vb/#432184</guid>
      <pubDate>Wed, 29 May 2013 15:50:01 -0700</pubDate>
      <category>VB.NET</category>
    </item>
  </channel>
</rss>