|
Hi all,
How to bind datatable to report viewer dynamically based on users search criteria using c#.......
Ash
|
|
|
|
|
ReportDocument1.Database.Tables[0].SetDataSource(YourDataTableHere);
CrystalReportViewer1.ReportSource = ReportDocument1;
modified on Monday, March 31, 2008 4:09 AM
|
|
|
|
|
Hello Friends...
In my application i have to generate reports using PUSH Model.I have used the following code in my app.
public void BindReport()
{
SqlConnection myConnection = new SqlConnection();
myConnection.ConnectionString = "server=.;database=Test;uid=sa;pwd=test; ";
SqlCommand MyCommand = new SqlCommand();
MyCommand.Connection = myConnection;
MyCommand.CommandText = "Select * from EmployeeMaster";
MyCommand.CommandType = CommandType.Text;
SqlDataAdapter MyDA = new SqlDataAdapter();
MyDA.SelectCommand = MyCommand;
DataSet2 myDS = new DataSet2();
//This is our DataSet created at Design Time
MyDA.Fill(myDS, "EmployeeMaster");
// CrystalReport1 oRpt = new CrystalReport1();
// This is the Crystal Report file created at Design Time
//oRpt.SetDataSource(myDS);
// Set the SetDataSource property of the Report to the Dataset
CrystalReportViewer1.ReportSource = oRpt;
// Set the Crystal Report Viewer's property to the oRpt Report object that we created
}
But the problem is that i am not able to access the report that i have created at the design time.
Thats the main problem that i am having plase help me out.......
Deepak Nigam
|
|
|
|
|
Dear all,
Here i have a problem with text changed event.
I have a popup calender which i will select in a textbox.
I want to check the selected date with the date, which is already entered before this record.
I want to check after selecting one date from calender, that the selected date is greater than the inserted date.
Here on textchanged event,that means user should enter data into the textbox,then only the event is firing.but it is not happening at the time of date selectd from popup calender.
My requirement is the event has to be fired on both cases,ie if the user enters date from keyboard or selects from pop-up calender.
i have tried using querystring,on databinding etc.It is not working.can anybody give me some idea.
Thanks in advance
kissy
|
|
|
|
|
CalendarExtender has event "OnClientDateSelectionChanged"
try using this event.
|
|
|
|
|
I didnt get ur idea.Tell me how to use this event.
kissy
|
|
|
|
|
in my asp.net application,i have a manu javascript in a user control.when ever onclick ,it s directed to other aspx forms.for this i am using the script:
var menu1=new Array()//for payroll
menu1[0]='Payroll management'
menu1[1]='Payroll Compensation'
i want to open the aspx page in a seperate new window. how can i do this?
also i am using a seperate msi also in this project.For that also i am giving the same script:
var menu8=new Array()//for Mail
menu8[0]='a href="httprequest/Start.aspx">e-mail'
Its working fine,but i have to click back button in the browser to go my application again.so i want to open this msi also in a seperate new window.what is the script for that..?
modified on Monday, March 31, 2008 1:40 AM
|
|
|
|
|
I have a grid for binding the data according to the rowindex.I get the selected grid rowindex.I want to check the rowindex is exists in the grid.How is it possible.Please help me to sort out the problem.
|
|
|
|
|
Hi,
Try this
if (this.GridView1.Rows(rowIndex) != null)
{
//some action
}
else
{
//some action
}
where rowIndex is the index that is required to be checked.
Faraz Shah Khan
MCP, MCAD.Net
Blog
|
|
|
|
|
Why you wan to check for the existence of a row index ?..Or you want to search for a specific data ?
You can alwasys check if a row index is the by checking if it is between 0 and Grid.rows.Count
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
Hi All
can anybody tell me that how to show sub menu horizontal.
i create menu using web.sitemap.
i wrote all menu and submenu in this sitemap file
now it showing like
Home :
About Us
Contact Us
Search
but i need to show like this
Home:
About Us | Contact Us | Search
please help me.
thanks.
|
|
|
|
|
You can change the orientation property
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
hi Abhijit
thanks.
i checked this .but not working...
|
|
|
|
|
Just Select "Menu" From Tool Box and Chnage the "Orientation" Property.
can you infrom me the details problem you are facing?
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Try this ... I have just Put aspx code for you
<asp:Menu ID="Menu1" runat="server" BackColor="#B5C7DE" DynamicHorizontalOffset="2"<br />
Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284E98" Orientation="Horizontal"<br />
StaticSubMenuIndent="10px"><br />
<StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" /><br />
<DynamicHoverStyle BackColor="#284E98" ForeColor="White" /><br />
<DynamicMenuStyle BackColor="#B5C7DE" /><br />
<StaticSelectedStyle BackColor="#507CD1" /><br />
<DynamicSelectedStyle BackColor="#507CD1" /><br />
<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" /><br />
<Items><br />
<asp:MenuItem Text="Home" Value="Home"></asp:MenuItem><br />
<asp:MenuItem Text="About US" Value="About US"></asp:MenuItem><br />
<asp:MenuItem Text="Contact Us" Value="Contact Us"></asp:MenuItem><br />
</Items><br />
<StaticHoverStyle BackColor="#284E98" ForeColor="White" /><br />
</asp:Menu>
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
|
Hey!
I am trying to retrieve data from the database and display into the textbox.
For example, when the user wants to edit a current event stored in the database, he clicks the edit button and the edit panel shows. The edit panel consists of all the different textboxes to key in the values. When the edit panel loads, the data in the current event is to be populated into the corresponding textboxes.
I tried using gridview and with following code. StartTimeTextBox.Text = GridView1.Rows(1).Cells(1).ToString
Hope someone could help!
Thanks in advance!!!!
|
|
|
|
|
You have to handle the ItemCommand event.
guardianhm wrote: GridView1.Rows(1).Cells(1).ToString
Also this might be like the following
StartTimeTextBox.Text = GridView1.Rows(e.ItemIndex).Cells(1).Text
|
|
|
|
|
I have built a login authentication section that uses forms authentication. The administrator can log in with their password and username and are granted access to admin pages. However...I dont want a login page as normal users of the site are not monitored. I would like another method so that when the admin is browsing the site the admin pages are made avaliable. Maybe using a cookie or IP address or something. HELP!
cheers
|
|
|
|
|
I use both cookie and session.
Glad to discuss with you and best wishes.
|
|
|
|
|
Hi all
(ASP.NET)
I would like to allow a logged in administrator to upload files to my web application for download.
1) select file for upload
2) upload file
3) web app displays download link for file
Is the best way to do this using a database table "files" or a folder containg uploaded files? Any suggestions welcome plus code examples?
cheers
|
|
|
|
|
I prefer to store files in a folder. and store file path in a table.
Glad to discuss with you and best wishes.
|
|
|
|
|
When you upload the file you can add file name with its path in the database. When the user go on the file listing you can easily display the file as a link from the database. I usually don't save files in the database until and unless I am very sure about their size and when its a requirement.
Faraz Shah Khan
MCP, MCAD.Net
Blog
|
|
|
|
|
In my page, the visitor will fill in a form and can upload a file.
I do not need to save the file itself to the database, rather I save the file to a folder on the server with a reference in my table.
The Problem is:
if more than one file with the same name and extension were uploaded, each one will overwrite the older one
I have 2 solutions of my own:
1- I can create a sub-folder with a name same as the primary key of the record this file belongs to. and upload the file to that sub-folder
2- I can append the primary key as a prefex to the file name
But, I think this problem has more smart solution that I faild to find by google or even in codeproject articles
Mohammed Gouda
foreach(Minute m in MyLife)
myExperience++;
|
|
|
|
|