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


Similar Messages:

Crystal Reports :: Cross Page Technique To Display Crystal Report?

Nov 19, 2010

I am working with Parametrized Crystal Reports. There are only two page called Source.aspx and Target.aspx.

[code]...

Only One text box data shows Not 2nd One.Can any one help me with this by checking my code?

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

Crystal Reports :: To Display Text Box On The Last Page Only?

Mar 29, 2011

In Crystal Report I have some text boxe on the page footer section, I wanted to show all these text boxes only on the last page. In other words I wanted to show the whole page footer section only on the last page. I do not wanted to user Report footer, as report footer starts immediatly after the contenets of the report are finished, but I wanted to display my stuff at the page footer leve in any case.

View 1 Replies

Crystal Reports :: GridView To Display All Database Records In A Page

Oct 18, 2012

Actually I am developing one web application,in that application I used a gridview to display all the database records in a page. I provide hyperlink print for every row, if I click the print option, the particular record will be print in the crystal report..

View 1 Replies

How To Use Same Crystal Reports Viewer To Display Reports Depending On An Option Selected

Dec 3, 2010

I have two reports but i want to use the same crystal report viewer to display both reports depending on an option selected. How can I achieve this?

CrystalReportViewer.setCrystalReportSource(CrystalReportSource3) or something like this i am just not sure about the code in c#

View 1 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 :: How To Display Related Tables In One Crystal Report

Aug 19, 2010

I want to display a crystal report in my vb.net application. Suppose I have tables named student details, student marks, student address, etc... Nowif I want to display all these details (fields of all tables) in one crystal report (with page breaks if necessary) then how will I achieve it. I will be providing a combo box in my application that contains list of student names.How can I link this combo box with the cystal report to dynamically display report for different student on selected index change of combo box?

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 :: 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 :: 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

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