.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Passing Parameters dynamicall to a Pie Char

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :Sql Server
Hi All, I am just done with an interview on SSRS Developer. I was asked how would you do design a report if there are 35 departments? Each time the report should run for each time. He wanted all the departments in one single report. I am sure there is a way we can do this. But I am not sure how? Any help would be appreciated. Thanks Tinku  

View Complete Post

More Related Resource Links

Passing Parameters through sub reports



I am trying to use a parameter field where there is a subreport in my main report but i keep getting the error "subreport cannot be shown" when running the report. Any ideas please.

p.s - I have just set the parameters the same in the subreport as the main report.



Passing report parameters by report viewer


I have 4 parameters in which 3 are passed in report and 1 is passed through report viewer. I have made a parameter in SSRS called CandidateId to which I want to pass the value. The code for report viewer is:

 intReportID = Convert.ToInt32(Request.QueryString["ReportID"
 CandId = Convert.ToString(Session["CandidateId"
lblReportName.Text = dtReport.Rows[0]["ReportName"
SSRSReportViewer.ShowCredentialPrompts =false

 SSRSReportViewer.ServerReport.ReportServerCredentials = new
SSRSReportViewer.ProcessingMode = Microsoft.Reporting.WebForms.


 SSRSReportViewer.ServerReport.ReportServerUrl = new

SSRSReportViewer.ServerReport.ReportPath = dtReport.Rows[0]


 Microsoft.Reporting.WebForms.ReportParameter[] theparams = new

theparams[0] = new
, CandId);
theparams[0].Visible = false

Preview Crystal Report from ASP.net without passing parameters


Hi Everyone,

Sorry couldn't think of any better Subject..

I am developing a User Reports Module using C#.Net using Visual Studio 2005. Basic purpose of this module is to allow user to be able to run their own Crystal Reports. i.e. if Users have their own Crystal Reports specific to their needs then we allow them to save them and view them from our user reports module.

So when user saves any report we save it on server and save the Physical path of that report in database. Now when user tries to view the report I get the location from database and load it. Which works ok. The issue now is those reports which have got parameters. 

I am not saving any information about parameters in their reports. So I do not have any information about Report Parameters.

This same application exists in VB6. What that VB application does is opens the Crystal Report and then Crystal report asks for needed parameters exactly as it will do if we try to open a crystal report using crystal report and preview it from there it asks for parameter values. 

How can I do that in C#.Net.

VB has got code like this

Global Appl As New CRAXDRT.Application

Help Passing Multiple Parameters Via a URL in SSRS 2008

Hello Everyone, I'm totally and completely confused as to how to pass multiple paramters through a URL.  Book Online is absolutely no help because they do not offer any examples of passing multiple paramters within a URL.  Instead, I get confused over RENDER and COMMAND and what should be repeated where with each paramter and on and on and on. Here's my URL: javascript:void(window.open('http://sereporting01.wdig.com/ReportServer?%2fDOL%2fTEST%2fDisney+Sell-Through&rs:Command=Render&SiteName=Disney,InsertionType=300 x 250,Context=ROS','_blank','resizable=yes,toolbar=0,menubar=0')) What happens is that JavaScript opens a new window but I get a "Reporting Services Error".  I'm assuming it's because my URL parameters are not correct.  Can someone please just give me the correct syntax so that I can get on with my work? I'm editing this post to add - I'm also confused as to how paramters are supposed to be passed through to a report when default paramters are set up in the report which i'm trying to open with the URL.  Should I remove the default paramaters from the report or...what? Again, BOL offers no help on this issue and it just seems to generate more questions.  Thanks!!  

Passing Multiple Parameters in NavigateURL Property of Hyperlink

In ASP.NET 3.5, is this the only way to pass Multiple Parameters in NavigateURL Property of Hyperlink ? What about using the HyperlinkField?<asp:TemplateField HeaderText="Form Name">    <ItemTemplate>        <asp:HyperLink ID="HyperLink2" runat="server"         NavigateUrl='<%# "~/Application/" + Eval("FormType") + ".aspx?FormID=" + Eval("FormID") %>'         Text='<%# Eval("FormName") %>'>                </asp:HyperLink>     </ItemTemplate></asp:TemplateField>

Passing parameters from ASP.Net web page to SSRS report

I have a web page that displays some data.  The user first selects a date range on the web page and then can edit some data.  When they click a submit button, I want to run a report.  But I would like to pass the start date and end date values that the user already entered on the web page to the report.  Is this possible?  Can I use the value of a session variable in the report? Bob

Problems passing parameters to SSRS report from ASP.Net web page

I have a web page that displays some data.   When they click a submit button, I want to run a report.  But I would like to pass the start year/month and end year/month values that the user already entered on the web page to the report.  Here is what my url looks like when the report is displayed: http://xyzserver/Reports/Pages/Report.aspx?ItemPath=%2fReports%2fDevicesAllNew&rs:Command=Render&StartYYMM=201007&EndYYMM=201008 But my report displays the 2 textboxes for my StartYYMM and EndYYMM parameters as empty.  What am I doing wrong?  I did a google search and I saw something about using ReportServer instead of ReportManager.  I notice at the top of the browser when I run my report, it reads "Report Manager - Windows Internet Explorer".  Is this correct? Bob     Bob

Passing Parameters to Web Service Method using XML DataSource

I would like to know how to pass parameter values to a web service that I am using as a data source.  I am using the Data Source Type XML.  I have been able to retrieve data back from the web service method that does not require parameters.  But I need to be able to use a web service that requires parameter values.  How do you use the XML data source type with parameters?  I have use information from the article  http://www.codeproject.com/KB/reporting-services/SSRS2005XML.aspx. thanks, Lloyd

Problem : Need to make COM InterOp at runtime using reflections Passing Pointers as parameters?

Hello, I need to make COM IntetrOp at runtime using reflections. My native COM Object's exposed methods have some parameters as pointers (DWORD*) and some double pointers (DWORD**) and some are user defined types(e.g SomeUDTType objSmeUDTType) and vice versa its pointer(i.e. SomeUDTType *pSomeUDTType). Now for dynamic method invocation, we have single option for passing parameters as array of object i.e object[] and filling this array statically. But I need to pass pointers and references and pointers to pointers. For now how can I be able to populate object array as mixed data of simple data types, pointers or references and pointers to pointers. Working Example: Native COM exposed method : STDMETHODIMP MyCallableMethod(DWORD *value_1,BSTR *bstrName,WESContext a_wesContex Translated by tlbimp.exe (COMInterop) UDTINIDLLib.RuntimeCallingClass.MyCallableMethod(ref uint, ref string, UDTINIDLLib Now calling these methods at runtime using reflection at runtime, See here :        Assembly asembly = Assembly.LoadFrom("E:\\UDTInIDL\\Debug\\UDTINIDLLib.dll");         Type[] types = asembly.GetTypes();         Type type = null;    //foreach (Type oType in types)         {             try      &nb

User Control Passing Parameters to SQL

I have a usercontrol that populates search pages based on a selected menu choice. Each page returned by the menu choice selected calls the usercontrol.Each page has a two part page Title. Example: Title="Ketchikan Charters" Each name in the title is actually a SQL select value. Ketchikan = "City" Charters = "Classification" Example:<SelectParameters> <asp:ControlParameter ControlID="CharterGridView" DefaultValue="Ketchikan" Name="City" PropertyName="SelectedValue" Type="String" /> <asp:ControlParameter ControlID="CharterGridView" DefaultValue="Charters" Name="Classification" PropertyName="SelectedValue" Type="String" /> </SelectParameters> Here I remove the Default values for City, and Classification <SelectParameters><asp:ControlParameter ControlID="CharterGridView" DefaultValue="" Name="City" PropertyName="SelectedValue" Type="String" /><asp:ControlParameter ControlID="CharterGridView" DefaultValue="" Name="Classification" PropertyName="SelectedValue" Type="String" /></SelectParameters> The reason for removing them is that I want to import those values at run time from the page title. Re

Passing multiple parameters

I want to be able to pass multiple parameters through DataNavigateUrlFormatString both th PONumber and ProjectCode. 
Could someone please help me?
<asp:DetailsView ID="DetailsView8" DataSourceID="AccessDatasource8" 
        runat="server" Height="50px" Width="125px" AutoGenerateRows="False" 
         <asp:HyperLinkField DataNavigateUrlFields="PONumber" 
                  DataTextField="PONumber" HeaderText="PONumber" 
                  NavigateUrl="~/bringPO.aspx" Target="_blank" />

              <asp:BoundField DataField="PONumber" HeaderText="PoNumber" 
                  SortExpression="PONumber" HtmlEncodeFormatString="True" />
                  <asp:BoundField DataField="ProjectCode" HeaderText="ProjectCode" 
                  SortExpression="ProjectCode"  HtmlEncodeForma

Problem Using Invoke and passing multiple byref parameters


I have code, shown below highly simplified that works all except for 1 thing: The variables being passed byRef get passed, but once modified in RecordData, they are never updated in the calling function. The calling function does not receive the updated data that is in the variables custid and amt. When debugging, I see the data in the else section of if me.invokerequired, but once it returns from the callback and is in the latter part of if me.invokerequired the data is missing.

How do I fix this?


Delegate Sub RecordDataCallback(ByRef custid As String, ByRef amt As Double)

Private Sub RecordData(ByRef custid As String, ByRef amt As Double)
    If Me.InvokeRequired Then

Passing Date Paramaters (Convert(Char(10, ,DATE,110))


I need to pass in user friendly date paramaters for values but I'm not sure how to display the converted dates in the stored porcedure that I'm passing frienldy dates to  do i need to do a converert everywhere that i have a date field?

and where around the dateadd columns?


@MINDT datetime
					,@MAXDT datetime
					,@EM_ITEM_NUM CHAR(7)
WITH itmlvl AS (




	, rb.DSCR
	, rp.AMT
	, rp.EFF_DT
	, splr.EM_ITEM_NUM

FROM geprs_dnc..T_REBATE rb 
		JOIN geprs_dnc..T_REBATE_PERIOD rp 

Problem passing parameters to controller


I have a problem with getting a parameter in my controller.
My url is: http://localhost:portnr/News/Details/43

My Global.asax:

    null, // Route name 
    "{controller}/{action}/{newsid}", // URL with parameters 
    new { controller = "News", action = "Details", newsid = "" } // Parameter defaults 

My controller code:

public class NewsController : Controller 
    public ActionResult Details(int? newsid) 
        //some code 

My controller is never getting the value out the url, how can i fix it ?
I don't want to use: /Details?newsid=43

passing parameters


The following code gives error: "System.Data.OracleClient.OracleException: ORA-01036: illegal variable name/number ".

           <asp:SqlDataSource ID="SqlDataSource1" runat="server"  
                ConnectionString="<%$ ConnectionStrings:ConnectionString1 %>"
                ProviderName="<%$ ConnectionStrings:ConnectionString1.ProviderName %>"
                SelectCommand="SELECT col3, col1, col2 FROM tbl1 WHERE ROWNUM < 200"
                UpdateCommand="UPDATE tbl1 SET col1 = :pName, col2 = :pA WHERE col3 = :pID">
                    <asp:Parameter Name="pName" Type="String" />

Passing parameters of type List<> from a web application to the Receive activity of a workflow servi



I have a Recieve activity with the following parameters in the Content property.  Using generic parameter names here:

- parameter1 of type Object1 assigned to Parameter1 variable

- parameter2 of type List<Object2> assigned to Parameter2 variable.  Note - default value of Parameter2 variable = New List(Of Object2)()

- parameter3 of type Object3 assigned to Parameter3 variable

In my web application, I create a service reference and create a client as such:


SomeWFServiceClient client = null


 client = new
 List<Object2> listOfObject2 = new
 List<Object2> { new
 Object2 {Id=1, Name="SomeName"
, Type="Customer"
 }, };

client.ProcessSomething(Object1, listOfObject2, Object3);


I have a breakpoint at the Receive activity.  When I look at the values that get assigned to the Receive activity parameters, I see that parameter1 and parameter3 ge

Passing business objects as parameters to web service

First I will explain our architecture

All of our Business Class are put into a Project Business Classes and they are passed around different layers to get the job done

Business Layer
   --- Depending on  a configuration calls either a web service or Data Access to get its data.

Business Layer


Business Layer
Web Service
Data Access

Sample Code:

    Business Classes

    public class Customer
        private string _name;
        public string Name
            get { return _name; }
            set { _name = value; }

   Data Access
     public void Add(Customer customer)
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend