|
yesterday I tried to display Crystal Report with parameter pass in visual studio 2005,
web application.
thank thatraja.
the link you provided is helpful.
But my problem is not solved yet.
I tried like this tutorial you provided.
But the report automatically request to input parameter in Textbox, when I click "ViewReport" link.
when I typed integer parameter in this textbox, the report show correct result.
I described my problem in detail below.
Let's say two documents.
1. Document1.aspx
2. ViewReport.aspx
First I put hyperlink in Formview of Document1.aspx.
I take ID value using QueryString to another page (ViewReport.aspx), Like below,
using hyperlink tag
href="ViewReport.aspx?id=<%#Eval("id")%>"
then, in ViewReport.aspx.cs, I coded like below,
string id = Convert.ToString(Request.QueryString["id"]); //take query string value
string connStr;
string strSQL;
ReportDocument cryRpt = new ReportDocument();
strSQL = "SELECT * FROM requests WHERE id=" + id; //make sql statement with parameter
ReportDocument rptDoc = new ReportDocument();
connStr = ConfigurationManager.ConnectionStrings["IThelpdeskConnectionString"].ConnectionString;
SqlConnection sqlCon = new SqlConnection(connStr);
DataSet ds = new DataSet();
sqlCon.Open();
SqlDataAdapter da = new SqlDataAdapter(strSQL, sqlCon);
SqlCommandBuilder cmdBldr = new SqlCommandBuilder(da);
da.Fill(ds, "requests");
rptDoc.SetDataSource(ds);
CrystalReportViewer1.ReportSource = rptDoc;
CrystalReportViewer1.RefreshReport();
the Error shows on Line.... rptDoc.SetDataSource(ds);
Invalid file path error
Exception Details: CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: Invalid report file path.
I don't know how to solve this error.
Anyboxy, pls help me.
I am using VS 2005 professional, web application (C#).
|
|
|
|
|
sankooo wrote: the Error shows on Line.... rptDoc.SetDataSource(ds);
Invalid file path error
Exception Details: CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: Invalid report file path. Don't worry, Already I have answered similar question(s) in Q/A section. Check this
Invalid report file path in crystal reports[^]
|
|
|
|
|
so, you mean I need to install crystal report another version.
where I can download later version for visual studio 2005
|
|
|
|
|
sankooo wrote: so, you mean I need to install crystal report another version. No man, that's one of the possible case. But see more there
Application folder permissions
Make sure the application user has sufficient permissions to access all the various resources involved, including:
Read and Write access to the Application folder, sub-folders, and files.
Read and Write access to the Temporary folder and all related sub-folders.
Read and Write access to Microsoft .NET Framework folder and related sub-folders.
Read and Write access to the folder containing the report file to be displayed.
Also, make sure the user credentials supplied when creating the Crystal Report has permission to access the application and the database.
Virtual Directory configuration
See Virtual Directory on Microsoft IIS Does Not Allow Anonymous Access[^] for details.
|
|
|
|
|
Hi there all,
Can you please tell me how to fill several comboboxes with for loop??? Need something like above... I have a string list with names of my comboboxes (combolar)... Thanks in advance...
(AjaxControlToolkit.ComboBox)this.Page.FindControl(combolar.ElementAt(t)).Items.Add()
|
|
|
|
|
Hi,
1.Create a dataset.
2. Populate the dropdown list through the dataset.
SqlConnection mycn;
SqlDataAdapter myda;
DataSet ds;
String strConn;
private void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack)
{
strConn="Data Source=localhost;uid=sa;pwd=;Initial Catalog=northwind";
mycn = new SqlConnection(strConn);
myda = new SqlDataAdapter ("Select * FROM CategoryTable ", mycn);
ds = new DataSet();
myda.Fill (ds,"Table");
DropDownList1.DataSource =ds.Tables [0] ;
DropDownList1.DataTextField =ds.Tables[0].Columns["CategoryName"].ColumnName.ToString();
DropDownList1.DataValueField =ds.Tables[0].Columns["CategoryId"].ColumnName.ToString();
DropDownList1.DataBind () ;
for (int i =0;i < DropDownList1.Items.Count ;i++ )
{
DropDownList1.Items[i].Attributes.Add("style", "color:" + ds.Tables[0].Rows[i]"CategoryColor"].ToString () );
}
}
}
|
|
|
|
|
Please use <pre> tags around code!
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Hi All
We are facing the issue with my website. we have uploaded the publish version and facing the below error.
Could not load the assembly 'App_Web_ixo69rir'. Make sure that it is compiled before accessing the page.
URL :: http://www.dobazaar.com/book/architecture.aspx
Regards
Keyur Satyadev
|
|
|
|
|
|
any one can tell query or SP how to insert image in sql server
any one give link
as i create table image data type
rizvan sivally
|
|
|
|
|
Have a look at these google results insert images into sql server[^]
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
|
hi,
i would like to prepare R&D. regarding my R&D i need to make a print preview page that will not contain the scroll bar if the div control had a scroll.. it is possible when override the style sheet but we have to prepare another css for print preview... i hope you overcome this problem and will send the correct code for me.... remember i need to remove the scroll from the div control.. if we are override only override overflow property means we will get a alligment problem.. we have to avoid all the problems.. please help me... please send a mail to gopinatth.g@hotmail.com
with thanks,
Gopinath Ganesan
|
|
|
|
|
hi, excuse me,
I created formview.
this formview contain checkbox value, showing true or false of sql Bit datatype.
please tell me,
how to display boolean value using checkbox on formview.
&
how to update boolean value using sql update statement in C#.
|
|
|
|
|
|
In a C# web form 2010 application I have a detailsview control that is tied to a linq datasource. In the detailsview control I am suppose to have 4 dropdownlist controls where the user selects no or yes. The default value is no if nothing is selected. The dropdown list controls are not setup to update the database. The dropdown list controls is to indicate if certain 'preloaded' date fields are incorrect. The 'preloaded dates' can be incorrect if the customer submits their paperwork that is past the due date. (The preloaded dates are dates that certain paperwork is required for tthe customer.)
When the user clicks 'yes' in the appropriate dropdown list control, another row in the detailsview control is suppose to show up for the user to enter the date that is entered by the user. The user does not want to be allowed to enter a 'corrected' date unless they click a dropdownlist box.
My plan is to have the 4 date fields that can be modified, have their 'insertinvisible property' set to true. When the appropriate dropdownlist box is clicked for 'yes', I would change the insertinvisible property for the appropriate date to false on the click event of the dropdown list.
Based upon what I have just stated, I have the following questions:
1. Can I have a dropdownlist control used that is not attached to the database? If so, can you show me an example of how to accomplish this task? I assume I would put the dropdownlist control in the itemtemplate versus the edititemtemplate since I am not updating the database, correct?
2. I have tried to used the 'insertvisible' property on a couple of 'test' rows in the database. However the test rows show up regardless of what I set the insertvisible property to. Thus do you know of any other way to use a visible property here? If so, what is the property and how would I reference that prpoerty?
|
|
|
|
|
I have gridview with 3 check (checkBox1,checkBox2,checkBox3).
When user check checkBox3 -> checkBox1,checkBox2 should be enable ane opposite when user un-check checkBox3 ->checkBox1,checkBox2 should be disable. how can I do this?
|
|
|
|
|
jQuery way:
Pass the checkBoxes objects to this function please, e.g.
<input id="checkBox3" runat="server" type="checkbox" onclick="OnSelect( $(this), $('#checkBox1'), $('#checkBox2') );" />
function OnSelect( checkBox3, checkBox1, checkBox2 )
{
if( checkBox3.is( ':selected' ) )
{
checkBox1.attr( 'disabled', false );
checkBox2.attr( 'disabled', false );
}
else
{
checkBox1.attr( 'disabled', true);
checkBox2.attr( 'disabled', true);
}
}
Happy coding,
Morgs
|
|
|
|
|
|
Hi all,
I need to have two different menu items. One for the top and one for the left. I was trying to connect web.sitemap to top and web1.sitemap to left menu.
Both menus getting data from web.sitemap file. Although, I have SiteMapDataSource1 for top menu, and SiteMapDataSource2 for left menu.
thanks.
|
|
|
|
|
|
hi i have a custom authentication used from
http://brianlegg.com/post/2011/05/09/Implementing-your-own-RoleProvider-and-MembershipProvider-in-MVC-3.aspx
i need to show a list of online users , can anyone help
|
|
|
|
|
|
Hi,
I would like to open a pdf file in a web browser. I tried the below, but its not working. Please let me know how to open it.
<object type="application/pdf" data="C:\Lalitha\Bloomberg\TablesProject\Copy.pdf" width="500" height="650" ></object>
|
|
|
|
|
You clients browser will decide whether or not to open the pdf file or offer a download functionality, but hey! here goes the answer:
<a href="/TablesProject/Copy.pdf">Download file</a>
Caution here! It's never a good idea (security large hole) to offer a full file path like you have done in the orginal post which is why i changed it in my solution.
Happy coding,
morgs
|
|
|
|