Field value not passing to a parameter in drill through sub report

Hi,

I have two reports 'Product Details' and 'Sales by Product'

When i click on 'Product ID' field in 'Product Details' report, It has to drill through to 'Sales by Product' which has a parameter 'Product ID' in it. 

I have written the following javascript

="javascript:void(window.open('http://servername/Rportserver/Pages/Report.aspx?ItemPath=%2fTestDrillThru%2fSales+By+Product&rs:Command=Render&ChildProductID="& Fields!ProductID.Value &"','_blank',',resizable=1,width=1600,height=800,left=50'))"

When i drill through, field value is not passing to 'child product id' in sales by product. I have to give the value again in child report.

Please let me know what am i missing here?

September 6th, 2015 10:22am

Hi Gangarocks, 

According to your description, you want to open a new window which can display the required report based on the passed parameter value by clicking on "Product ID" field, right?

In Reporting Services, you can pass report parameters by including them within a report URL. And only Report Server URL can be visited with report parameters. In your scenario, Report Server will call "ReportViewer.aspx" to render the report, not the "Report.aspx". So for your requirement, you can refer to the following expression: 

="javascript:void(window.open('http://servername/Rportserver/Pages/ReportViewer.aspx?ItemPath=%2fTestDrillThru%2fSales+By+Product&rs:Command=Render&ChildProductID="& Fields!ProductID.Value &"','_blank',',resizable=1,width=1600,height=800,left=50'))"

Reference: 

Pass a report parameter within a URL

If you have any other question, please feel free to ask. 

Regards,
Shrek Li

  • Proposed as answer by Milan Das 15 hours 18 minutes ago
Free Windows Admin Tool Kit Click here and download it now
September 6th, 2015 11:41am

Hi Gangarocks, 

According to your description, you want to open a new window which can display the required report based on the passed parameter value by clicking on "Product ID" field, right?

In Reporting Services, you can pass report parameters by including them within a report URL. And only Report Server URL can be visited with report parameters. In your scenario, Report Server will call "ReportViewer.aspx" to render the report, not the "Report.aspx". So for your requirement, you can refer to the following expression: 

="javascript:void(window.open('http://servername/Rportserver/Pages/ReportViewer.aspx?ItemPath=%2fTestDrillThru%2fSales+By+Product&rs:Command=Render&ChildProductID="& Fields!ProductID.Value &"','_blank',',resizable=1,width=1600,height=800,left=50'))"

Reference: 

Pass a report parameter within a URL

If you have any other question, please feel free to ask. 

Regards,
Shrek Li

  • Proposed as answer by Milan Das Sunday, September 06, 2015 3:46 PM
September 6th, 2015 3:40pm

Hi Gangarocks, 

According to your description, you want to open a new window which can display the required report based on the passed parameter value by clicking on "Product ID" field, right?

In Reporting Services, you can pass report parameters by including them within a report URL. And only Report Server URL can be visited with report parameters. In your scenario, Report Server will call "ReportViewer.aspx" to render the report, not the "Report.aspx". So for your requirement, you can refer to the following expression: 

="javascript:void(window.open('http://servername/Rportserver/Pages/ReportViewer.aspx?ItemPath=%2fTestDrillThru%2fSales+By+Product&rs:Command=Render&ChildProductID="& Fields!ProductID.Value &"','_blank',',resizable=1,width=1600,height=800,left=50'))"

Reference: 

Pass a report parameter within a URL

If you have any other question, please feel free to ask. 

Regards,
Shrek Li

  • Proposed as answer by Milan Das Sunday, September 06, 2015 3:46 PM
  • Marked as answer by gangarocks Thursday, September 10, 2015 5:21 AM
Free Windows Admin Tool Kit Click here and download it now
September 6th, 2015 3:40pm

Sorry, I could nt get you.

Should i replace "Report.aspx" with "ReportViewer.aspx" . what is the difference ? can you please explain.

September 9th, 2015 2:04am

Hi Gangarocks,

If we open a report via Report Server, Reporting Services will use ReportViewer.aspx page which under the path "C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\Pages" to render the report. The URL is like below:

http://servername/ReportServer/Pages/ReportViewer.aspx?%2fReport2&rs:Command=Render

If we open a report via Report Manager, RS will use Report.aspx page to render the report. The URL is like below:

http://servername/Reports/Pages/Report.aspx?ItemPath=%2fReport2

Regards,
Shrek Li

  • Proposed as answer by Milan Das 19 minutes ago
Free Windows Admin Tool Kit Click here and download it now
September 9th, 2015 2:26am

Hi Gangarocks,

If we open a report via Report Server, Reporting Services will use ReportViewer.aspx page which under the path "C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\Pages" to render the report. The URL is like below:

http://servername/ReportServer/Pages/ReportViewer.aspx?%2fReport2&rs:Command=Render

If we open a report via Report Manager, RS will use Report.aspx page to render the report. The URL is like below:

http://servername/Reports/Pages/Report.aspx?ItemPath=%2fReport2

Regards,
Shrek Li

  • Proposed as answer by Milan Das Wednesday, September 09, 2015 6:42 AM
  • Marked as answer by gangarocks Thursday, September 10, 2015 5:21 AM
September 9th, 2015 6:22am

Hi Li,

Thanks for your help. I could now drill through a report using a parameter value.

But i have one more issue. 

My parameter value is like 'FR/T67Y'8' . I am unable to click on this field to go to sub report. This is mainly because of 'single qoute'.

Can you please suggest me to how to keep single qoutes (or any special character)?

Free Windows Admin Tool Kit Click here and download it now
September 10th, 2015 8:01pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics