Showing posts with label viewer. Show all posts
Showing posts with label viewer. Show all posts

Friday, March 23, 2012

proclarity question

Hi,

I have a question regarding Proclarity viewer and whether it can assists me.

I have a UDM as follows.

A fact table containing a sale for each salesman. There can be more that one row per salesman

This Fact is connected to a dimension dim_salesman that hold details about each salesman and other more dimensions.

Another fact containing a number of vacations each salesman took. There is more that one row per salesman.

This fact also connected to the same dim_salesman and and other more dimensions.

I want to inquire for example - how many vacations and sales each saleman had, sliced by the dim_saleman.

If I uses a pivot table excel to view a report that contains data from both fact tables I get wrong data.

Is the proclarity viewer able to browse 2 different fact tables and join them to a single report?

Thank for you help.

Hello. Both ProClarity Professional 6.2 and Excel 2007 can create reports from data in two separate fact tables.

This is not as much a client question but how you have related the two measure groups(fact tables) in the cube editors dimension usages tab. In SSAS2005 one cube can have several fact tables(measure group).

HTH

Thomas Ivarsson

Monday, March 12, 2012

Processing a new report before printing

I am running SSRS 2005, rendering reports locally using a report viewer. Rather than direct the viewer to an .rdlc file, I use an XMLDocument. A few of my reports have a large image in the background that needs to be invisible when the report prints. This was straightforward - I just use a report parameter and set the visible state of the image to the value of the parameter. The hard part is getting the report to print without an error.

Initially, I render the report with the following code:

Private Sub ShowReport()

Try

With Me.ReportViewer1

.Reset()

.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local

.LocalReport.LoadReportDefinition(New System.IO.StringReader(_Doc.OuterXml))

.LocalReport.DataSources.Add(_Item1)

.LocalReport.DataSources.Add(_Item2)

.LocalReport.SetParameters(_Param)

.RefreshReport()

End With

Catch ex As Exception

MsgBox(ex.ToString)

End Try

End Sub

This code works fine. I have hidden the print button on the report viewer, and to print, the user must press my button which runs the following code.

Private Sub PrintReport()

Try

_Param(0) = New Microsoft.Reporting.WinForms.ReportParameter("ImageVisible", "False")

ShowReport()

ReportViewer1.PrintDialog()

Catch ex As Exception

MsgBox(ex.ToString)

End Try

End Sub

Resetting the parameter and re-displaying the report works fine on its own. The PrintDialog method works fine on its own. When combined in the same Sub like this, I get the following error:

"Operation is not valid due to the current state of the object".

Does anyone know how I could get it to print without an error? I would be very grateful for any help.

Solved it. The problem is caused because the report has not finished rendering when the PrintDialog method is called. I got around it using the RenderingComplete event of the report viewer.