Showing posts with label displaying. Show all posts
Showing posts with label displaying. Show all posts

Sunday, February 19, 2012

Drillthrough not working!

Hello everyone!

I am using VS 2005, with SQL 2000. My reports are displaying fine, but i am trying to have a drillthrough report. So basically display one report and once i click on a certain element within the report, it should take me to that specific report, i.e that parameter is passed.

I have rooted through the internet to find a couple of examples which do the same, but these examples use XML as the datasource but I am using a dataset (.xsd) file and cannot get my head around how to interact with this and reload the dataset onto the ReportViewer based on the DrillThrough event the user selects.

The code using the xml file is below, can someone help me to convert this to get it to read data from the xsd file. Both my dataTableAdapters are in the same Dataset. xsd file. I am fairly new at .NET but even i know that this has to be possible.

Cheers,

Munira

private DataTable LoadEmployeesData()

{

DataSet dataSet = new DataSet();

dataSet.ReadXml(@."c:\My Reports\employees.xml");

return dataSet.Tables[0];

}

private DataTable LoadDepartmentsData()

{

//This is the bit that needs to change inorder to read from an xsd file

DataSet dataSet = new DataSet();

dataSet.ReadXml(@."c:\My Reports\departments.xml");

return dataSet.Tables[0];

}

void DemoDrillthroughEventHandler(object sender, DrillthroughEventArgs e)

{

LocalReport localReport = (LocalReport)e.Report;

localReport.DataSources.Add(new ReportDataSource("Employees",

LoadEmployeesData()));

}

protected void Page_Load(object sender, EventArgs e)

{

if (!IsPostBack)

{

// On initial page load

ReportViewer1.LocalReport.ReportPath = @."c:\My Reports\Departments.rdlc";

// Supply a DataTable corresponding to each report data source.

ReportViewer1.LocalReport.DataSources.Add(

new ReportDataSource("Departments", LoadDepartmentsData()));

}

// Add the handler for drillthrough.

ReportViewer1.Drillthrough += new DrillthroughEventHandler(DemoDrillthroughEventHandler);

}

Hello all!

I managed to solve my problem after quite a bit of frustration...so I thought that this little check list might be helpful to someone else facing a similar problem.

Ok things to do inorder to make drill down reports work.

1. In the second report (the drillthrough report) add the parameter to the report, in the rdlc page.

2. In the main report, go to the element that you want to click on, the textbox, and make the navigation properties to jump to the second report, also remember to set the parameter in that dialogue box!

3. Add the drillthrougheventhandler in your aspx.cs page, this is the point where you want to change your data source.

4. Make sure you set the reportviewer ondrillthoughevent, in the html definition of the reportviewer, to go to the function writen in 3.

Regards,

Munira

Friday, February 17, 2012

Drillthrough action

Hi,

Is there any way in AS2005, I can specify a cube action which will bring up an HTML page displaying the Drillthrough MDX for the cell that I just initiated the action on?

Also, will this MDX work across all cube partitions (no need for FIRSTROWSET clause)?

Thanks,

JGP

Drillthrough actions return a DRILLTHROUGH statement to client application (e.g. cube browser) which in turn executes the statement and displays the results. The results will contain data for all partitions (no need for FIRSTROWSET clause). See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/sql2k5_anservdrill.asp for more info.

HTML actions are unsafe and BI Dev Studio does not let you create them. If you do want to expose the DRILLTHROUGH statement to the user, you have to plug in some code (depends on the client app) that retrieves the actions schema rowset, extracts the statement and displays it.

|||

Any idea how I would go about retrieving the action schema rowset? Any samples would be greatly helpful.

I'm trying to get this working from the ProClarity clients (Standard and Professional).

Thanks,

JGP

Drillthrough action

Hi,

Is there any way in AS2005, I can specify a cube action which will bring up an HTML page displaying the Drillthrough MDX for the cell that I just initiated the action on?

Also, will this MDX work across all cube partitions (no need for FIRSTROWSET clause)?

Thanks,

JGP

Drillthrough actions return a DRILLTHROUGH statement to client application (e.g. cube browser) which in turn executes the statement and displays the results. The results will contain data for all partitions (no need for FIRSTROWSET clause). See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/sql2k5_anservdrill.asp for more info.

HTML actions are unsafe and BI Dev Studio does not let you create them. If you do want to expose the DRILLTHROUGH statement to the user, you have to plug in some code (depends on the client app) that retrieves the actions schema rowset, extracts the statement and displays it.

|||

Any idea how I would go about retrieving the action schema rowset? Any samples would be greatly helpful.

I'm trying to get this working from the ProClarity clients (Standard and Professional).

Thanks,

JGP