|
Hi, I'm using crystal report, which is in vs 2005.
I've created a report with Sql Command. In the command, I've writen my query with parameter. I can preview the report by giving the parameter. How should I pass the query parameter to the report?
param1Field.ParameterFieldName = "pEmpCode"
param1Range.Value = ddlEmpCode.SelectedValue
param1Field.CurrentValues.Add(param1Range)param1Fileds.Add(param1Field)CrystalReportViewer1.ParameterFieldInfo = param1Fileds CrystalReportViewer1.ReportSource = "Reports\rptEmpDetails1.rpt" CrystalReportViewer1.RefreshReport()CrystalReportViewer1.Visible = True
If i use this, It is asking again the parameter value. Thanks in adv.
Balasubramanian K.
|
|
|
|
|
Please Ignore : Repost
cheers,
Abhijit
|
|
|
|
|
I'm sorry my dear friend. I could not view the previous post well. Thats why I post my qstn. again.
Balasubramanian K.
|
|
|
|
|
Then you can always edit it, instead of posting it again.
|
|
|
|
|
Hi all....!
I am using ScriptManager.RegisterStartUpScript(); in my login form to open new window. this is working properly. Now the problem is i don't want to allow user to have access of the parent window (i.e. the window from which new window is open) until the new window is closed. So What should i do for this. This means I want to disable background window untill new window is closed.
Is anybody has answer for this, please reply soon.
Thank u all.
.
|
|
|
|
|
Use modalDialog instead of new popup windowIt doesn't allow the user to access parent window till modaldialog is closed.
Cheers!!
Brij
|
|
|
|
|
Hi I am using crystal report, which is in vs 2005. I've created a report with Sql Command. In the command, I've writen my query with parameter. I can preview the report by giving the parameter. How should I pass the query parameter to the report?
param1Field.ParameterFieldName = "pEmpCode" param1Range.Value = ddlEmpCode.SelectedValue
param1Field.CurrentValues.Add(param1Range)
param1Fileds.Add(param1Field)
CrystalReportViewer1.ParameterFieldInfo = param1Fileds CrystalReportViewer1.ReportSource = "Reports\rptEmpDetails1.rpt" CrystalReportViewer1.RefreshReport()
CrystalReportViewer1.Visible = True
If i use this, It is asking again the parameter value. Thanks in adv.
Balasubramanian K.
|
|
|
|
|
|
Hi,
I need to post my application 's content (link or html code) to Blogger by getting Blogger username & password from the user & post my application 's content (link or html code) in his Blogger site.
(More details:
In this following link
http://www.quibblo.com/quiz/3b_qEvo/Have-you-finished-your-Holiday-gift-shopping-yet
To the right side of the page you can see YOUR QUIZ TITLE WILL GO HERE
,below that option are there to post the my application 's content (link or html code) to Blogger;i need to implement that functionality ; ie i need to post my application 's content (link or html code) to Blogger.)
Please help me with regard to the problem.
Regards,
prabhu
|
|
|
|
|
Hi! I am keep getting this error in my web application, here is what I am doing:
<pre> sqlDataSource sqlDataSource2 = new SqlDataSource();
sqlDataSource2.ID = "workoutScheduleDataSource";
Page.Controls.Add(sqlDataSource2);
sqlDataSource2.ConnectionString = WebConfigurationManager.ConnectionStrings["ClassScheduleConnString"].ConnectionString;
sqlDataSource2.SelectCommand = "SELECT Workout_Name, WorkoutType, MembersAttending, DateSelected, Explanation FROM WorkoutTable WHERE AddedBy = '" + user + "'";
gridviewWorkout.DataSource = sqlDataSource2;
gridviewWorkout.AutoGenerateSelectButton = true;
gridviewWorkout.DataBind();</pre>
when it gets to the last line gridviewWorkout.DataBind(), it gives me the error that: "A field or property with the name 'AddedBy' was not found on the selected data source." I am testing the query with SSMSE, at the same table, and it works just fine...but here I am getting error. Any help will be appreciated. Thx ahead, Laziale
|
|
|
|
|
In your binding in the markup, are you trying to bind a column called AddedBy, as it is not returned in your source.
|
|
|
|
|
here is what I have in my markup:
<pre> <asp:GridView ID="gridviewWorkout" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:BoundField HeaderText="Workout Name" DataField="Workout_Name" />
<asp:BoundField HeaderText="Added By" DataField="AddedBy" />
<asp:BoundField HeaderText="Workout Type" DataField="WorkoutType" />
<asp:BoundField HeaderText="Members Attending" DataField="MembersAttending" />
<asp:BoundField HeaderText="Date" DataField="DateSelected" />
<asp:BoundField HeaderText="Explanation" DataField="Explanation" />
</Columns></pre>
within the DataField I have declared the columns as they are in my table in the database.
|
|
|
|
|
Yes, but your SQL statement does not actually return a column for the AddedBy, you just have it in your where clause.
|
|
|
|
|
I have this piece of code at another page within this project, and it works just fine:
<pre> SqlDataSource sqlDataSource1 = new SqlDataSource();
sqlDataSource1.ID = "trainingScheduledatasource";
Page.Controls.Add(sqlDataSource1);
sqlDataSource1.ConnectionString = WebConfigurationManager.ConnectionStrings["ClassScheduleConnString"].ConnectionString;
sqlDataSource1.SelectCommand = "SELECT Class_Name, ClassType, MembersAttending, Staff, DateSelected, Explanation FROM ClassSchedule WHERE AddedBy = '" + user + "'";
gridviewClass.DataSource = sqlDataSource1;
gridviewClass.AutoGenerateSelectButton = true;
gridviewClass.DataBind();</pre>
where is the difference? it looks same to me
|
|
|
|
|
That's very nice. You've said in your grid (in the markup), that you want to display data for a field called AddedBy.
When you bind the data, the grid goes and looks in your returned data for a field by that name. It's not there. Grid isn't happy and throws an error.
You need to put another field in your select statement for the first case, return the AddedBy field, or remove that column from the grid.
|
|
|
|
|
laziale wrote: WHERE AddedBy = '" + user + "'";
Error Says , AddedBy not found . Did you try with "Like " rather than "="
cheers,
Abhijit
|
|
|
|
|
no...it didn't help , thx anyway
|
|
|
|
|
Hi laziale,
The problem is with ur query bcoz u r applying a condition on AddedBy column but not selecting it from table its fine with the SSMSE,but since the column is getting bound in ur gridview ,thats why u r getting this error.
Just Replace Ur Query with
"SELECT Workout_Name, WorkoutType, MembersAttending, DateSelected, Explanation,AddedBy FROM WorkoutTable WHERE AddedBy = '" + user + "'";
Hope it will work........
|
|
|
|
|
thx for the reply, it worked for me. But I still don't know why is working on the different project within the same project when I am not selecting it the AddedBy column in the query, I am just using it in the WHERE condition. Thx and have a nice day, Laziale
|
|
|
|
|
Hi All
I have a RAR file uploaded on my site contains the SWF animations now i want to play those animation on my site. where
if user click on the Animation one link than 1.swf has to be played which is stored into that RAR file.
How could i achive the same. plz do answer with explanation
Regards
Yogesh Agarwal
|
|
|
|
|
you'll need to buy a library that supports RAR files, for a start. Then you'll need to save the file in your file system and write code to emit the right HTML to play the file.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I opened a new window on link button using javascript. Now i want to close the newly opened window and getback to the previous window on click event
|
|
|
|
|
Do you mean a popup window ? If so, just close it. If you mean you went forward a page, history.back() from memory does what you want. No, it's some sort of navigate method that you pass -1 to. Sorry, you'll have to google it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi friends,
I have created voting system every user can vote not only registered users,so i want to add some security to it,i need some ideas on how to prevent multiuser voting.
I dont know exactly may be like checking cookies r session r something else.
|
|
|
|
|
The only way you can truely get it to be single user single vote is by making everyone register. Other than that you can do it by IP Address, but then only 1 person at a school can vote for example. There are other ways, but the best way is only registered users can vote. If you allow the unregistered to vote, you need to accept the fact that they can vote multiple times.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|