Monday, March 12, 2012
Problem with Reusing ReportViewer Control
makes.
I load the report definition as follows:
rvFBReport.LocalReport.LoadReportDefinition(sr)
where sr is a streamreader loading the rdl file.
Then I pass in the datasource via:
rvFBReport.LocalReport.DataSources.Add(rds)
where rds is a reportdatasource.
It works great until I try loading a different report using the same
reportviewer.
I have also tried using rvFleetInvoices.LocalReport.DataSources.Clear()
but to no effect. What happens is the report comes up but contains no data
even though there is. It is almost as if the report is not refreshing the
data when switching between different RDL's
Any help/thoughts would be appreciated.Here is another symptom that may narrow it down. If the other reports that I
select has fields with the same name then those fields show up. But any
fields that were not in the first loaded report do not show up. It is almost
as if the datasource is not refreshing the field list.
"Scott Eguires" wrote:
> I am resusing the Report Viewer Control depending on a selection the user
> makes.
> I load the report definition as follows:
> rvFBReport.LocalReport.LoadReportDefinition(sr)
> where sr is a streamreader loading the rdl file.
> Then I pass in the datasource via:
> rvFBReport.LocalReport.DataSources.Add(rds)
> where rds is a reportdatasource.
> It works great until I try loading a different report using the same
> reportviewer.
> I have also tried using rvFleetInvoices.LocalReport.DataSources.Clear()
> but to no effect. What happens is the report comes up but contains no data
> even though there is. It is almost as if the report is not refreshing the
> data when switching between different RDL's
> Any help/thoughts would be appreciated.|||Never Mind I solved it myself. You have to do a reset before making the
change. i.e.,
reportviewer1.reset
"Scott Eguires" wrote:
> I am resusing the Report Viewer Control depending on a selection the user
> makes.
> I load the report definition as follows:
> rvFBReport.LocalReport.LoadReportDefinition(sr)
> where sr is a streamreader loading the rdl file.
> Then I pass in the datasource via:
> rvFBReport.LocalReport.DataSources.Add(rds)
> where rds is a reportdatasource.
> It works great until I try loading a different report using the same
> reportviewer.
> I have also tried using rvFleetInvoices.LocalReport.DataSources.Clear()
> but to no effect. What happens is the report comes up but contains no data
> even though there is. It is almost as if the report is not refreshing the
> data when switching between different RDL's
> Any help/thoughts would be appreciated.
Friday, March 9, 2012
Problem With reportviewer while refreshing
Hai,
Im having a report.When i click on one item in Report it navigate to second Report.Here Second report acts as a Child report.Whne i click on refresh button it goes back parent report.Some times i get error
"
Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request. "
Plz help its very imp.
With regards,
Mahender
Hi Mahender,
I am having the same problem. The sad thing is that the same application works in one server and it doesnt in other server. I have checked and made everything I could without results. Did you solve the problem?
Thanks,
Rafael
|||I cudnot find Solution for tht Dude......................
|||Dear
I am using report builder thru LocalHost\Report . I am beginner in report server Please help.
How can I pass parameter in report1 to jump into report2 .While running report 1 error message is coming 'The 'DrillthroughSourceQuery' parameter is missing a value
How can i Pass parameter .. I am expecting a detailed step to get the drill through from report1 to jumb report2
I am expecting one answer from u expertise
regards
Problem With reportviewer while refreshing
Hai,
Im having a report.When i click on one item in Report it navigate to second Report.Here Second report acts as a Child report.Whne i click on refresh button it goes back parent report.Some times i get error
"
Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request. "
Plz help its very imp.
With regards,
Mahender
Hi Mahender,
I am having the same problem. The sad thing is that the same application works in one server and it doesnt in other server. I have checked and made everything I could without results. Did you solve the problem?
Thanks,
Rafael
|||I cudnot find Solution for tht Dude......................
|||Dear
I am using report builder thru LocalHost\Report . I am beginner in report server Please help.
How can I pass parameter in report1 to jump into report2 .While running report 1 error message is coming 'The 'DrillthroughSourceQuery' parameter is missing a value
How can i Pass parameter .. I am expecting a detailed step to get the drill through from report1 to jumb report2
I am expecting one answer from u expertise
regards
Problem with ReportViewer Control
I have an ASP.NET web site with form authentication.
When I use a ReportViewer control in a page (with a masterPage) and my report (ServerReport and Remote processingmode) has DateTime parameters I can't see that calendar gif in order to select a date. Same thing with a DropDownList bound to a dataset for another paramater (I can't see that arrow from the right side of DropDownList so I can't dropdown it).
When I want to see the report with a browser direct from my Reports site it works fine. Only in reportviewer has this simptoms.
IE has some errors in script
1. 'RSClientController' is undefined
2. 'ClientControllerctl00_contentPanel_ReportViewer1' is null or not an object.
3. 'DropDownParamClass' is undefined.
I found other posts with the same simptoms:
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=327473&SiteID=1
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=358590&SiteID=1
but the solution found there doesn't apply to me.
Any suggestions ?
Hi Sorin,I have the same problem regarding Reporting Service. Is this problem has been solved ? Could you please advice me how to solve the problem?
Best Regards,
Joko|||A work around could be to use a IFrame and changing its source to the report you would like to display.
Problem with ReportViewer Control
I have an ASP.NET web site with form authentication.
When I use a ReportViewer control in a page (with a masterPage) and my report (ServerReport and Remote processingmode) has DateTime parameters I can't see that calendar gif in order to select a date. Same thing with a DropDownList bound to a dataset for another paramater (I can't see that arrow from the right side of DropDownList so I can't dropdown it).
When I want to see the report with a browser direct from my Reports site it works fine. Only in reportviewer has this simptoms.
IE has some errors in script
1. 'RSClientController' is undefined
2. 'ClientControllerctl00_contentPanel_ReportViewer1' is null or not an object.
3. 'DropDownParamClass' is undefined.
I found other posts with the same simptoms:
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=327473&SiteID=1
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=358590&SiteID=1
but the solution found there doesn't apply to me.
Any suggestions ?
Hi Sorin,I have the same problem regarding Reporting Service. Is this problem has been solved ? Could you please advice me how to solve the problem?
Best Regards,
Joko
|||A work around could be to use a IFrame and changing its source to the report you would like to display.
problem with reportviewer columns
How do I resize the columns in reportviewer?
At the moment my report wich has 7 columns displays each column as about half a cm width.
have tried the various properties with out success
I use firefox as my browser, once I installed the extension IETab and told firefox to always use the IETab when
opening my site then the report displayed properly. Apparently MS are aware of this problem with firefox and
have a fix in the next asp.net sp.
Problem with reportviewer
Hi!
I have a problem with a reportviewer using localreport. If I debug my website under VS I can see the report in the reportviewer, but if I run the website in a browser, I cannot. If I export the report I can see the data, but I can't in the reportviewer component.
Do you know the meanng of this and how to solve this?
Thank you
Is the site over ssl? Sometimes this can mess up the viewer. Is the viewer in an html table? If so, take it out. Frames might cause this too. Try taking it out of any frames and the such. Cheers~
|||Thank you for your answer, I'll try this. But I think frames are a bit different from tables... Im not using SSL...Saturday, February 25, 2012
Problem with printing report directly to printer
Hello,
I am trying to get a SSRS 2005 report to print from my Visual Studio 2005 C++ application without using the ReportViewer to preview it first. What I have done is created a dll that I call into when I want to access a certain report and print it. While searching around on the internet I found an MSDN article about printing a report without previewing and it had an example in C# code. So I used that as a guide for my C++ code but I am still having problems with rendering the report properly so it can be printed. When I try to render a report using the "Image" format, my streamid string is empty but the byte array that the render routine returns is not. Here is the code I am using, what could be the problem here?
Note: m_Streams is define elsewhere as
array<String^>^ m_Streams = gcnew array<String^>(10);
void Print::Export(LocalReport^ report)
{
array<Warning^>^ Warn = gcnew array<Warning^>(10);
String^ deviceinfo =
"<DeviceInfo>" +
" <OutputFormat>EMF</OutputFormat>" +
" <PageWidth>8.5in</PageWidth>" +
" <PageHeight>11in</PageHeight>" +
" <MarginTop>0.25in</MarginTop>" +
" <MarginLeft>0.25in</MarginLeft>" +
" <MarginRight>0.25in</MarginRight>" +
" <MarginBottom>0.25in</MarginBottom>" +
"</DeviceInfo>";
String^ mimeType;
String^ enc;
String^ FileExt;
array<Byte>^ bytes;
bytes = report->Render("Image",deviceinfo, mimeType, enc, FileExt, m_Streams,Warn); // m_Streams has a length of
return; // 0 after the Render
}
void Print:: PrintPage(System:: Object^ sender, System:: Drawing:: Printing:: PrintPageEventArgs^ ev)
{
Metafile^ pageImage = gcnew Metafile(m_Streams[m_CurrentPage]);
ev->Graphics->DrawImage(pageImage, ev->PageBounds);
m_CurrentPage++;
ev->HasMorePages = (m_CurrentPage < m_Streams->Length);
return;
}
void Print:
rintRpt()
{
String^ printerName = "Default";
if (m_Streams->Length < 0)
return;
PrintDocument^ printDoc = gcnew PrintDocument();
if (!printDoc->PrinterSettings->IsValid) {
return;
}
printDoc->PrintPage += gcnew PrintPageEventHandler(this, &Print:: PrintPage);
printDoc->Print();
return;
}
void Print::Run()
{
LocalReport^ report = gcnew LocalReport();
DataSet^ ds = gcnew DataSet();
LoadData(ds);
report->ReportPath = "c:\\bmi\\bulrpt\\Report1.rdlc";
ReportDataSource^ RDS = gcnew ReportDataSource();
RDS->Name = "DataSet1_Subject";
RDS->Value = ds->Tables["Subject"];
report->DataSources->Add(RDS);
Export(report);
PrintRpt();
return;
}
DataTable^ Print:: LoadData(DataSet^ ds)
{
System:: String ^ConnStr = "SELECT * FROM Subject";
SqlConnection^ conn = gcnew SqlConnection("Data Source=JOE-PC\\BMIMSDESERVER; Initial Catalog=stx52013;Integrated Security = TRUE");
SqlCommand^ command = gcnew SqlCommand(ConnStr, conn);
SqlDataAdapter^ adapt = gcnew SqlDataAdapter(command);
adapt->TableMappings->Add("Table", "Subject");
conn->Open();
adapt->Fill(ds);
return ds->Tables["Subject"];
}
I had the same problem with that render method and simply looped until the byte lenth was zero and that worked. There is another example out there that used the second overload of the method that works pretty much as is. In that one you pass a call back event handler.
|||I've tried to do
bytes = report->Render("Image",deviceinfo, &Print::CreateStream,Warn);
as well but when I compile that I get the error -
error C3374: can't take address of 'Print::CreateStream' unless creating delegate instance
What does this mean?