MVC :: Dropdown Parameter In View For Reports Are Not Working?

Apr 13, 2010

I have a report where I need to select parameter values from dropdowns. Reports works fine when I run it on reportserver manager or when I do RUN.

The problem is when I try opening it in the MVC views to select parameters from a dropdown, its subsequent dropdown is not able to show its values

for example:

I am able to select first DD Country as it does not have any thing to select earlier.

The State DD is not rendering its relavent states from selected country. (it works in report manager and when I run it without debugging)

Question: how do code to make the dropdowns working.

View 1 Replies


Similar Messages:

SQL Reporting :: MDX Query Parameter From SSRS / Setup @from And @to As Parameter But Not Working?

Aug 21, 2010

I've a MDX Query that has where clause as shown below.I'm designing report using SSRS 2008. How can i pass date as parameter? I tried to setup @from and @to as parameter but not working?

WHERE ( {[Date Central].[Calendar Date].[2010-04-01 00:00:00]:[Date Central].[Calendar Date].[2010-08-30 00:00:00]} )

need it to work as
WHERE ( {[Date Central].[Calendar Date].[@From]:[Date Central].[Calendar Date].[@To]} )

View 1 Replies

Crystal Reports :: How To Create Role Based Reports When Working With Membership

Apr 13, 2013

I have master page, menu on master page, i use asp roles and trim menu item based on user roles and rights this process is working fine.

Now i have to create some reports based on user roles, and responsibility in a company like country head will view country wide reports, manager region will only view regional report and rest will view reports related to them.

How can i achieve this efficiently using asp roles.

View 1 Replies

Crystal Reports :: Cached Reports User Wise And Data Parameter Wise

Nov 24, 2013

I have basic understanding to cache webpages for duration. Now I have some complex requirements:

1. User e.g "Nauna" login in asp application
2. Visit on report page
3. Pass data range from 01-01-2013 to 30-12-2013 and extract the report which retreive data in 55 seconds on gridview
4. Now I want that when next time user "Nauna" login in the application and use the same report with same parameter 01-01-2013 to 30-12-2013 so that report should be come up from cache instead of run the complete life cycle.

View 1 Replies

MVC :: Load View And Partial View (Master / Detail) With Default Parameter?

Sep 8, 2010

Members view (index) that lists members that users can select to show a partial view in the same view with details for the selected memberUses jquery (Ajax.ActionLink) to call a partial view method in the members controller to then load the members detail sectionWorks fine up to here....but I'd like to load the partial view with "member" details for a default or random member on initial load -- ie not through the Actionlink selectionHow do I invoke the partial view method on the initial load?

View 4 Replies

Data Controls :: How To Get 8 Parameter From URL From One View And Put That 8 In 2nd View In MVC

Apr 27, 2016

I have this url string on {Controller/View} in mine {Home/Contact}:

http://localhost/sendemail/home/contact?kiosk=1

I have button SEND and when i click on this button my url is

http://localhost/sendemail/home/sent

Now, i want here in this link http://localhost/sendemail/home/sent to put 8 characters ?kiosk=1

View 1 Replies

MVC :: Passing Dropdown Value From Partial View To View (parent)?

Jan 10, 2011

I have a partial view that has only a dropdown, i have called this partial view from a view. I can able to pass the model to this partial view and it renders successfully. However when some user selects a particular text from the dropdown, the corresponding value should be passed to view and it should be displayed in the label in view.

View 7 Replies

Crystal Reports :: Cannot Pass Parameter From VB

Jun 21, 2010

I am using the following code to pass parameter from VB to crystal report but getting the error messgae "Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))" while it trying to add the first parameter. This chunk of coding works in another VB perfectly. The only diffferent is the working one takes the parameter to stored procedure where the failed one I added parameter during crystal report design time.

[Code]....

View 5 Replies

Crystal Reports :: Asking For Parameter After First Page Display

Mar 18, 2010

I am trying to populate a report with parameters from session. Problem I am getting is that it is asking for parameter after I click the 2nd page of report. If I remove the Session.Remove it works good. Is there anyway to clear session after the first time the code executes? Here is my report viewer page code

public partial class setups_ftreaty_ft_mstmt : System.Web.UI.Page
{
ReportDocument rptDoc = null;
protected void Page_Init(object sender, EventArgs e)
{
string reportName = Request.QueryString["reportName"].ToString();
rptDoc = new ReportDocument();
rptDoc = ReportFactory.GetReport(rptDoc.GetType());
string path = Server.MapPath("~/reports/ptreaty/" + reportName + ".rpt");
rptDoc.Load(path);
if (Session["ptRepParams"] != null)
{
Hashtable repParams = (Hashtable)Session["ptRepParams"];
foreach (string param in repParams.Keys)
{
rptDoc.SetParameterValue(param, repParams[param].ToString());
}
}..............

View 3 Replies

Crystal Reports :: Pass A Parameter From A Querystring?

Mar 14, 2011

I defined a report with a parameter (ID_Aluno) in Crystal Reports to show it in an .aspx page. The page is called by another page passing it a query string with the value I need as a parameter in the report. In the code behind file I tryed three different approches without success. What happen is that the report is showed without data, but when I open the parameter panel I see that the parameter is there (If I don't set the parameter value actually it complains that the parameter is missing, giving an arror).

Here is the code I used to set the parameter:

[Code]....

The First try (code not commented) is the one I would like to use because it is the shorter and simpler one.

Here is the mark up for the report source and report viewer:

[Code]....

Have I to declare or define something special in Crystal Reports for the parameter to be received and applied?

View 2 Replies

Crystal Reports :: Passing Parameter To Subreport?

Jun 24, 2010

I am using a sub report inside the main report but the issue is thatboth main and sub report take same argument i.e emp-idwhat i want is that either subreport copy parameter of main reportor in some way should be able to send paramet throug code-

"Session["username"]="muneeb";
ReportDocument report = new ReportDocument();
report.Load(Server.MapPath("~/UOGERP/GUI/Reports/CrystalReport.rpt"));

[code]...

View 1 Replies

Crystal Reports :: Pass TextBox Value As Parameter?

Feb 25, 2016

Using Crystal Report to view reports on the site and noe able to pass parameters succesfully. 

Heres the code:
 
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Report.aspx.cs" Inherits="MATReports.Report" %>
<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.Web" TagPrefix="CR" %>

[Code].....

View 1 Replies

Crystal Reports :: Passing Date As Parameter To Report?

Jun 17, 2010

I am trying to pass date as parameter from my asp application to crystal reports.

If I pass 1 jan 2010 to 16 Jun 2010 it will not get me some of the records which are on dates like 11 april 2010. And If i select dates between 1 Jan 2010 and 30 Nov 2010 then system will get me the records. Here I understood that system is not understanding the date format the problem is in date format of "dd/mm/yyyy" and "mm/dd/yyyy".

View 1 Replies

Crystal Reports :: Parameter Passing From Previous Page?

Nov 26, 2010

I have 2 asp.net pages first page (PaySlipForm.aspx) contains ui elements for getting values from user, second page shows the report depending on the parameters passed from first page. The problem is first time the report shows correctly but when I go back on first page by clicking the back button of browser and changes the selection the report is shown empty only labels are shown.

First Page PaySlipForm.aspx
<asp:DropDownList ID="ddlAllEmployees" runat="server" style="margin-left: 7px"
Height="20px" Width="174px"> </asp:DropDownList>
<br />
<asp:DropDownList ID="ddlMonth" runat="server" Height="23px">
</asp:DropDownList>
<br />
<asp:DropDownList ID="ddlYear" runat="server" style="margin-left: 18px"
Height="23px" Width="77px">
<asp:ListItem>2010</asp:ListItem>
<asp:ListItem>2011</asp:ListItem>
<asp:ListItem>2012</asp:ListItem>
</asp:DropDownList>
<br />
<asp:Button ID="btnShow" runat="server" Text="Show" PostBackUrl="~/Reports/PaySlipViewForm.aspx"/>
Second page is PaySlipViewForm.aspx that has the code
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
AutoDataBind="True" EnableDatabaseLogonPrompt="False" Height="50px"
ReportSourceID="CrystalReportSource1" Width="350px" />
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
<Report FileName="../Reports/PaySlip.rpt">
</Report>
</CR:CrystalReportSource>
---------------------
if (!IsPostBack)
{
int employeeID = Convert.ToInt32((((DropDownList)Page.PreviousPage.FindControl("ddlAllEmployees")).SelectedValue));
int monthID = Convert.ToInt32((((DropDownList)Page.PreviousPage.FindControl("ddlMonth")).SelectedValue));
int year = Convert.ToInt32((((DropDownList)Page.PreviousPage.FindControl("ddlYear")).SelectedValue));
CrystalReportViewer1.SelectionFormula = "{Payroll.EmployeeID} = " + employeeID + " And {Payroll.Month} = " + monthID + " And {Payroll.Year} = " + year;
}

View 4 Replies

Crystal Reports :: Misssing Parameter Value While Running Report?

Feb 6, 2010

My code is like this:

string strstartdate = Session["startdate"].ToString();
string strenddate = Session["enddate"].ToString();
ReportDocument reportDocument = new ReportDocument();

[code]...

View 5 Replies

Crystal Reports :: How To Filter RDLC Report Using Parameter

May 7, 2015

 protected void btn_showReport_Click(object sender, EventArgs e)
{
//ReportViewer1.Visible is set to false in design mode
ReportViewer1.Visible = true;

[Code].....

Parameter 'Comp_Name' does not exist on this report

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: Parameter 'Comp_Name' does not exist on this reportSource Error:

Line 96:             ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://dell-pc/ReportServer");Line 97:             ReportViewer1.ServerReport.ReportPath = "/test Report/test1";Line 98:             ReportViewer1.ServerReport.SetParameters(new ReportParameter[] { Comp_Name });Line 99:             ReportViewer1.ServerReport.Refresh();Line 100:        }

View 1 Replies

Crystal Reports :: How To Pass Multiple Values To Parameter Using C#

May 7, 2015

parameter field {?country}: string

allow diffrent values: true

selection record: table.country in {?country}

when i pass one parametrs it's works fine.

rd.SetParameterValue("country", DropDownListSalle.SelectedItem.Text);

my question is how can i passing multiples values (tokyo,usa,india,...) ?

View 1 Replies

Crystal Reports :: Pass GridView Row Columns As Parameter?

Mar 12, 2013

I have a crystal report which accepts a parameter and gets displayed on a webpage abc.aspx

On another  webpage i have a grid displaying columns from a table loan_request.

When I click a row in gridview I want to get the report of that corresponding row.

I used rowcommand on gridview to get the value that uniquely identifies the row in a gridview, now I need to pass this value as parameter to the crystal report.

for this i think two possibilities

1. pass the value as querystring.

2. store it session and use it on the page that display the report.

I don't want to use query string.

for better understanding. once look at the code.
 
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Request_Log_Search_Sort.aspx.cs" Inherits="WebApplication1.Request_Log_Search_Sort" %>
<%--<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>--%>
<%@ Register Assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"

[Code].....

View 1 Replies

Crystal Reports :: How To Pass Label Text Into Parameter

Apr 27, 2016

I used lable(Lblname) in page that bind it from database:

private void ViewDocInfo(int data1) {
using (SqlConnection conn = General.GetConnection()) {
using (SqlCommand _cmd = General.GetCommand("Documentry_ViewMostanadInfo", conn)) {
_cmd.Parameters.AddWithValue("@id", data1);
conn.Open();

[Code] ....

I have datalist that bind it from database:

private void GetCustomersPageWiseView(int pageIndex) {
using (SqlConnection conn = General.GetConnection()) {
using (SqlCommand cmd = General.GetCommand("GetCustomersPageWiseMC", conn)) {
cmd.CommandType = CommandType.StoredProcedure;

[Code] ...

And I have Linkbutton :

protected void LBview_Click(object sender, EventArgs e) {
Lblname.Visible = !(DLMostanad.Visible = true);
this.GetCustomersPageWiseView(1);
}

In above code as you see when click on linkbutton it will Lblname.visible=false

But in this metod:

this.GetCustomersPageWiseView(1);

In this line:

cmd.Parameters.AddWithValue("@Name", Lblname.Text);

I need Lblname.text but when I click on linkbutton it will lblname.visible=false and it can't pass lblname.text to GetCustomersPageWiseView metod...

How I can pass lblname.text to this metod?

View 1 Replies

Crystal Reports :: How To Create Dynamic Columns / The Parameter Is Incorrect

Jul 30, 2010

I'm trying to create dynamic columns in the Crystal Report. The parameter fields are named column1,column2,column3.....

I tried below code and it gives me an error "The parameter is incorrect".

[Code]....

View 1 Replies

Crystal Reports :: Error - Unable To Connect - Incorrect Log On Parameter

Apr 25, 2010

I have a crystal report using store procedure with DSN Name: 192.168.0.3. when I keep the connection to this server it's OK

But when i change the logon info and disconnect to the server to connect to My PC it appear the error :
"Unable to connect: Incorrect log on parameter"

[code]....

View 3 Replies

Crystal Reports :: Pass Rich TextBox Content To Parameter?

May 7, 2015

my requirement is  i want to pass  richtext content  and text as t is in rich txt box  such as bold,color  font .... into crystal report

View 1 Replies

Crystal Reports :: Add Image To RDLC (ReportViewer) Report Using Parameter

Nov 30, 2013

Binding the image as the report paramater in rdlc. I am using report viewer.

View 1 Replies

Dropdown List Query String Parameter

Oct 5, 2010

I have a dropdown list that won't populate data values from database using sql datasource. When i use the code behind, i was able to populate the data to the dropdown list. I dont know how to pass the Query String Parameter using code behind since i am new in asp.net. This is the code behind:

Imports System.Data.SqlClient
Partial Class PhotoAlbum
Inherits System.Web.UI.Page
Dim oConn As New SqlConnection("Data Source=.SQLEXPRESS;" & _
"AttachDbFilename=|DataDirectory|ASPNETDB.MDF;" & _
"Integrated Security=True;User Instance=True")
Dim oCmd As New SqlCommand()
Dim oDR As SqlDataReader
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
oConn.Open()
oCmd.CommandText = "SELECT [CategoryID], [Name] FROM Categories ORDER BY [Name]"
oCmd.Connection = oConn
oDR = oCmd.ExecuteReader()
Me.categories.DataSource = oDR
Me.categories.DataTextField = "Name"
Me.categories.DataValueField = "CategoryID"
Me.categories.DataBind()
oDR.Close()
oConn.Close()
End Sub
End Class

I will like to include the following information from sqlDatasource to the codebehind:

SelectCommand="SELECT [CategoryID], [Name] FROM [Categories] WHERE ([UserId] = @UserId) ORDER BY [Name]">
<SelectParameters>
<asp:QueryStringParameter Name="UserId" QueryStringField="ID"/>

As you can see from the code behind, i was able to add :

"SELECT [CategoryID], [Name] FROM Categories ORDER BY [Name]".

But i will like to add all of this:

SelectCommand="SELECT [CategoryID], [Name] FROM [Categories] WHERE ([UserId] = @UserId) ORDER BY [Name]">
<SelectParameters>

View 1 Replies

Crystal Reports :: Pass Parameter From QueryString To Report Viewer Control

May 7, 2015

protected void btn_showReport_Click(object sender, EventArgs e) {
try {
ReportParameter Comp_Name = new ReportParameter();
Comp_Name.Name = "Comp_Name";
ReportViewer1.ProcessingMode = ProcessingMode.Remote;
ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://dell-pc/ReportServer");
ReportViewer1.ServerReport.ReportPath = "/Companies Report/Companies";

[CODE]..

the above code is in "reportpage.aspx" when I click on it the company report is shown according to the parameter "Comp_Name"

I want to show report in "reportpage.aspx" according to parameter name passed from another .aspx page, how to do that?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved