Friday, March 30, 2012
Replacing default chart control in MS Report Viewer
As I understand from MSDN, Dundas chart control is the default chart
rendering module in Report Viewer. Is there any way to replace the
same with custom chart control?
Thanks in advance!
Regards,
Mandarreplacing, no
you can add another charting add on in reporting services.
in fact the RS2005 charting control is not the Dundas control, in 2008
Dundas will be used.
but you can use the Dundas chart for RS 2005 which offers more options than
the integrated chart system. or you can use any custom charting control
developed for RS. (check the BOL and the SDK)
this works fine with reporting services.
with the report viewer in local mode I don't know what are the options.
"win_cpp" <mandards@.gmail.com> wrote in message
news:7f9a2d78-0585-470d-a427-041703796473@.r60g2000hsc.googlegroups.com...
> Hi,
> As I understand from MSDN, Dundas chart control is the default chart
> rendering module in Report Viewer. Is there any way to replace the
> same with custom chart control?
> Thanks in advance!
> Regards,
> Mandar|||RS 2005 uses a varient of the Dundas control. However it is not fully
featured and the purchased version has additional features. MS bought the
Dundas chart control plus a few other controls and in RS 2008 you will see
better integration and features.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Jeje" <willgart@.hotmail.com> wrote in message
news:3F1A9E7E-1DA3-4ACD-834D-6B771D4622A8@.microsoft.com...
> replacing, no
> you can add another charting add on in reporting services.
> in fact the RS2005 charting control is not the Dundas control, in 2008
> Dundas will be used.
> but you can use the Dundas chart for RS 2005 which offers more options
> than the integrated chart system. or you can use any custom charting
> control developed for RS. (check the BOL and the SDK)
> this works fine with reporting services.
> with the report viewer in local mode I don't know what are the options.
> "win_cpp" <mandards@.gmail.com> wrote in message
> news:7f9a2d78-0585-470d-a427-041703796473@.r60g2000hsc.googlegroups.com...
>> Hi,
>> As I understand from MSDN, Dundas chart control is the default chart
>> rendering module in Report Viewer. Is there any way to replace the
>> same with custom chart control?
>> Thanks in advance!
>> Regards,
>> Mandar
>sql
Monday, February 20, 2012
Rendering: PDF and Landscape
The report renders in HTML correctly in Landscape mode. When I select PDF
and Export the report is reformated and rendered as 8.5 X 11 (portait mode).
How can I fix this?
thanks
dlr"blackshirt" <blackshirt@.discussions.microsoft.com> wrote in message news:<A9031067-D190-44C0-98A6-C0155B65ACE9@.microsoft.com>...
> Dennis,
> Did you ever find the answer. I'm having the same issu.
> Thanks
> "Dennis Redfield" wrote:
> > I have a (very simple) report where I specifiy 11 X 8.5 as the paper size.
> > The report renders in HTML correctly in Landscape mode. When I select PDF
> > and Export the report is reformated and rendered as 8.5 X 11 (portait mode).
> > How can I fix this?
> >
> > thanks
> >
> > dlr
> >
> >
> >
try this:
from the main menu,
1. go to Report->Report Properties...
2. on the 'Report Properties' window go to the 'Layout' tab
3. then proceed to the Page width and Page Height controls. they have
default values of 8.5 for the width and 11 for the height.
4. Reverse the values for the width to be 11in and the height to be
8.5in
try it and let me know how it goes.
Good luck!|||I was going from a published report and switching from portrait to landscape
mode and the report was snap shot cached. In the end I deleted the report
(using RM) and re-deployed the report (from VS). after that I was fine.
dlr
"A Gutie" <fiututor@.yahoo.com> wrote in message
news:eca873f7.0409160622.58362840@.posting.google.com...
> "blackshirt" <blackshirt@.discussions.microsoft.com> wrote in message
news:<A9031067-D190-44C0-98A6-C0155B65ACE9@.microsoft.com>...
> > Dennis,
> > Did you ever find the answer. I'm having the same issu.
> >
> > Thanks
> >
> > "Dennis Redfield" wrote:
> >
> > > I have a (very simple) report where I specifiy 11 X 8.5 as the paper
size.
> > > The report renders in HTML correctly in Landscape mode. When I select
> > > and Export the report is reformated and rendered as 8.5 X 11 (portait
mode).
> > > How can I fix this?
> > >
> > > thanks
> > >
> > > dlr
> > >
> > >
> > >
> try this:
> from the main menu,
> 1. go to Report->Report Properties...
> 2. on the 'Report Properties' window go to the 'Layout' tab
> 3. then proceed to the Page width and Page Height controls. they have
> default values of 8.5 for the width and 11 for the height.
> 4. Reverse the values for the width to be 11in and the height to be
> 8.5in
> try it and let me know how it goes.
> Good luck!
Rendering without publishing?
I'm quite new to reporting services.
My Question is, how can I do this using Reporting Services?
Q. How can I preview the report (i know MS supplies a sample 'report
previewer'). But, I have to do this WITHOUT PUBLISHING this report on
to the server. i.e., I just want to use use the RENDERING part of
reporting services.
In short, I want Reporting services to "just take my connection string,
my sql and just render the report without doing anything extra like
publishing on the server, don't bother abt credentials etc.".
So far, this is what I've figured out. With a. SQL Statement, b.
ConnectionString, I know how to dynamically Generate RDL ( This, I've
figured it out.) looping through the column collection.
--
The other way that I want to do, with your help, is to pass a a
dataset, and in turn, Reporting Services renders in the format (html,
xls, pdf etc.) that I want it to using either built-in report style.
I'll greatly appreciate anybody's help in this.
Thanks,
OhMyGaw.No replies. :-(
I don't know if this makes sense, but, this is what I'm thinking how I
should do it.
Step 1. Pass SQL and Conn. string, and output format to RDL generator,
and create RDL.
Step 2. Get the URL for publishing server ( i have to do this across
multiple environments)
Step 3. Publish report with a unique filename(may be datetime
millisecond stamped).
Step 4: Render report to the user in the format that the he/she wants.
Step 5: Delete the report after rendering is complete.
Can any of you please help me if this is a viable long-term solution or
is this too dumb of a design?
Thanks in advance,
OhMyGaw...
OhMyGaw wrote:
> Hello guys,
> I'm quite new to reporting services.
> My Question is, how can I do this using Reporting Services?
> Q. How can I preview the report (i know MS supplies a sample 'report
> previewer'). But, I have to do this WITHOUT PUBLISHING this report on
> to the server. i.e., I just want to use use the RENDERING part of
> reporting services.
> In short, I want Reporting services to "just take my connection string,
> my sql and just render the report without doing anything extra like
> publishing on the server, don't bother abt credentials etc.".
> So far, this is what I've figured out. With a. SQL Statement, b.
> ConnectionString, I know how to dynamically Generate RDL ( This, I've
> figured it out.) looping through the column collection.
> --
> The other way that I want to do, with your help, is to pass a a
> dataset, and in turn, Reporting Services renders in the format (html,
> xls, pdf etc.) that I want it to using either built-in report style.
> I'll greatly appreciate anybody's help in this.
> Thanks,
> OhMyGaw.|||In SRS 2005 this is supported. The easiest way to do that is to use the
Report Viewer controls, in remote processing mode. Use
ServerReport.LoadReportDefinition to load the RDL - and it will compile it
and execute it on the fly.
Thanks
Tudor
"OhMyGaw" wrote:
> No replies. :-(
> I don't know if this makes sense, but, this is what I'm thinking how I
> should do it.
>
> Step 1. Pass SQL and Conn. string, and output format to RDL generator,
> and create RDL.
> Step 2. Get the URL for publishing server ( i have to do this across
> multiple environments)
> Step 3. Publish report with a unique filename(may be datetime
> millisecond stamped).
> Step 4: Render report to the user in the format that the he/she wants.
> Step 5: Delete the report after rendering is complete.
>
> Can any of you please help me if this is a viable long-term solution or
> is this too dumb of a design?
> Thanks in advance,
> OhMyGaw...
> OhMyGaw wrote:
> > Hello guys,
> >
> > I'm quite new to reporting services.
> >
> > My Question is, how can I do this using Reporting Services?
> >
> > Q. How can I preview the report (i know MS supplies a sample 'report
> > previewer'). But, I have to do this WITHOUT PUBLISHING this report on
> > to the server. i.e., I just want to use use the RENDERING part of
> > reporting services.
> >
> > In short, I want Reporting services to "just take my connection string,
> > my sql and just render the report without doing anything extra like
> > publishing on the server, don't bother abt credentials etc.".
> >
> > So far, this is what I've figured out. With a. SQL Statement, b.
> > ConnectionString, I know how to dynamically Generate RDL ( This, I've
> > figured it out.) looping through the column collection.
> >
> > --
> > The other way that I want to do, with your help, is to pass a a
> > dataset, and in turn, Reporting Services renders in the format (html,
> > xls, pdf etc.) that I want it to using either built-in report style.
> >
> > I'll greatly appreciate anybody's help in this.
> >
> > Thanks,
> >
> > OhMyGaw.
>
Rendering without parameter values supplied give error
Hi
I hope someone can help me out here. I'm quite new to RS so perhaps this is just me not knowing something obvious.
I have a report with several parameters, most of which have values the user can select from a list, supplied by a query. Some of these lists are filtered depending on the value of other parameters. (Eg One list has all customers, one list has all orders. If I select a customer, the order list changes to only contain orders for the selected customer.) Some of the parameters are just float or date values that do not rely on any other parameters being selected first (eg OrderDate). Some parameters have default values and some do not.
When I first go into the report in Report Manager it is fine and does not automatically render - as not all parameters have values supplied.
The problem is that as soon as I select a parameter value from the list when that value is part of the query for another parameters values, the report renders automatically - without some of the other parameters being supplied yet - and consequently errors with the rsReportParameterTypeMismatch error. (Eg I select a customer and the report renders before I can enter the OrderDate parameter.)
How can I stop the report automatically rendering before I have entered/selected values for all the parameters?
Thanks, Phaedra
I am having a very similar issue with default values creating a large report that takes a long time to render. I would like to prevent the report from firing on load and for it to wait until the "view report" button is actually pressed. Any suggestions would be welcome.Rendering without parameter values supplied give error
Hi
I hope someone can help me out here. I'm quite new to RS so perhaps this is just me not knowing something obvious.
I have a report with several parameters, most of which have values the user can select from a list, supplied by a query. Some of these lists are filtered depending on the value of other parameters. (Eg One list has all customers, one list has all orders. If I select a customer, the order list changes to only contain orders for the selected customer.) Some of the parameters are just float or date values that do not rely on any other parameters being selected first (eg OrderDate). Some parameters have default values and some do not.
When I first go into the report in Report Manager it is fine and does not automatically render - as not all parameters have values supplied.
The problem is that as soon as I select a parameter value from the list when that value is part of the query for another parameters values, the report renders automatically - without some of the other parameters being supplied yet - and consequently errors with the rsReportParameterTypeMismatch error. (Eg I select a customer and the report renders before I can enter the OrderDate parameter.)
How can I stop the report automatically rendering before I have entered/selected values for all the parameters?
Thanks, Phaedra
I am having a very similar issue with default values creating a large report that takes a long time to render. I would like to prevent the report from firing on load and for it to wait until the "view report" button is actually pressed. Any suggestions would be welcome.Rendering URL in EXCEL format
Hi Everyone,
I am trying to diaply my report on the web form by pasting the URL
in ReportViewer1.ReportPath = " " inside the codes. My URL is
/web
Test/FirstReport&rs:Command=Render&rs:Format=HTML4.0&rc:Toolbar=false
It is working fine and diaplying the report, but when I change the
Format to Excel. It does not display the report properly. It gives me
an error that report cannot be found. Same thing with PDF, when I
change the format to PDF. IT gives me the same error.
"There was error opening the file. File does not exist". In excel
format if I save the file. The file is saved but when I want to open
the file from save/open dialog box it does not display properly.
Can anyone please let me know what the problem is.
Thanks,
Hi,
Excel rendering has been a problem since the Reporting Services is used.
With the retail version some versions was not supported. SP1 added some new supported versions. And SP2 is adding more.
You may be running into such a problem.
SP2 will support Excel 97 and later versions.
SP1 supports Excel 10 (Office 2002) or later
Eralper
http://www.kodyaz.com
Rendering true Excel
the web application's rendering of reports in Excel mode are not true
Excel, but rather still retain HTML. Has anyone else experienced this?
I have included my rendering code snippet below:
--
try
{
data = render.RunReport(ConfigurationSettings.AppSettings[ePledgeConstants.REPORT_SERVER_URL_PROPERTY],
fullReportName, reportParameters, format, out
encoding,
out mimeType, out parametersUsed, out warnings,
out streamIds);
Response.Clear();
Response.ContentType = mimeType;
string fileName = report.Name +
GetFileExtension(mimeType);
if (mimeType != "text/html")
{
Response.AddHeader("Content-Disposition",
"attachment; filename=" + fileName);
}
switch(encoding)
{
case "Unicode (UTF-8)":
Response.ContentEncoding = new UTF8Encoding();
break;
case "Unicode (UTF-7)":
Response.ContentEncoding = new UTF7Encoding();
break;
default:
Response.ContentEncoding = new UTF8Encoding();
break;
}
Response.BinaryWrite(data);
}
catch (Exception exception)
{
Console.Out.Write(exception.ToString());
}
---
The run report method in turn is like this:
---
public byte[] RunReport(string ServerUrl, string ReportName,
ParameterValue[] parameters, string Format, out string encoding, out
string mimeType, out ParameterValue[] parametersUsed, out Warning[]
warnings, out string[] streamIds)
{
ReportingService rs = new ReportingService();
rs.Timeout = -1;
rs.Url = ServerUrl;
rs.Credentials = new NetworkCredential(UserName, Password);
return rs.Render(ReportName, Format, null, null, parameters, null,
null, out encoding, out mimeType, out parametersUsed, out warnings,
out streamIds);
}Have you deployed Reporting Services SP1. In SP1, we output native XLS.
-Lukasz
This posting is provided "AS IS" with no warranties, and confers no rights.
"Bryon" <blape@.whittmanhart.com> wrote in message
news:OVl$MrGGFHA.2932@.TK2MSFTNGP15.phx.gbl...
> My users are complaining that the Excel files they are getting back from
> the web application's rendering of reports in Excel mode are not true
> Excel, but rather still retain HTML. Has anyone else experienced this? I
> have included my rendering code snippet below:
> --
> try
> {
> data => render.RunReport(ConfigurationSettings.AppSettings[ePledgeConstants.REPORT_SERVER_URL_PROPERTY],
> fullReportName, reportParameters, format, out
> encoding,
> out mimeType, out parametersUsed, out warnings, out
> streamIds);
> Response.Clear();
> Response.ContentType = mimeType;
> string fileName = report.Name +
> GetFileExtension(mimeType);
> if (mimeType != "text/html")
> {
> Response.AddHeader("Content-Disposition",
> "attachment; filename=" + fileName);
> }
> switch(encoding)
> {
> case "Unicode (UTF-8)":
> Response.ContentEncoding = new UTF8Encoding();
> break;
> case "Unicode (UTF-7)":
> Response.ContentEncoding = new UTF7Encoding();
> break;
> default:
> Response.ContentEncoding = new UTF8Encoding();
> break;
> }
> Response.BinaryWrite(data);
> }
> catch (Exception exception)
> {
> Console.Out.Write(exception.ToString());
> }
> ---
> The run report method in turn is like this:
> ---
> public byte[] RunReport(string ServerUrl, string ReportName,
> ParameterValue[] parameters, string Format, out string encoding, out
> string mimeType, out ParameterValue[] parametersUsed, out Warning[]
> warnings, out string[] streamIds)
> {
> ReportingService rs = new ReportingService();
> rs.Timeout = -1;
> rs.Url = ServerUrl;
> rs.Credentials = new NetworkCredential(UserName, Password);
> return rs.Render(ReportName, Format, null, null, parameters, null,
> null, out encoding, out mimeType, out parametersUsed, out warnings, out
> streamIds);
> }|||Lukasz Pawlowski [MSFT] wrote:
> Have you deployed Reporting Services SP1. In SP1, we output native XLS.
> -Lukasz
>
Yes I have.
An interesting side note to this problem is that on a Mac, it only sees
the HTML, never the Excel information. In Windows, the file looks like
Excel, but does not save as Excel.
Also, is there a way to display gridlines? The Excel comes back as
Excel for the web and does not have gridlines by default.|||Grid lines are based on how you designed your report. If you created for
example a table with inner boarders, you should see grid lines.
Are you supplying any device info parameters to your excel rendering?
-Lukasz
This posting is provided "AS IS" with no warranties, and confers no rights.
"Bryon" <blape@.whittmanhart.com> wrote in message
news:%23ynRKTHGFHA.128@.TK2MSFTNGP14.phx.gbl...
> Lukasz Pawlowski [MSFT] wrote:
>> Have you deployed Reporting Services SP1. In SP1, we output native XLS.
>> -Lukasz
>>
> Yes I have.
> An interesting side note to this problem is that on a Mac, it only sees
> the HTML, never the Excel information. In Windows, the file looks like
> Excel, but does not save as Excel.
> Also, is there a way to display gridlines? The Excel comes back as Excel
> for the web and does not have gridlines by default.|||Lukasz Pawlowski [MSFT] wrote:
> Grid lines are based on how you designed your report. If you created for
> example a table with inner boarders, you should see grid lines.
> Are you supplying any device info parameters to your excel rendering?
> -Lukasz
>
I'm not sure what you mean by device parameters.
Rendering to TXT format
I want to render my report as a .TXT file. How can I do that?
Thanks
NidheeNidhee,
You have at least two options:
1. Render the report as a comma-separated values (CSV) file. See BOL for CSV
Device Information Settings.
2. If CSV isn't not a good option, you can render the report in XML (look at
the DataOutput tab on the report properties) and apply a XSL transformation
to adjust it output the way you want it.
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"Nidhee" <nidhee@.gmail.com> wrote in message
news:6810c390.0409070139.6cd6374f@.posting.google.com...
> Hi,
> I want to render my report as a .TXT file. How can I do that?
> Thanks
> Nidhee|||Hi, Teo,
I chosed the 2nd way. But I have a problem with "&" characters. All "&"s are
replaced with "&"
Do you have any idea to solve my problem?
I have also the following line in my code.
<xsl:output method="text" encoding="utf-8" media-type="text/plain" />
Thanks...
"Teo Lachev" wrote:
> Nidhee,
> You have at least two options:
> 1. Render the report as a comma-separated values (CSV) file. See BOL for CSV
> Device Information Settings.
> 2. If CSV isn't not a good option, you can render the report in XML (look at
> the DataOutput tab on the report properties) and apply a XSL transformation
> to adjust it output the way you want it.
> --
> Hope this helps.
> ----
> Teo Lachev, MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> Publisher website: http://www.manning.com/lachev
> Buy it from Amazon.com: http://shrinkster.com/eq
> Home page and blog: http://www.prologika.com/
> ----
> "Nidhee" <nidhee@.gmail.com> wrote in message
> news:6810c390.0409070139.6cd6374f@.posting.google.com...
> > Hi,
> >
> > I want to render my report as a .TXT file. How can I do that?
> >
> > Thanks
> > Nidhee
>
>|||Not sure if it will help but try disable-output-escaping="yes". See also
Q315717 HOW TO: Disable Output Escaping in XML Style Sheet Transformations.
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"eralper" <eralper@.discussions.microsoft.com> wrote in message
news:A6744945-A34B-4E42-B9B3-926F43E61756@.microsoft.com...
> Hi, Teo,
> I chosed the 2nd way. But I have a problem with "&" characters. All "&"s
are
> replaced with "&"
> Do you have any idea to solve my problem?
> I have also the following line in my code.
> <xsl:output method="text" encoding="utf-8" media-type="text/plain" />
> Thanks...
> "Teo Lachev" wrote:
> > Nidhee,
> >
> > You have at least two options:
> >
> > 1. Render the report as a comma-separated values (CSV) file. See BOL for
CSV
> > Device Information Settings.
> > 2. If CSV isn't not a good option, you can render the report in XML
(look at
> > the DataOutput tab on the report properties) and apply a XSL
transformation
> > to adjust it output the way you want it.
> >
> > --
> > Hope this helps.
> >
> > ----
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com: http://shrinkster.com/eq
> > Home page and blog: http://www.prologika.com/
> > ----
> >
> > "Nidhee" <nidhee@.gmail.com> wrote in message
> > news:6810c390.0409070139.6cd6374f@.posting.google.com...
> > > Hi,
> > >
> > > I want to render my report as a .TXT file. How can I do that?
> > >
> > > Thanks
> > > Nidhee
> >
> >
> >
Rendering to PDF format
I have a problem with rendering report to PDF format. I created report using
my own report designer, developed for our company commercial product. There
is no problem to render report to some other format like HTML or IMAGE. But
when I render report to PDF format some of information simply disappears from
result report. There are empty spaces instead of printed values. Are there
any special definitions I have to make to each object, and what are the
different between, for example, HTML and PDF format from SQL reporting
services point of view.
Thanks!
Igor.The same thing is happening to me when I render a report with an embedded
image to pdf. I can either open or save the pdf, but upon reviewing the file
pieces of the report simply disappear. When I click to print, it is
completely blank.
"Igor" wrote:
> Hi everyone!
> I have a problem with rendering report to PDF format. I created report using
> my own report designer, developed for our company commercial product. There
> is no problem to render report to some other format like HTML or IMAGE. But
> when I render report to PDF format some of information simply disappears from
> result report. There are empty spaces instead of printed values. Are there
> any special definitions I have to make to each object, and what are the
> different between, for example, HTML and PDF format from SQL reporting
> services point of view.
> Thanks!
> Igor.
rendering to multiple Excel Workbooks from one Report in Reporting Services 2005
Hi Folks,
Is there a way in Reporting Services 2005 to render 1 report into multiple Excel Workbooks?
The report we have already renders to multiple Excel "pages" from the Report, but we need to find out if we can also break and render into a NEW Workbook, based on Groups, for example.
Thanks in advance for any help.
Glen Plantz
Sorry, it's not possible to export one report to multiple workbooks.
You could possibly achieve this by requesting multiple exports with each one receiving different parameter values.
-chris
rendering to multiple Excel Workbooks from one Report in Reporting Services 2005
Hi Folks,
Is there a way in Reporting Services 2005 to render 1 report into multiple Excel Workbooks?
The report we have already renders to multiple Excel "pages" from the Report, but we need to find out if we can also break and render into a NEW Workbook, based on Groups, for example.
Thanks in advance for any help.
Glen Plantz
Sorry, it's not possible to export one report to multiple workbooks.
You could possibly achieve this by requesting multiple exports with each one receiving different parameter values.
-chris
Rendering to Excel: numbers stored as text
little green triangle in the upper corner of each cell alerts the viewer of
the problem).
While this seems innocuous, it means that a user can't do typical Excel
operations, like highlighting cells and creating a graph, or highlighing and
viewing the totals on the status bar. Although there's a number in the cell,
it acts like text.
Not all of my reports are doing this, but I'm having major trouble figuring
out the differences between those which are, and those which are not. Also,
I can't find any documentation about how the rendering makes this
determination.
Thank you!It appears I've finally found the solution. Since I knew I wasn't *really*
aggregating any values, I was using First() as my aggregation formula. When
I switched to Sum() as my aggregation, the result was forced to be numeric,
even through the Excel rendering.
How was anyone supposed to figure this out without documentation!? I mean,
if the fundamental data is numeric, then why should First( ) change it to
text? That seems SO arbitrary...!
I hope this helps someone to NOT pull their hair out like I did.
"mr_bert" wrote:
> Some of my reports are rendering to Excel with numbers stored as text (the
> little green triangle in the upper corner of each cell alerts the viewer of
> the problem).
> While this seems innocuous, it means that a user can't do typical Excel
> operations, like highlighting cells and creating a graph, or highlighing and
> viewing the totals on the status bar. Although there's a number in the cell,
> it acts like text.
> Not all of my reports are doing this, but I'm having major trouble figuring
> out the differences between those which are, and those which are not. Also,
> I can't find any documentation about how the rendering makes this
> determination.
> Thank you!|||Thanks
This just saved me a day of pulling my hair out
Rendering to Excel, multiple sheets
have it setup to have a page break. This causes each table to be written to
a different sheet within the excel workbook. This is fine. What I would
like to know is if there is a way to write the table name to the excel
workbook tab when the report is rendered instead of having the tabs show
sheet1, sheet2, etc. DOes anyone know how or if this can be done?
Thanks for your help,
sOn Oct 11, 10:24 am, Susan R <Sus...@.discussions.microsoft.com> wrote:
> I am rendering a report from RS that has multiple tables. After each table I
> have it setup to have a page break. This causes each table to be written to
> a different sheet within the excel workbook. This is fine. What I would
> like to know is if there is a way to write the table name to the excel
> workbook tab when the report is rendered instead of having the tabs show
> sheet1, sheet2, etc. DOes anyone know how or if this can be done?
> Thanks for your help,
> s
Several people have asked this same question on these forums w/pretty
much the same response: this is not currently possible in SSRS. Sorry
that I could not be of greater assistance.
Regards,
Enrique Martinez
Sr. Software Consultant|||Hi,
I never tried it my myself, but facing the same problem I found
http://www.spacefold.com/lisa/post/Changing-the-Sheet-names-in-SQL-Server-RS-Excel-QnD-XSLT.aspx
Seems to do the job, but is a little tricky to setup and works only for
excel 2003 and newer.
Simon
"Susan R" wrote:
> I am rendering a report from RS that has multiple tables. After each table I
> have it setup to have a page break. This causes each table to be written to
> a different sheet within the excel workbook. This is fine. What I would
> like to know is if there is a way to write the table name to the excel
> workbook tab when the report is rendered instead of having the tabs show
> sheet1, sheet2, etc. DOes anyone know how or if this can be done?
> Thanks for your help,
> s
Rendering to Excel - Crash - Server Application Unavailable - Out of RAM
63,000. When I run the report all goes to plan and the data it
brought back and I can page through its 1336 returned pages. But I
need to be able to export all of this data ro excel, but when I try it
works away for a bit before eventually "crashing" and returning -
"
Server Application Unavailable
The web application you are attempting to access on this web server is
currently unavailable. Please hit the "Refresh" button in your web
browser to retry your request.
Administrator Note: An error message detailing the cause of this
specific request failure can be found in the application event log of
the web server. Please review this log entry to discover what caused
this error to occur.
"
In the loogs it says -
aspnet_wp.exe (PID: 2352) was recycled because memory consumption
exceeded the 306 MB (60 percent of available RAM).
yet I can go to Excel and go Data - Import External Data - New
Database Query and run the sql from there and export it to excel and
it works fine, and pretty quickly.
Is there anyway around this' I need to find someway to be able to
render my report from my reporting application in Excel for clients...
ThanksUnfortunately Reporting Services was designed to handle very big reports
since it renders 'in memory'. As you've seen from your error the server is
running out of memory. You could try to redesign the report into smaller
reports or try adding more memory on the server.
--
Adrian M.
MCP
"Gearoid" <gearoid_healy@.yahoo.com> wrote in message
news:3d6ebe80.0503300120.1b92ac6f@.posting.google.com...
>I have a very simple report which generates a large amount or rows -
> 63,000. When I run the report all goes to plan and the data it
> brought back and I can page through its 1336 returned pages. But I
> need to be able to export all of this data ro excel, but when I try it
> works away for a bit before eventually "crashing" and returning -
> "
> Server Application Unavailable
> The web application you are attempting to access on this web server is
> currently unavailable. Please hit the "Refresh" button in your web
> browser to retry your request.
> Administrator Note: An error message detailing the cause of this
> specific request failure can be found in the application event log of
> the web server. Please review this log entry to discover what caused
> this error to occur.
> "
> In the loogs it says -
> aspnet_wp.exe (PID: 2352) was recycled because memory consumption
> exceeded the 306 MB (60 percent of available RAM).
> yet I can go to Excel and go Data - Import External Data - New
> Database Query and run the sql from there and export it to excel and
> it works fine, and pretty quickly.
> Is there anyway around this' I need to find someway to be able to
> render my report from my reporting application in Excel for clients...
> Thanks|||> Unfortunately Reporting Services wasn't designed to handle very big
> reports since it renders 'in memory'.
--
Adrian M.
MCP
"Adrian M." <absolutelynospam@.nodomain_.com> wrote in message
news:uClX4mSNFHA.2468@.tk2msftngp13.phx.gbl...
> Unfortunately Reporting Services was designed to handle very big reports
> since it renders 'in memory'. As you've seen from your error the server
> is running out of memory. You could try to redesign the report into
> smaller reports or try adding more memory on the server.
> --
> Adrian M.
> MCP
> "Gearoid" <gearoid_healy@.yahoo.com> wrote in message
> news:3d6ebe80.0503300120.1b92ac6f@.posting.google.com...
>>I have a very simple report which generates a large amount or rows -
>> 63,000. When I run the report all goes to plan and the data it
>> brought back and I can page through its 1336 returned pages. But I
>> need to be able to export all of this data ro excel, but when I try it
>> works away for a bit before eventually "crashing" and returning -
>> "
>> Server Application Unavailable
>> The web application you are attempting to access on this web server is
>> currently unavailable. Please hit the "Refresh" button in your web
>> browser to retry your request.
>> Administrator Note: An error message detailing the cause of this
>> specific request failure can be found in the application event log of
>> the web server. Please review this log entry to discover what caused
>> this error to occur.
>> "
>> In the loogs it says -
>> aspnet_wp.exe (PID: 2352) was recycled because memory consumption
>> exceeded the 306 MB (60 percent of available RAM).
>> yet I can go to Excel and go Data - Import External Data - New
>> Database Query and run the sql from there and export it to excel and
>> it works fine, and pretty quickly.
>> Is there anyway around this' I need to find someway to be able to
>> render my report from my reporting application in Excel for clients...
>> Thanks
>|||Adrian M. wrote:
> Unfortunately Reporting Services was designed to handle very big reports
> since it renders 'in memory'. As you've seen from your error the server is
> running out of memory. You could try to redesign the report into smaller
> reports or try adding more memory on the server.
>
"try adding more memory on the server" - COOL! Worst recomendation ever
seen! How about to redesign RS? Why I don't have such problems in "old
fashion" developing (pre-dotnet)?
For example, I have some data. If I'll export this data as CSV then it
tools 10 MB. But then I'm truing to export same data as Excel - server
dies and tooks 400MB of RAM. My personal "reporter" tooks much less
resources! I this normal? Is this problem with my server?
I think - not. This is problem of R$ and M$.
How I can use RS for ENTERPRISE reporting if it cannot work with large
amounts of data? Only with tiny data (1000 records or less).
Also RS has huge memory management issues. How about to give away unused
memory back to system? Where is magical GC?|||I actually have some suggestions for you to try, but after your rant I have
decided not to share them with you.
--
Adrian M.
MCP
"Alexey Pavlov" <alexey_pavlov@.navigator.lv> wrote in message
news:umsEHynNFHA.3728@.TK2MSFTNGP10.phx.gbl...
> Adrian M. wrote:
>> Unfortunately Reporting Services was designed to handle very big reports
>> since it renders 'in memory'. As you've seen from your error the server
>> is running out of memory. You could try to redesign the report into
>> smaller reports or try adding more memory on the server.
> "try adding more memory on the server" - COOL! Worst recomendation ever
> seen! How about to redesign RS? Why I don't have such problems in "old
> fashion" developing (pre-dotnet)?
> For example, I have some data. If I'll export this data as CSV then it
> tools 10 MB. But then I'm truing to export same data as Excel - server
> dies and tooks 400MB of RAM. My personal "reporter" tooks much less
> resources! I this normal? Is this problem with my server?
> I think - not. This is problem of R$ and M$.
> How I can use RS for ENTERPRISE reporting if it cannot work with large
> amounts of data? Only with tiny data (1000 records or less).
> Also RS has huge memory management issues. How about to give away unused
> memory back to system? Where is magical GC?|||Adrian,
I have encountered the same issues with Reporting Services when over 90,000
records are being returned to a report. I am using a dedicated server with
2gb of RAM. We are currently getting an extra 2gb to assist in the load, but
I was wondering what your other options were other than reducing the criteria
of the report.
Any help you may be able to provide would be greatly appreciated.
"Adrian M." wrote:
> I actually have some suggestions for you to try, but after your rant I have
> decided not to share them with you.
> --
> Adrian M.
> MCP
>
> "Alexey Pavlov" <alexey_pavlov@.navigator.lv> wrote in message
> news:umsEHynNFHA.3728@.TK2MSFTNGP10.phx.gbl...
> > Adrian M. wrote:
> >> Unfortunately Reporting Services was designed to handle very big reports
> >> since it renders 'in memory'. As you've seen from your error the server
> >> is running out of memory. You could try to redesign the report into
> >> smaller reports or try adding more memory on the server.
> >>
> >
> > "try adding more memory on the server" - COOL! Worst recomendation ever
> > seen! How about to redesign RS? Why I don't have such problems in "old
> > fashion" developing (pre-dotnet)?
> >
> > For example, I have some data. If I'll export this data as CSV then it
> > tools 10 MB. But then I'm truing to export same data as Excel - server
> > dies and tooks 400MB of RAM. My personal "reporter" tooks much less
> > resources! I this normal? Is this problem with my server?
> > I think - not. This is problem of R$ and M$.
> >
> > How I can use RS for ENTERPRISE reporting if it cannot work with large
> > amounts of data? Only with tiny data (1000 records or less).
> >
> > Also RS has huge memory management issues. How about to give away unused
> > memory back to system? Where is magical GC?
>
>|||See my response to your other post.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"William Foster" <WilliamFoster@.discussions.microsoft.com> wrote in message
news:63F7E982-CCE1-43E7-A077-DB8B4240D35C@.microsoft.com...
> Adrian,
> I have encountered the same issues with Reporting Services when over
90,000
> records are being returned to a report. I am using a dedicated server
with
> 2gb of RAM. We are currently getting an extra 2gb to assist in the load,
but
> I was wondering what your other options were other than reducing the
criteria
> of the report.
> Any help you may be able to provide would be greatly appreciated.
> "Adrian M." wrote:
> > I actually have some suggestions for you to try, but after your rant I
have
> > decided not to share them with you.
> >
> > --
> > Adrian M.
> > MCP
> >
> >
> > "Alexey Pavlov" <alexey_pavlov@.navigator.lv> wrote in message
> > news:umsEHynNFHA.3728@.TK2MSFTNGP10.phx.gbl...
> > > Adrian M. wrote:
> > >> Unfortunately Reporting Services was designed to handle very big
reports
> > >> since it renders 'in memory'. As you've seen from your error the
server
> > >> is running out of memory. You could try to redesign the report into
> > >> smaller reports or try adding more memory on the server.
> > >>
> > >
> > > "try adding more memory on the server" - COOL! Worst recomendation
ever
> > > seen! How about to redesign RS? Why I don't have such problems in "old
> > > fashion" developing (pre-dotnet)?
> > >
> > > For example, I have some data. If I'll export this data as CSV then it
> > > tools 10 MB. But then I'm truing to export same data as Excel - server
> > > dies and tooks 400MB of RAM. My personal "reporter" tooks much less
> > > resources! I this normal? Is this problem with my server?
> > > I think - not. This is problem of R$ and M$.
> > >
> > > How I can use RS for ENTERPRISE reporting if it cannot work with large
> > > amounts of data? Only with tiny data (1000 records or less).
> > >
> > > Also RS has huge memory management issues. How about to give away
unused
> > > memory back to system? Where is magical GC?
> >
> >
> >
rendering to browser instead to file
instead to a file? I tried this code below wich works fine for pdf
rendering:
result = rs.Render("/MyReports/SVREL00104", "Excel", Nothing, _
Nothing, params, Nothing, _
Nothing, encoding, mime, history, warnings, streamsId)
Page.Response.ClearContent()
Page.Response.ClearHeaders()
Page.Response.ContentType = mime
Page.Response.BinaryWrite(result)
Page.Response.Flush()
Page.Response.Close()
This code should load the excel into the web browser window, but I'm getting
this errors:
1. A message box saying: The Microsoft Excel can not access the file:
'http://localhost/MyReports/test.aspx'.
2. An input box asking for an alternate name for 'Titulos_de_Impressao'
(Print Title) because this is already an internal name.
Any ideas?
[]s
Renato
--
----
Renato Aloi
Analista Programador
J&W Informática Ltda.
+55 11 30406675If you can tolerate a dialog box asking if the user wants to open or save,
this will work:
Response.ClearContent();
Response.ClearHeaders();
Response.AppendHeader("Content-Disposition",
"attachment;filename=\"MyReport.xls\"");
Response.BinaryWrite(result);
Response.End();
It works for PDF as well. There may be other ways, but this worked for us
so we stuck with it.
"Renato Aloi" wrote:
> Did anyone have rendered a report in excel format directly to browser
> instead to a file? I tried this code below wich works fine for pdf
> rendering:
> result = rs.Render("/MyReports/SVREL00104", "Excel", Nothing, _
> Nothing, params, Nothing, _
> Nothing, encoding, mime, history, warnings, streamsId)
> Page.Response.ClearContent()
> Page.Response.ClearHeaders()
> Page.Response.ContentType = mime
> Page.Response.BinaryWrite(result)
> Page.Response.Flush()
> Page.Response.Close()
> This code should load the excel into the web browser window, but I'm getting
> this errors:
> 1. A message box saying: The Microsoft Excel can not access the file:
> 'http://localhost/MyReports/test.aspx'.
> 2. An input box asking for an alternate name for 'Titulos_de_Impressao'
> (Print Title) because this is already an internal name.
> Any ideas?
> []s
> Renato
> --
> ----
> Renato Aloi
> Analista Programador
> J&W Informática Ltda.
> +55 11 30406675
>
>|||Thanks for your idea, Debra. Though I was really trying to avoid these
dialog boxes. In fact I am 'translating' all my systems' reports from
Crystal Reports to Reporting Services. The problem is my clients are already
using my systems with this export option to excel, without needing to save
any file. If I barelly whisper that they will need to take more clicks to do
something that is already working well, I will be exterminated.
However, I think the approach i will adopt is save a file to disk then use
this code:
Page.Response.ClearContent()
Page.Response.ClearHeaders()
Page.Response.ContentType = mime
Page.Response.WriteFile(savedFile)
Page.Response.Flush()
Page.Response.Close()
This approach works fine without any dialog boxes. The problem is at my
clients using web farms with load balance. I am afraid of exceptions, like
file not found.
Any other ideas, let me know, please.
[]s
Renato
"debra doty" <debradoty@.discussions.microsoft.com> escreveu na mensagem
news:22D7671D-13F2-413F-84B8-022E222F3A4C@.microsoft.com...
> If you can tolerate a dialog box asking if the user wants to open or save,
> this will work:
> Response.ClearContent();
> Response.ClearHeaders();
> Response.AppendHeader("Content-Disposition",
> "attachment;filename=\"MyReport.xls\"");
> Response.BinaryWrite(result);
> Response.End();
> It works for PDF as well. There may be other ways, but this worked for us
> so we stuck with it.
>
> "Renato Aloi" wrote:
> > Did anyone have rendered a report in excel format directly to browser
> > instead to a file? I tried this code below wich works fine for pdf
> > rendering:
> >
> > result = rs.Render("/MyReports/SVREL00104", "Excel", Nothing, _
> > Nothing, params, Nothing, _
> > Nothing, encoding, mime, history, warnings, streamsId)
> >
> > Page.Response.ClearContent()
> > Page.Response.ClearHeaders()
> > Page.Response.ContentType = mime
> > Page.Response.BinaryWrite(result)
> > Page.Response.Flush()
> > Page.Response.Close()
> >
> > This code should load the excel into the web browser window, but I'm
getting
> > this errors:
> >
> > 1. A message box saying: The Microsoft Excel can not access the file:
> > 'http://localhost/MyReports/test.aspx'.
> >
> > 2. An input box asking for an alternate name for 'Titulos_de_Impressao'
> > (Print Title) because this is already an internal name.
> >
> > Any ideas?
> >
> > []s
> > Renato
> >
> > --
> > ----
> > Renato Aloi
> > Analista Programador
> > J&W Informática Ltda.
> > +55 11 30406675
> >
> >
> >
Rendering the ASP.NET local report directly to PDF
Hi,
Since it is not possible to print from a local report in ASP.Net is there anyway to directly render to a PDF or hide the Local report rendering and automatically goto the PDF either in the web page or as a popup.
Thanks
Hi,
You can try this code:
string path = @."D:/Folder/MyFile.pdf"; if (buffer != null
WebClient client = new WebClient();
Byte[] buffer = client.DownloadData(path);
{
Response.ContentType = "application/pdf";
Response.AddHeader("content-length",buffer.Length.ToString());
Response.BinaryWrite(buffer);
}
Hope this helps,
Vivek
|||Can this be done on a report on a server and a parameter is passed?
For example, when a button is clicked in a page, then it will pass a parameter to SSRS and then, in turn, returns a PDF file. (So there's no need for a report viewer)
I am not sure if its possible. Please advise. Thanks!
Lloyd
|||
Lloyd,
How are you returning the PDF file? SSRS will return only data (I do not have much experience in SSRS), I have worked on Crystal Reports and it exported idrectly to PDF.
If you have data then you can format and show it to PDF. You can change the Response.ContentType as I mentioned before or use some tools like:
http://www.websupergoo.com/abcpdf-1.htm
Hope this helps,
Vivek
|||Hi!
Thanks for the reply!
I'm thinking if this can be done. When I click the "Print" button, the report will be generated (PDF), and the standard pop up message of browser would come up, asking if the user would want to open or save the generated file.
Lloyd
|||
Lloyd,
You can first call the SSRS on the Print button click and then bind the resulting data to some data bound control, such as a DataGrid or GridView. After the bind, you can change the Response.ContentType property to "pdf". See my blog entry for details:
http://geekswithblogs.com/vivek
You can also try an Open Source PDF Report Server Control:http://sourceforge.net/projects/npdf/
Hope this helps,
Vivek
|||Try this:
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
Dim rs As New msfirm_db_stl.ReportingService
'rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim myCred As New NetworkCredential("Username", "Password", "Domain")
rs.Credentials = myCred
' Render arguments
Dim result As Byte() = Nothing
Dim reportPath As String = "/ImportedReports/" & Me.ReportName
Dim format As String = Me.ReportFormat
Dim historyID As String = Nothing
Dim devInfo As String = "<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>"
' Prepare report parameter.
Dim params() As String
params = Me.Parameters.Split("&")
Dim nParams As Integer = 0
Dim parameters() As msfirm_db_stl.ParameterValue
If params.Length > 0 And Me.Parameters <> String.Empty Then
ReDim parameters(IIf(params.Length > 0, params.Length - 1, 0))
For Each s As String In params
If s <> String.Empty Then
Dim keyval() As String = s.Split("=")
parameters(nParams) = New msfirm_db_stl.ParameterValue
parameters(nParams).Name = keyval(0)
parameters(nParams).Value = keyval(1)
nParams += 1
End If
Next
End If
Dim testparms() As msfirm_db_stl.ReportParameter = rs.GetReportParameters(reportPath, historyID, False, Nothing, Nothing)
If (testparms.Length.ToString) <> (nParams.ToString) Then
Response.Redirect(ConfigurationSettings.AppSettings.Get("ReportServerURL") & "?%2fImportedReports%2f" & Me.ReportName & "&rs%3aCommand=Render&rs%3aFormat=HTML4.0&rc%3aToolbar=True&rc%3aJavaScript=True")
End If
'Set Web Service user credentials
Dim credentials As msfirm_db_stl.DataSourceCredentials() = Nothing
Dim showHideToggle As String = Nothing
Dim encoding As String
Dim mimeType As String
Dim warnings As msfirm_db_stl.Warning() = Nothing
Dim reportHistoryParameters As msfirm_db_stl.ParameterValue() = Nothing
Dim streamIDs As String() = Nothing
Dim sh As New msfirm_db_stl.SessionHeader
rs.SessionHeaderValue = sh
Try
result = rs.Render(reportPath, format, historyID, devInfo, parameters, credentials, showHideToggle, encoding, mimeType, reportHistoryParameters, warnings, streamIDs)
sh.SessionId = rs.SessionHeaderValue.SessionId
Catch ex As SoapException
End Try
'' Write the contents of the report to an MHTML file.
Try
Response.Buffer = True
Select Case Me.ReportFormat
Case "EXCEL"
Response.ContentType = "application/vnd.ms-excel"
Case "HTML4.0", "HTMLOWC"
Response.ContentType = "text/html"
Case "PDF"
Response.ContentType = "Application/PDF"
End Select
'Response.AddHeader("Content-Disposition", "attachment;filename=" & Me.ReportName & ".pdf")
Response.BinaryWrite(result)
Catch ex As Exception
End Try
End Sub
Rendering RTF in SQL Server 2005 Reporting Services
text, which is stored in SQL Server, within reports. Does anyone know of a
vendor that has an RTF rendering extension?
p.s. I am suprised this was never in Reporting Services.Hi Chris,
Thanks for posting.
As for the RTF rendering extension, it is still not included in the SQL
Server Reporting Service 2005 and I haven't found any existing 3rd party
rendering extension so far. However, since there does exists many 3rd
party PDF/RTF , HTML/RTF converting tools, I think this should one
possible approach for customizing a own RTF report rendering extension or
just convert the report externally.
BTW, since I also think this is a good an reasonable feature, you may
consider submit this suggestion on the MSDN product feedback center also:
http://lab.msdn.microsoft.com/productfeedback/default.aspx
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
rendering reports without a server
I read a book (Pro SQL Server Reporting Services) that mentioned that SRS
2005 will give users the capability to render reports without a server.
Well, I now have SRS 2005 but I still cannot see how this is done. How does
one render reports without a server? Is it because of the Report Viewer
control? If so, in what way is it possible to render reports w/o the server?
Here is the text from the book (my apologies to the publisher)
"For many software projects, one of the main limitations of SRS 2000 was
that it required you to have a server running SRS. This made it difficult or
impossible in some environments, and in certain scenarios, to utilize SRS as
the reporting mechanismâ'for example, if you had a user with a laptop who
needed to run reports while disconnected from the network where your SRS
server was located. As a result, users often fell back on technologies such
as Business Objects Crystal Reports or Data Dynamics Active Reports. With SRS
2005, this problem has been solved. The same new rendering controls that make
it easier to render your reports with SRS 2005 make it possible to render
them without a server at all.
These new controls can render reports without the need to have access to an
SRS server. With SRS 2005, you now have a single technology reporting system
that can provide a viable solution across a wide variety of applications and
circumstances. No longer will you have to use one technology for applications
without access to a server and an entirely different and incompatible
technology for those applications with access to a server.
This implementation is well thought out and well implemented in SRS 2005.
The controls use the same RDL as the SRS server and offer the option to
render reports locally without the need for an SRS server. Local report
rendering supports background processing and offline snapshots, thus
providing a very powerful solution for a variety of needs. With local
rendering you can distribute report generation to local systems, provide
reporting capabilities to users while disconnected from the network, and
more. You can also use the same control to view reports rendered by an SRS
server. This gives you a great option to use the same user interface
regardless of whether or not you have an SRS server.
The beauty of this is that the exact same report can be deployed two
different ways depending on your need. You can deploy directly to a desktop
system where connectivity to an SRS server is not desirable or possible, and
to an SRS server when scalability and enterprise features such as report
history, running reports on a schedule, and push delivery are important. This
also offers some great options if you need to generate reports on
applications running on a laptop.PacMan wrote:
> Well, I now have SRS 2005 but I still cannot see how this is done.
> How does one render reports without a server? Is it because of the
> Report Viewer control? If so, in what way is it possible to render
> reports w/o the server?
Add a reference to Microsoft.ReportViewer.WinForms.
Now you'll find in the Microsoft.Reporting.WinForms namespace is a class
called LocalReport. This is what you need to use to do the work.
Generating the report is absolute simplicity. Create your .rdl file using
the SQL Server 2005 Business Intelligence Development Studio (or
alternatively, create an .rdlc file by adding a Report to a standard VS2005
project -- but you'll get no preview window this way, so the BIDS approach
is superior IMO). Then create a LocalReport object and provide it with the
.rdl file (using the LoadReportDefinition method).
Now you need to provide data for each of the DataSources in the .rdl file.
Do this by adding ReportDataSource objects to the LocalReport's DataSources
collection. Each ReportDataSource should be initialised with two parameters:
the name of the DataSource (as defined within your .rdl definition) and a
DataTable object (that contains the data to be included within the report).
Finally, call the Render method as follows:
document = report.Render("PDF", Nothing, Nothing, Nothing, Nothing,
Nothing, Nothing)
This will return a byte-array inside which will be the rendered report.
That's it.
Note however that charts in PDF documents are rendered UNCOMPRESSED. This
results in absolutely huge PDF files (a report I made that contained a
couple of charts that rendered at 70KB on the server was generated at a
little over 7MB by the ReportViewer).
HTH,
--
(O)enone|||One additional thing to note. If you installed sut the Business Intelligence
Development Studio I don't think that the controls come with it. The
controls come with Visual Studio.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Oenone" <oenone@.nowhere.com> wrote in message
news:uogWt%23sNGHA.208@.tk2msftngp13.phx.gbl...
> PacMan wrote:
>> Well, I now have SRS 2005 but I still cannot see how this is done.
>> How does one render reports without a server? Is it because of the
>> Report Viewer control? If so, in what way is it possible to render
>> reports w/o the server?
> Add a reference to Microsoft.ReportViewer.WinForms.
> Now you'll find in the Microsoft.Reporting.WinForms namespace is a class
> called LocalReport. This is what you need to use to do the work.
> Generating the report is absolute simplicity. Create your .rdl file using
> the SQL Server 2005 Business Intelligence Development Studio (or
> alternatively, create an .rdlc file by adding a Report to a standard
> VS2005 project -- but you'll get no preview window this way, so the BIDS
> approach is superior IMO). Then create a LocalReport object and provide it
> with the .rdl file (using the LoadReportDefinition method).
> Now you need to provide data for each of the DataSources in the .rdl file.
> Do this by adding ReportDataSource objects to the LocalReport's
> DataSources collection. Each ReportDataSource should be initialised with
> two parameters: the name of the DataSource (as defined within your .rdl
> definition) and a DataTable object (that contains the data to be included
> within the report).
> Finally, call the Render method as follows:
> document = report.Render("PDF", Nothing, Nothing, Nothing, Nothing,
> Nothing, Nothing)
> This will return a byte-array inside which will be the rendered report.
> That's it.
> Note however that charts in PDF documents are rendered UNCOMPRESSED. This
> results in absolutely huge PDF files (a report I made that contained a
> couple of charts that rendered at 70KB on the server was generated at a
> little over 7MB by the ReportViewer).
> HTH,
> --
> (O)enone
>
Rendering Reports with IE7
Ever since I have installed IE7 I keep getting prompted to log in several times. It seems to work fine with IE6. Any help would be great
Thanks
Will
Do you see a status band on the top of the page prompting to enable Intranet settings?Rendering reports using SOAP API vsURL Addressing
I have been developing a reporting services application and have had to rely
on rendering using the web service API.
Before I go any further let me explain why we are going this way instead
of using URL addressing.
The client has a couple of reports where the selection criteria can get quite
long and in the past has exceeded the number of characters allowed in the
querystring. This will obvious cause the eport gen to fail.
Ok now that the background is over, here are some things I hope to find out.
First, is there anyway to use the URL addressing via POSTing the variables
to the report server or do all params have to be in the querystring?
Next, since I do not think the POSTing will work, is there any way with SP2
or a hot fix that there is a way to get the total number of pages in a report
that is rendered to HTML? I have found two hacks out there so far. First
the suggestion of rendering the entire report via the API then counting the
number of <HR> tags to ge tthe total number of pages. The second method,
found here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_prog_intro_7vqa.asp,
suggests to render the first page of the report as an image then get the
length + 1 of the streamId's parameter.
The first method, may work but I cant imagine it would be good on reports
where there is 50 or 60 pages. The second method does not seem to work for
us. When we fire the code against a report that has two pages it gives us
back a streamId.Length of 5.
Finally, I can not imagine that I am the only one that has had the issue
of not being able to call URL address to get my report due to param length.
Has anyone else encountered this and if so how did they get around it.
Thanks for any guidance,
RichPOST should work.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Rich" <rich@.online.nospam> wrote in message
news:923159632507411681250000@.msnews.microsoft.com...
> Hello,
> I have been developing a reporting services application and have had to
> rely on rendering using the web service API.
> Before I go any further let me explain why we are going this way instead
> of using URL addressing.
> The client has a couple of reports where the selection criteria can get
> quite long and in the past has exceeded the number of characters allowed
> in the querystring. This will obvious cause the eport gen to fail.
> Ok now that the background is over, here are some things I hope to find
> out.
> First, is there anyway to use the URL addressing via POSTing the variables
> to the report server or do all params have to be in the querystring?
> Next, since I do not think the POSTing will work, is there any way with
> SP2 or a hot fix that there is a way to get the total number of pages in a
> report that is rendered to HTML? I have found two hacks out there so far.
> First the suggestion of rendering the entire report via the API then
> counting the number of <HR> tags to ge tthe total number of pages. The
> second method, found here:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_prog_intro_7vqa.asp,
> suggests to render the first page of the report as an image then get the
> length + 1 of the streamId's parameter.
> The first method, may work but I cant imagine it would be good on reports
> where there is 50 or 60 pages. The second method does not seem to work
> for us. When we fire the code against a report that has two pages it
> gives us back a streamId.Length of 5.
> Finally, I can not imagine that I am the only one that has had the issue
> of not being able to call URL address to get my report due to param
> length. Has anyone else encountered this and if so how did they get around
> it.
> Thanks for any guidance,
> Rich
>
>|||I wrote a dumb little function to get the page count... not the most
efficient, but does the job: if you find out a better way of doing it
(supported fully by rs), let me know?
private int FindNumOfPages(string input)
{
string blah = input;
int counter = 1;
int end = blah.Length;
int start = 0;
int at = 0;
int count = 0;
while (start <= end && at > -1)
{
count = end - start;
at = blah.IndexOf("<hr/>", start, count);
if (at == -1)
break;
else
{
counter++;
start = at+1;
}
}
return counter;
}
--
Foober
"Rich" wrote:
> Thanks. So what about my other questions such as getting page count from
> RS API.
> Also if posting works, will the toolbar render correctly? In other words
> will the toolbar just post ot the next page or wil it try to put all the
> params on the querystring.
> Thanks for any additional information.
> Rich
> Hello Lev Semenets [MSFT],
> > POST should work.
> >
> > "Rich" <rich@.online.nospam> wrote in message
> > news:923159632507411681250000@.msnews.microsoft.com...
> >
> >> Hello,
> >>
> >> I have been developing a reporting services application and have had
> >> to
> >> rely on rendering using the web service API.
> >> Before I go any further let me explain why we are going this way
> >> instead
> >> of using URL addressing.
> >> The client has a couple of reports where the selection criteria can
> >> get
> >> quite long and in the past has exceeded the number of characters
> >> allowed
> >> in the querystring. This will obvious cause the eport gen to fail.
> >> Ok now that the background is over, here are some things I hope to
> >> find
> >> out.
> >> First, is there anyway to use the URL addressing via POSTing the
> >> variables to the report server or do all params have to be in the
> >> querystring?
> >>
> >> Next, since I do not think the POSTing will work, is there any way
> >> with
> >>
> >> SP2 or a hot fix that there is a way to get the total number of pages
> >> in a
> >>
> >> report that is rendered to HTML? I have found two hacks out there so
> >> far.
> >>
> >> First the suggestion of rendering the entire report via the API then
> >>
> >> counting the number of <HR> tags to ge tthe total number of pages.
> >> The
> >>
> >> second method, found here:
> >>
> >> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rspr
> >> og/htm/rsp_prog_intro_7vqa.asp,
> >>
> >> suggests to render the first page of the report as an image then get
> >> the
> >>
> >> length + 1 of the streamId's parameter.
> >>
> >> The first method, may work but I cant imagine it would be good on
> >> reports
> >>
> >> where there is 50 or 60 pages. The second method does not seem to
> >> work
> >>
> >> for us. When we fire the code against a report that has two pages it
> >>
> >> gives us back a streamId.Length of 5.
> >>
> >> Finally, I can not imagine that I am the only one that has had the
> >> issue
> >>
> >> of not being able to call URL address to get my report due to param
> >>
> >> length. Has anyone else encountered this and if so how did they get
> >> around
> >>
> >> it.
> >>
> >> Thanks for any guidance,
> >>
> >> Rich
> >>
>
>|||That method sounds a lot better than my method :) Better than rendering the
ENTIRE report first, counting horizontal rules, and then rerendering page 1.
I'll implement that instead.
I saw a post *somewhere* that microsoft was aware of the issue and were
looking into a fix in a "future release". Maybe in SQL2005?
--
Foober
"Rich" wrote:
> Hello Foober,
> Thanks for posting this solution. Here is what I ended up coming up with
> regarding a solution. I added a parameter on the report called "ShowpageCount
> set it to a boolean type with a default of false. I then created a textbox
> whose value was set to "~*" & Globals!TotalPages & "*~". Then I set the
> property of the Hidden to "Not Parameters!ShowPages". So now when I want
> the pages on the report, I can call into this report via the api and set
> the showPages param. I then take the rendered stream and regex it for the
> ~*<number>*~ token somewhere (I dont care where) in the stream and pull that
> number. I then turn around and call the report again without setting that
> param. A hack...yes. Best thing I could thinki of so I did not have to
> render what could be a 60 page report.
> Let me know what you thik of this idea. I just wonder....did they at least
> fix this for us in the new version?
>
> > I wrote a dumb little function to get the page count... not the most
> > efficient, but does the job: if you find out a better way of doing it
> > (supported fully by rs), let me know?
> >
> > private int FindNumOfPages(string input)
> > {
> > string blah = input;
> > int counter = 1;
> > int end = blah.Length;
> > int start = 0;
> > int at = 0;
> > int count = 0;
> > while (start <= end && at > -1)
> > {
> > count = end - start;
> > at = blah.IndexOf("<hr/>", start, count);
> > if (at == -1)
> > break;
> > else
> > {
> > counter++;
> > start = at+1;
> > }
> > }
> > return counter;
> > }
> > "Rich" wrote:
> >
> >> Thanks. So what about my other questions such as getting page count
> >> from RS API.
> >>
> >> Also if posting works, will the toolbar render correctly? In other
> >> words will the toolbar just post ot the next page or wil it try to
> >> put all the params on the querystring.
> >>
> >> Thanks for any additional information.
> >>
> >> Rich
> >>
> >> Hello Lev Semenets [MSFT],
> >>
> >> POST should work.
> >>
> >> "Rich" <rich@.online.nospam> wrote in message
> >> news:923159632507411681250000@.msnews.microsoft.com...
> >> Hello,
> >>
> >> I have been developing a reporting services application and have
> >> had
> >> to
> >> rely on rendering using the web service API.
> >> Before I go any further let me explain why we are going this way
> >> instead
> >> of using URL addressing.
> >> The client has a couple of reports where the selection criteria can
> >> get
> >> quite long and in the past has exceeded the number of characters
> >> allowed
> >> in the querystring. This will obvious cause the eport gen to fail.
> >> Ok now that the background is over, here are some things I hope to
> >> find
> >> out.
> >> First, is there anyway to use the URL addressing via POSTing the
> >> variables to the report server or do all params have to be in the
> >> querystring?
> >> Next, since I do not think the POSTing will work, is there any way
> >> with
> >>
> >> SP2 or a hot fix that there is a way to get the total number of
> >> pages in a
> >>
> >> report that is rendered to HTML? I have found two hacks out there
> >> so far.
> >>
> >> First the suggestion of rendering the entire report via the API
> >> then
> >>
> >> counting the number of <HR> tags to ge tthe total number of pages.
> >> The
> >>
> >> second method, found here:
> >>
> >> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rs
> >> pr og/htm/rsp_prog_intro_7vqa.asp,
> >>
> >> suggests to render the first page of the report as an image then
> >> get the
> >>
> >> length + 1 of the streamId's parameter.
> >>
> >> The first method, may work but I cant imagine it would be good on
> >> reports
> >>
> >> where there is 50 or 60 pages. The second method does not seem to
> >> work
> >>
> >> for us. When we fire the code against a report that has two pages
> >> it
> >>
> >> gives us back a streamId.Length of 5.
> >>
> >> Finally, I can not imagine that I am the only one that has had the
> >> issue
> >>
> >> of not being able to call URL address to get my report due to param
> >>
> >> length. Has anyone else encountered this and if so how did they get
> >> around
> >>
> >> it.
> >>
> >> Thanks for any guidance,
> >>
> >> Rich
> >>
>
>