|
Hi friends
I am developing my project in .net framework2.0 and c#.I am using microsoft reporting services and created an rdlc file.I am using reportviewer control to load and display the report.
But I am not able to get the report and i am not getting any error.
Below is my code.
private void BindCustomersreport()
{
ds = new DataSet();
RBLL = new ReportBLL();
ds = RBLL.ShowCustomersReport(RBLL);
if (ds.Tables[0].Rows.Count != 0)
{
reportViewer1.Visible = true;
reportViewer1.ProcessingMode=Microsoft.Reporting.WinForms.ProcessingMode.Local;
reportViewer1.LocalReport.ReportEmbeddedResource = @"C:\Inetpub\wwwroot\Tirumala Gruha Nirman\Tirumala Gruha Nirman\CustomersContactList.rdlc";
reportViewer1.LocalReport.DataSources.Clear();
bindingSource1.DataSource = ds.Tables[0].DefaultView;
rpt.Name = "Customerscontactinfo_sp_showcontactlistofcustomers";
reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("Customerscontactinfo_sp_showcontactlistofcustomers",bindingSource1));
// reportViewer1.LocalReport.DataSources.Add(rpt);
reportViewer1.DocumentMapCollapsed = true;
reportViewer1.LocalReport.Refresh();
}
else
{
reportViewer1.Visible = false;
}
}
Please suggest me my mistake...
With Regards
Shashi.
|
|
|
|
|
Have you stepped through your code to see if your if condition is false, therefore running your reportViewer1.Visible = false; line?
In other words, does ds.Tables[0].Rows.Count == 0 ?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi Henry
I am getting data as ds.Tables[0].rows.count!=0
and reportviewer1 is also set to true.I am able to see the report control but not the data in the win form.
I hope data is not binding to the report or report is not loading..
|
|
|
|
|
In that case, I'm stumped.
Sorry!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi,
Along the lines of what Henry suggested, is there data in
ds.Tables[0].DefaultView
(You said there are rows in the dataset, but how about the default view?)
Also, looking at what I've done when using the report viewer, I've also set the LocalReport.ReportPath to the path of the .rdlc file, as well as using the ReportEmbeddedResource. I'm not sure it's necessary, but maybe you can try it
|
|
|
|
|
Can WPF Controls used in normal existing windows application.?
|
|
|
|
|
|
Can you give me the way or steps to do this?
Thanks
Saurabh
|
|
|
|
|
Did you follow the link Eddy supplied "Walkthrough: Hosting a Windows Presentation Foundation Control in Windows Forms" seems to cover it.
|
|
|
|
|
hi
i am working on visual studio 2008(framework 3.5) and i want to access this exe file in another PC They are connected in networking and they have installed studio 2008.
BEST REGRADS
|
|
|
|
|
ashikale wrote: i am working on visual studio 2008(framework 3.5) and i want to access this exe file in another PC
Place it in a shared directory.
|
|
|
|
|
...and read up on Code Access Security. By default, no workstation will trust your app running from a network source. You have to tell each workstation to either trust the location the app is in, trust the app specifically, or trust the code signed with a certain key.
|
|
|
|
|
if you want to run it pragmatically then you can use socket programming to do that.
|
|
|
|
|
I try to create a form game.
I got up to 30 tiles (images) on that second form and I want to change the tile-image each time you click on it.
But it does it only once.
The possible errors are few.
First, here's part of the form code.
private: System::Void TS11_MCli(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) {
Tsn11 = Tsn11 + 1 ;
if (Tsn11 = 0) { this->TS11->Image = Image::FromFile("C:/GamePics/NOTILE.png");}
else {
if (Tsn11 = 1){ this->TS11->Image = Image::FromFile("C:/GamePics/GREEN.png");}
else {
if (Tsn11 = 2){ this->TS11->Image = Image::FromFile("C:/GamePics/GRTRE.png");}
else {
if (Tsn11 = 3){ this->TS11->Image = Image::FromFile("C:/GamePics/ROAD.png");}
else {
if (Tsn11 = 4){ this->TS11->Image = Image::FromFile("C:/GamePics/WALL.png");}
};
};
};
};
};
That is the mouse event click.
Now up in the begining of the form, i get to declare the TS variables (one for each tile).
As it is : Tsn11 = 0;
As for the error facts : The form either reinitialise the variables each time you click, either always...
either the imageclick will operate only once.
Either there is a problem in the If Else statements.
So what is it exactly?
And how do I correct it?
|
|
|
|
|
Why have you reposted this question with the same incorrect code? A number of people have explained what is wrong with this code and what needs to be changed. Please try what you have been advised to do rather than merely asking the original question in a different forum.
|
|
|
|
|
hi!
I have a Form with a CrystalReportViewer control (I should say that I use embedded Crystal report in .Net 2005). there are some reports to be shown in CrystalReportViewer of course, the problem is here: after showing the reports in runtime, I can not select(by mouse) or copy any of data shown in the report page. is there any setting omitted?
every suggestion whould be appreciated
|
|
|
|
|
Please do not post your questions in more than one forum. Choose one and stick to it.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Why dont you export that data as their Export Option is Available you can export in to Excel etc then can manipulate
Best Of Regards,
SOFTDEV
If you have knowledge, let others light their candles at it
|
|
|
|
|
I have Export menu in my project, but we make it copy able in run time too! by the way thanks for your reply
|
|
|
|
|
Hi there,
Did you ever find a solution to this? I'm seeing the same problem...
Ross
|
|
|
|
|
hi,
unfortunately I should say no! I just have the export choice.
|
|
|
|
|
Dear Sir,
When I use some Netadvantages or Infragistics tools with Visual C++ 2005 Forms,I experience the error Index Out of ..... , but with Visual C# there is no problem.
these tools are used only with C# or what ?
modified on Tuesday, October 6, 2009 2:52 AM
|
|
|
|
|
Have you tried the vendors websites? I bet they know
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hi,
I am using a richtextBox to display files.
I have set the RightMargin property to a large value so that the data (> 1500 char approx)is shown in a single line.
Problem i am facing now is that on horizontal scroll to the end of the line the text overlaps making it not readable.
Please let me know how can this problem be fixed?
|
|
|
|
|
I am working in vb.net, sql server 2005 project, I have problem. In my project have one DataSet1.xsd in this dataset have one table, in that table run time get a rows, in that all rows I want to display in Report1.rdlc Table.
I need help to all
Franics K Antony
|
|
|
|