Tuesday, March 27, 2012
Customize ReportViewer Animation
I am developing an application that queries a database for a large
amount of data. The SQL server is not local so the time to query the
data can take some time.
Once I have the data locally, I send it to the ReportViewer to display.
The ReportViewer then shows the "Processing" animation, and displays
the results quickly so the animation is shown for a breif period. The
problem is that it takes a long time to query for the data, but the
ReportViewer animation is only shown for the time it processes the
DataSet.
I was wondering if anyone had experience customizing the ReportViewer
control to prematurely start the ReportViewer "Processing..."
animation. I would like to start the animation before I query the
database for the data so the user is aware that something is happening
during the data query.
I would rather implement my own "Processing..." form, or progress bar,
but if there is no way to control the ReportViewer control animation
that is my backup solution.
Thank you,
bigcoopsDoes anyone have any suggestions?
Thanks.
bigcoops@.hotmail.com wrote:
> Hello All,
> I am developing an application that queries a database for a large
> amount of data. The SQL server is not local so the time to query the
> data can take some time.
> Once I have the data locally, I send it to the ReportViewer to display.
> The ReportViewer then shows the "Processing" animation, and displays
> the results quickly so the animation is shown for a breif period. The
> problem is that it takes a long time to query for the data, but the
> ReportViewer animation is only shown for the time it processes the
> DataSet.
> I was wondering if anyone had experience customizing the ReportViewer
> control to prematurely start the ReportViewer "Processing..."
> animation. I would like to start the animation before I query the
> database for the data so the user is aware that something is happening
> during the data query.
> I would rather implement my own "Processing..." form, or progress bar,
> but if there is no way to control the ReportViewer control animation
> that is my backup solution.
> Thank you,
> bigcoops
Thursday, March 22, 2012
custom web app for reportviewer
Hi,
I am trying to develop a custom web page to display and generate our company reports.
It shoud have a login page, and then a general window with 2 or 3 frames (top frame with general info, left frame with a
dynamic list of all existing reports (eventually categorized by a certain word in the report title), and a center frame
that has initialy the company logo and after selecting a specific report displays the parameters and afterwards the
generated report).
Does anybody has some pointers or links on the web where some of this is a little bit documented.
I have dev skills in vb.net and know how to work with ssrs.
My web dev skills are intermediate.
All info, tips, hints are very welcome ...
Greetings
Vinnie
If ou want logic i can provide you that..
code you need to write..
I think you can create login page and list of report..
For the 3rd frame.
keep 3 control there
1 image
2 panel with all the controls thath you need for parameter
3 reportviewer control (property visible = false and size (min that you want)
for 1 - you can initially keep image visible.
on click on list of report make it invicible and make the panel for parameter visible.
2) initially invisible as i said above while keeping it visible check for the parameters for the report that are needed and make thaem visible. everything else invisible.
( In my 10 reports I have kept name of the parameters same for same type like if i need to pull patientname and first visit date ..... so my report parameter is patienName, StartDate in 2 nd report date is i need Patientname with last visitdte
then parameter would be PatientName,last date.
in 3rd report i need patient visited between FirstDate and lastDate.. I would keep same parameter Name..
So for each parameter I hav one control.
So it would be easy to make them visible as per report name.
After that you need to set report to report viewer
than pass parameter values to report
than database login to report( if needed)
than make report viewer visible.
RptViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;
string ReportPath = "";
ReportPath = ReportLoad.Reportpath + ReportRow["ReportName"].ToString();// ;
if (File.Exists(ReportPath))
{
RptViewer.LocalReport.ReportPath = ReportPath;
//RptViewer.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
//RptViewer.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.Percent;
//RptViewer.ZoomPercent = 100;
RptViewer.LocalReport.DataSources.Clear();
SetReportParameter(weekdate);
RptViewer.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("SlimPOS", GetWeekenderData(weekdate)));
RptViewer.RefreshReport();
}
private void SetReportParameter(DateTime weekenddate)
{
Microsoft.Reporting.WinForms.ReportParameterInfoCollection ParInfo;
Microsoft.Reporting.WinForms.ReportParameter[] RepParameter;
ParInfo = RptViewer.LocalReport.GetParameters();
RepParameter = new Microsoft.Reporting.WinForms.ReportParameter[ParInfo.Count];
for (int j = 0; j < ParInfo.Count; j++)
{
switch (ParInfo[j].Name.ToLower())
{
case "centername":
RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("CenterName", domain.Name.ToString(), false);
break;
case "pweekstartdate":
RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("StartDate", Settings.GetStartOfWeek(weekenddate).ToShortDateString());
break;
case "pweekenddate":
RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("EndDate", Settings.GetEndOfWeek(weekenddate).ToShortDateString());
break;
}
}
RptViewer.LocalReport.SetParameters(RepParameter);
}
private void SetDBLogonForReport(string ReportTitle)
{
Microsoft.Reporting.WinForms.DataSourceCredentials[] crd = new Microsoft.Reporting.WebForms.DataSourceCredentials[1];
crd[0] = new Microsoft.Reporting.WinForms.DataSourceCredentials();
crd[0].Name = ReportTitle;
crd[0].UserId = User;
crd[0].Password = Pwd;
RptViewer.LocalReport.SetDataSourceCredentials(crd);
}
Hope it helps.. all the best..
|||If ou want logic i can provide you that..
code you need to write..
I think you can create login page and list of report..
For the 3rd frame.
keep 3 control there
1 image
2 panel with all the controls thath you need for parameter
3 reportviewer control (property visible = false and size (min that you want)
for 1 - you can initially keep image visible.
on click on list of report make it invicible and make the panel for parameter visible.
2) initially invisible as i said above while keeping it visible check for the parameters for the report that are needed and make thaem visible. everything else invisible.
( In my 10 reports I have kept name of the parameters same for same type like if i need to pull patientname and first visit date ..... so my report parameter is patienName, StartDate in 2 nd report date is i need Patientname with last visitdte
then parameter would be PatientName,last date.
in 3rd report i need patient visited between FirstDate and lastDate.. I would keep same parameter Name..
So for each parameter I hav one control.
So it would be easy to make them visible as per report name.
After that you need to set report to report viewer
than pass parameter values to report
than database login to report( if needed)
than make report viewer visible.
RptViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;
string ReportPath = "";
ReportPath = ReportLoad.Reportpath + ReportRow["ReportName"].ToString();// ConfigurationManager.AppSettings.GetValues("RSReportpath")[0].ToString() + ReportName; // @."c:\code\slimcommon\reporting service reports\rs report\" + ReportTitle + ".rdl";// Application.StartupPath;
if (File.Exists(ReportPath))
{
RptViewer.LocalReport.ReportPath = ReportPath;
//RptViewer.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
//RptViewer.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.Percent;
//RptViewer.ZoomPercent = 100;
RptViewer.LocalReport.DataSources.Clear();
SetReportParameter(weekdate);
RptViewer.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("SlimPOS", GetWeekenderData(weekdate)));
RptViewer.RefreshReport();
}
private void SetReportParameter(DateTime weekenddate)
{
Microsoft.Reporting.WinForms.ReportParameterInfoCollection ParInfo;
Microsoft.Reporting.WinForms.ReportParameter[] RepParameter;
ParInfo = RptViewer.LocalReport.GetParameters();
RepParameter = new Microsoft.Reporting.WinForms.ReportParameter[ParInfo.Count];
for (int j = 0; j < ParInfo.Count; j++)
{
switch (ParInfo[j].Name.ToLower())
{
case "centername":
RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("CenterName", domain.Name.ToString(), false);
break;
case "pweekstartdate":
RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("StartDate", Settings.GetStartOfWeek(weekenddate).ToShortDateString());
break;
case "pweekenddate":
RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("EndDate", Settings.GetEndOfWeek(weekenddate).ToShortDateString());
break;
}
}
RptViewer.LocalReport.SetParameters(RepParameter);
}
private void SetDBLogonForReport(string ReportTitle)
{
Microsoft.Reporting.WinForms.DataSourceCredentials[] crd = new Microsoft.Reporting.WebForms.DataSourceCredentials[1];
crd[0] = new Microsoft.Reporting.WinForms.DataSourceCredentials();
crd[0].Name = ReportTitle;
crd[0].UserId = User;
crd[0].Password = Pwd;
RptViewer.LocalReport.SetDataSourceCredentials(crd);
}
Hope it helps.. all the best..
sqlThursday, March 8, 2012
Custom Export Format List in Rendered ReportViewer Control...
appear in the export format list control when a report is rendered. Some of
my reports need to only display a subset of the server defined export types.
An example would probably best help in my issue... I need to display one
report with options to export being Excel and PDF. With another report I
need Excel and CSV. How can I set the export list control to only display
export types required for a specific report?
Thanks in advance.
--
Bob MorvayThat is not supported in the current product, it is controlled for the
entire app.
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Bob Morvay" <adamantiumrocks@.hotmail.com> wrote in message
news:ejFlBLNeFHA.2664@.TK2MSFTNGP15.phx.gbl...
>I know that at the server level you can suppress the export types that
>appear in the export format list control when a report is rendered. Some
>of my reports need to only display a subset of the server defined export
>types. An example would probably best help in my issue... I need to
>display one report with options to export being Excel and PDF. With
>another report I need Excel and CSV. How can I set the export list control
>to only display export types required for a specific report?
> Thanks in advance.
> --
> Bob Morvay
>|||Well that sucks :) Thanks for responding.
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:eaA4oEleFHA.2584@.tk2msftngp13.phx.gbl...
> That is not supported in the current product, it is controlled for the
> entire app.
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Bob Morvay" <adamantiumrocks@.hotmail.com> wrote in message
> news:ejFlBLNeFHA.2664@.TK2MSFTNGP15.phx.gbl...
>>I know that at the server level you can suppress the export types that
>>appear in the export format list control when a report is rendered. Some
>>of my reports need to only display a subset of the server defined export
>>types. An example would probably best help in my issue... I need to
>>display one report with options to export being Excel and PDF. With
>>another report I need Excel and CSV. How can I set the export list
>>control to only display export types required for a specific report?
>> Thanks in advance.
>> --
>> Bob Morvay
>>
>
Tuesday, February 14, 2012
Custom "Export to excel" button help needed
web control) that has the toolbar hidden, but still allows people to
export to excel and pdf.
Ideally I need to create two asp.net linkbuttons on the web page
itself, that will call methods to save the report being viewed through
reportviewer as excel and pdf.
Is this possible?
Thanks for any help
JamesUse the Reporting Services Web Service method Render to do this. The web
service can be added as a reference from
http://ReportServerComputer/ReportServer/ReportService.asmx
After adding it and creating a proxy RS, you can use (in VB.NET)
RS.render("c:\myfile.xls", "EXCEL")
Charles Kangai, MCT, MCDBA
"jamesb" wrote:
> Hi - I'm trying to create a report (viewed through the reportviewer
> web control) that has the toolbar hidden, but still allows people to
> export to excel and pdf.
> Ideally I need to create two asp.net linkbuttons on the web page
> itself, that will call methods to save the report being viewed through
> reportviewer as excel and pdf.
> Is this possible?
> Thanks for any help
> James
>|||Just tweak the reportviewer web user control. Add a boolean property that
if true adds the following to the end of the report URL:
&rs:Format=EXCEL
Cheers,
--
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Charles Kangai" <CharlesKangai@.discussions.microsoft.com> wrote in message
news:410C78F3-14C3-4D4A-8862-09ADABDDFDE4@.microsoft.com...
> Use the Reporting Services Web Service method Render to do this. The web
> service can be added as a reference from
> http://ReportServerComputer/ReportServer/ReportService.asmx
> After adding it and creating a proxy RS, you can use (in VB.NET)
> RS.render("c:\myfile.xls", "EXCEL")
> Charles Kangai, MCT, MCDBA
> "jamesb" wrote:
>> Hi - I'm trying to create a report (viewed through the reportviewer
>> web control) that has the toolbar hidden, but still allows people to
>> export to excel and pdf.
>> Ideally I need to create two asp.net linkbuttons on the web page
>> itself, that will call methods to save the report being viewed through
>> reportviewer as excel and pdf.
>> Is this possible?
>> Thanks for any help
>> James|||I'm sorry, I posted too soon. The ReportViewer already has a Format
property. Just set that to EXCEL or PDF at the appropriate point in your
code. Works like a charm.
Cheers,
--
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Charles Kangai" <CharlesKangai@.discussions.microsoft.com> wrote in message
news:410C78F3-14C3-4D4A-8862-09ADABDDFDE4@.microsoft.com...
> Use the Reporting Services Web Service method Render to do this. The web
> service can be added as a reference from
> http://ReportServerComputer/ReportServer/ReportService.asmx
> After adding it and creating a proxy RS, you can use (in VB.NET)
> RS.render("c:\myfile.xls", "EXCEL")
> Charles Kangai, MCT, MCDBA
> "jamesb" wrote:
>> Hi - I'm trying to create a report (viewed through the reportviewer
>> web control) that has the toolbar hidden, but still allows people to
>> export to excel and pdf.
>> Ideally I need to create two asp.net linkbuttons on the web page
>> itself, that will call methods to save the report being viewed through
>> reportviewer as excel and pdf.
>> Is this possible?
>> Thanks for any help
>> James