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


Similar Messages:

Crystal Reports :: Implement Multiple SubReport Using Parameters Passed To Subreport?

Oct 1, 2010

iam really new to Crystal Report XI Release 2..iam using multiple subreport in mainreport and onclick of particular subreport it would list out all items related to it..for example if u have customer chart(subreport) in mainreport and onclick of this it would list all customer on demand and subreport is binded and onclick of single customer it would list out single customer which sholud be passed as parameter it would get customer(full Contact details) in another subreport.if this can be done. how it can be done and explain in steps how it can be and if possible with screen shots

View 3 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

SQL Reporting :: Passing Parameter In Subreport From The Parent Record?

Mar 16, 2011

I am creating a report using sql reporting services (.rdlc) in asp.net web application. I am displaying master records using List because I need to display one record in one page. In each page now I want to display the child records in a table inside the same List control.

For example: In mater records there will be Department Name, Department Location, Department Zip. In child records there will be Employee Name, Employee Id, Employee Salary, Employee Start Date. There is a link between Dapartment and Employee table by Department Id. I want to display one department record in one page and the all employee of that department in same page in a table. And next page of the report will have other department record and respective employees in a table.

I am being able to display Department records in each page but not being able to display Employees records in a table for particular Department Id. For this I used List control.

View 2 Replies

Crystal Reports :: How To Set Not Visible A Label In Subreport

Apr 15, 2010

i want reuse a subreport for other use but i need set visible=false to some controls inside

View 7 Replies

Crystal Reports :: See Subreport In Prview But Nothing Printed?

Jun 25, 2010

I created an AR statement using crystal report. The main report gets customer info and use customer ID and from and to dates to link to three sub reports. The three subreports are (1) opening balance, (2) list of transactions and (3) aging summary. When I previewed it from VS2005 design mode, everything shown pecfectly however when I run it from VB, only the list of transactions shown and the other two subrreports only showed labels but no data. In addition, I can send the report to printer and no PDF can be generated.

View 5 Replies

Crystal Reports :: Passing Parameters In Crystal Reports Dynamically Selected By Users

Apr 6, 2010

I have already generated crystal reports but i've made them static. but now i want to make the user to select the criteria for generating the reports. for eg., in one of them i want to show monthwise data so user should be able to select the month and year and that would be passed as parameter and compared to the existing data. provide me with proper exact code that can be used for giving parameters in such a report using C#.

View 3 Replies

Crystal Reports :: How To Avoid Logon Parameter Of The Databse Data Creating The Crystal

Dec 25, 2010

I am creating the crystal report without database data, just i am read the data from text file and fill into dataset then genrate the crystal report but problem is here if i am export the crystal report into different format so he wants the database logon parameter.so in this case i have no database crendential because i am creating the report without database.

View 1 Replies

C# - Passing Multiple Parameter To Crystal Report?

Feb 28, 2011

I'm working on Visual Studio 2008 and SQL Server 2008, language C#

Multiple parameter passing in crystal report in asp.net. I have two parameter @accountnumber and @customerid at time. I can only pass one parameter to my.

[Code]....

View 2 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 :: Either The Crystal Reports Registry Key Permissions Are Insufficient Or The Crystal Reports Runti?

Aug 5, 2010

When i run the application locally it works fine but when i publish it n access from it it gives the error asEither the Crystal Reports registry key permissions are insufficient or the Crystal Reports runtime is not installed correctly.

View 2 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

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 :: 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 The Header Information From The .cs File?

Sep 21, 2010

i've one crystal report.i want the report header as "employee database".

i dont want to right click->insert and goto text object and insert.

i've one aspx page and aspx.cs page also.

now i want the "employee database" header to be printed from .cs file.

i dont want to pass by parameter also..

i.e is there any option in .cs file

something like ReportDocument myreport = new ReportDocument();

myreport.Load(MapPath("~/" + "emp.rpt"));

myReport.Reportheader="Employee database";

only thing is from .cs file i want to print the header as employee database.

i dont want by passing parameter also...ReportDocumentsasd myreport = new ReportDocument();

View 1 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







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