Showing posts with label render. Show all posts
Showing posts with label render. Show all posts

Friday, March 9, 2012

Export to PDF in a new window using web service render method

We have an order screen which we would like to be visible at all times, and a
report based off some of the information on that screen. Is there any way to
keep this window open and open the report in a new window? Right now the
button used to launch the report is a server control button. This is what I
use now to open in the same window:
'setup parameters here...
result = rs.Render(reportPath, format, historyID, devInfo, parameters,
credentials, showHideToggle, encoding, mimeType, reportHistoryParameters,
warnings, streamIDs)
sh.SessionId = rs.SessionHeaderValue.SessionId
With Response
.ClearContent()
.AppendHeader("content-length", result.Length.ToString())
.ContentType = "application/pdf"
.BinaryWrite(result)
.Flush()
.Close()
End With
I did some reading and tried using window.open but to no avail. Any
suggestions?Does this help?
For the following you need SP1 or greater installed.
= "javascript:void(window.open('http://www.google.com','_blank'))"
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Treviathon" <Treviathon@.discussions.microsoft.com> wrote in message
news:454A2439-8071-48A2-9476-DA631E985D6C@.microsoft.com...
> We have an order screen which we would like to be visible at all times,
and a
> report based off some of the information on that screen. Is there any way
to
> keep this window open and open the report in a new window? Right now the
> button used to launch the report is a server control button. This is what
I
> use now to open in the same window:
> 'setup parameters here...
> result = rs.Render(reportPath, format, historyID, devInfo, parameters,
> credentials, showHideToggle, encoding, mimeType, reportHistoryParameters,
> warnings, streamIDs)
> sh.SessionId = rs.SessionHeaderValue.SessionId
> With Response
> .ClearContent()
> .AppendHeader("content-length", result.Length.ToString())
> .ContentType = "application/pdf"
> .BinaryWrite(result)
> .Flush()
> .Close()
> End With
> I did some reading and tried using window.open but to no avail. Any
> suggestions?|||I'm trying the same thing.
I've tried your solution, and it doesn't work for me. Maybe I'm
misunderstanding?
I've put the snippet of javascript on the OnClickevent of my asp.net
pushbutton, and I can't compile the project. Can you give me a fuller
sample?
Thx

Wednesday, March 7, 2012

export to excel without formatting

Is is possible to render a report to excel without formatting?
For example, I have a report that displays like this in my web browser.
Country State City Sales
USA MN A 100.00
B 50.00
C 50.00
CA A 500.00
B 25.00
TX A 225.00
B 63.25
C 100.00
When I export it to excel I would like every cell to be filled in.
Country State City Sales
USA MN A 100.00
USA MN B 50.00
USA MN C 50.00
USA CA A 500.00
USA CA B 25.00
USA TX A 225.00
USA TX B 63.25
USA TX C 100.00
Any info or help on this would be great.Will export to CSV work?
Steve MunLeeuw
"retkow" <retkow@.discussions.microsoft.com> wrote in message
news:FD8A536E-9B93-414E-850F-9772A810E98F@.microsoft.com...
> Is is possible to render a report to excel without formatting?
> For example, I have a report that displays like this in my web browser.
> Country State City Sales
> USA MN A 100.00
> B 50.00
> C 50.00
> CA A 500.00
> B 25.00
> TX A 225.00
> B 63.25
> C 100.00
> When I export it to excel I would like every cell to be filled in.
> Country State City Sales
> USA MN A 100.00
> USA MN B 50.00
> USA MN C 50.00
> USA CA A 500.00
> USA CA B 25.00
> USA TX A 225.00
> USA TX B 63.25
> USA TX C 100.00
> Any info or help on this would be great.
>|||Exporting to CSV does work, but the users and customers who run the reports
will not consider this a reasonable option. The reporting tool my company is
using right now allows exporting to excel without formatting.
"Steve MunLeeuw" wrote:
> Will export to CSV work?
> Steve MunLeeuw
> "retkow" <retkow@.discussions.microsoft.com> wrote in message
> news:FD8A536E-9B93-414E-850F-9772A810E98F@.microsoft.com...
> > Is is possible to render a report to excel without formatting?
> >
> > For example, I have a report that displays like this in my web browser.
> >
> > Country State City Sales
> > USA MN A 100.00
> > B 50.00
> > C 50.00
> > CA A 500.00
> > B 25.00
> > TX A 225.00
> > B 63.25
> > C 100.00
> >
> > When I export it to excel I would like every cell to be filled in.
> >
> > Country State City Sales
> > USA MN A 100.00
> > USA MN B 50.00
> > USA MN C 50.00
> > USA CA A 500.00
> > USA CA B 25.00
> > USA TX A 225.00
> > USA TX B 63.25
> > USA TX C 100.00
> >
> > Any info or help on this would be great.
> >
>
>|||what is the difference'
i mean seriously?
they have one additional step where they need to use 'SaveAs' instead of
Save?
write a clientside macro for them
"retkow" <retkow@.discussions.microsoft.com> wrote in message
news:0ECC938F-1B10-494A-BF33-8E8BB5DCE471@.microsoft.com...
> Exporting to CSV does work, but the users and customers who run the
> reports
> will not consider this a reasonable option. The reporting tool my company
> is
> using right now allows exporting to excel without formatting.
>
> "Steve MunLeeuw" wrote:
>> Will export to CSV work?
>> Steve MunLeeuw
>> "retkow" <retkow@.discussions.microsoft.com> wrote in message
>> news:FD8A536E-9B93-414E-850F-9772A810E98F@.microsoft.com...
>> > Is is possible to render a report to excel without formatting?
>> >
>> > For example, I have a report that displays like this in my web browser.
>> >
>> > Country State City Sales
>> > USA MN A 100.00
>> > B 50.00
>> > C 50.00
>> > CA A 500.00
>> > B 25.00
>> > TX A 225.00
>> > B 63.25
>> > C 100.00
>> >
>> > When I export it to excel I would like every cell to be filled in.
>> >
>> > Country State City Sales
>> > USA MN A 100.00
>> > USA MN B 50.00
>> > USA MN C 50.00
>> > USA CA A 500.00
>> > USA CA B 25.00
>> > USA TX A 225.00
>> > USA TX B 63.25
>> > USA TX C 100.00
>> >
>> > Any info or help on this would be great.
>> >
>>|||The problem with a csv file is if some of the values returned in a report
have commas in this will cause the report to not load correctly in excel.
"aaron_kempf@.hotmail.com" wrote:
> what is the difference'
> i mean seriously?
> they have one additional step where they need to use 'SaveAs' instead of
> Save?
> write a clientside macro for them
>
>
> "retkow" <retkow@.discussions.microsoft.com> wrote in message
> news:0ECC938F-1B10-494A-BF33-8E8BB5DCE471@.microsoft.com...
> > Exporting to CSV does work, but the users and customers who run the
> > reports
> > will not consider this a reasonable option. The reporting tool my company
> > is
> > using right now allows exporting to excel without formatting.
> >
> >
> >
> > "Steve MunLeeuw" wrote:
> >
> >> Will export to CSV work?
> >>
> >> Steve MunLeeuw
> >>
> >> "retkow" <retkow@.discussions.microsoft.com> wrote in message
> >> news:FD8A536E-9B93-414E-850F-9772A810E98F@.microsoft.com...
> >> > Is is possible to render a report to excel without formatting?
> >> >
> >> > For example, I have a report that displays like this in my web browser.
> >> >
> >> > Country State City Sales
> >> > USA MN A 100.00
> >> > B 50.00
> >> > C 50.00
> >> > CA A 500.00
> >> > B 25.00
> >> > TX A 225.00
> >> > B 63.25
> >> > C 100.00
> >> >
> >> > When I export it to excel I would like every cell to be filled in.
> >> >
> >> > Country State City Sales
> >> > USA MN A 100.00
> >> > USA MN B 50.00
> >> > USA MN C 50.00
> >> > USA CA A 500.00
> >> > USA CA B 25.00
> >> > USA TX A 225.00
> >> > USA TX B 63.25
> >> > USA TX C 100.00
> >> >
> >> > Any info or help on this would be great.
> >> >
> >>
> >>
> >>
>
>|||I believe you can set the CSV rendering device info to put quotes around
strings. Then you will have no problem with commas in the data. The only
device info I have used is to make the CSV rendering in Report Manager to be
ASCII. This is what I put in rsreportserver.config:
<Extension Name="CSV"
Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering">
<Configuration>
<DeviceInfo>
<Encoding>ASCII</Encoding>
</DeviceInfo>
</Configuration>
</Extension>
Note that you can put device info on your url string so you could test this
without changing the file. My guess is that you would do this:
<Extension Name="CSV"
Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering">
<Configuration>
<DeviceInfo>
<Encoding>ASCII</Encoding>
<Qualifier>"</Qualifier>
</DeviceInfo>
</Configuration>
</Extension>
I searched on CSV in the help for RS 2005 (btw, while you can put device
info on the URL, making a change to the config file only works with RS2005).
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"retkow" <retkow@.discussions.microsoft.com> wrote in message
news:61E0F0BB-02EF-4145-A70E-392C0C986312@.microsoft.com...
> The problem with a csv file is if some of the values returned in a report
> have commas in this will cause the report to not load correctly in excel.
>
> "aaron_kempf@.hotmail.com" wrote:
>> what is the difference'
>> i mean seriously?
>> they have one additional step where they need to use 'SaveAs' instead of
>> Save?
>> write a clientside macro for them
>>
>>
>> "retkow" <retkow@.discussions.microsoft.com> wrote in message
>> news:0ECC938F-1B10-494A-BF33-8E8BB5DCE471@.microsoft.com...
>> > Exporting to CSV does work, but the users and customers who run the
>> > reports
>> > will not consider this a reasonable option. The reporting tool my
>> > company
>> > is
>> > using right now allows exporting to excel without formatting.
>> >
>> >
>> >
>> > "Steve MunLeeuw" wrote:
>> >
>> >> Will export to CSV work?
>> >>
>> >> Steve MunLeeuw
>> >>
>> >> "retkow" <retkow@.discussions.microsoft.com> wrote in message
>> >> news:FD8A536E-9B93-414E-850F-9772A810E98F@.microsoft.com...
>> >> > Is is possible to render a report to excel without formatting?
>> >> >
>> >> > For example, I have a report that displays like this in my web
>> >> > browser.
>> >> >
>> >> > Country State City Sales
>> >> > USA MN A 100.00
>> >> > B 50.00
>> >> > C 50.00
>> >> > CA A 500.00
>> >> > B 25.00
>> >> > TX A 225.00
>> >> > B 63.25
>> >> > C 100.00
>> >> >
>> >> > When I export it to excel I would like every cell to be filled in.
>> >> >
>> >> > Country State City Sales
>> >> > USA MN A 100.00
>> >> > USA MN B 50.00
>> >> > USA MN C 50.00
>> >> > USA CA A 500.00
>> >> > USA CA B 25.00
>> >> > USA TX A 225.00
>> >> > USA TX B 63.25
>> >> > USA TX C 100.00
>> >> >
>> >> > Any info or help on this would be great.
>> >> >
>> >>
>> >>
>> >>
>>

Sunday, February 26, 2012

Export to Excel Link - Inactive -Critical - Need Help

Hi all,
I am using asp.net control(Reportviewer) to view the report in the web, but
when I render the report, the export link is inactive and when I choose the
refresh button, the Export link is activated.
For the first time the Export link button is inactive.
This issue is very critical, please need your help
Thanks
Balaji
--
Message posted via http://www.sqlmonster.comCan anyone answer this.
Balaji
--
Message posted via http://www.sqlmonster.com

Friday, February 24, 2012

Export to Excel

Hello again,
I found out, that there's a limitation in rendering reports to excel
format. The SSRS can only render reports with less than 256 columns!
Is there a work around to render reports with more than 256 columns?
In my case, it would be also possible to start a new sheet after 256
columns! May someone has any ideas how to cope with that!
Thanks,
FlorianYou can design your report in a way to only have a max of 256 columns in your
matrix and start a new matrix after.
and also it has a limitation on the number of rows I think it is in the
32000 row. so you have to put a page break after each matrix, this way you
will have a new sheet in Excel for each matrix.
Good Luck
"falbrech_www@.gmx.de" wrote:
> Hello again,
> I found out, that there's a limitation in rendering reports to excel
> format. The SSRS can only render reports with less than 256 columns!
> Is there a work around to render reports with more than 256 columns?
> In my case, it would be also possible to start a new sheet after 256
> columns! May someone has any ideas how to cope with that!
> Thanks,
> Florian
>|||Hi Paul,
> You can design your report in a way to only have a max of 256 columns in your
> matrix and start a new matrix after.
might be an idea. But I want to use the same report for HTML and in
this case all the columns should be shown as usual (column by column).
Is there a way to distinguish whether a report is rendered for HTML or
Excel within a report (see a previous post)? Then I might be able to
use more than one matrix for Excel and one matrix for HTML by hide or
unhide them.
> and also it has a limitation on the number of rows I think it is in the
> 32000 row. so you have to put a page break after each matrix, this way you
Thnaks for that hint. But this should be a problem! ;)
Florian|||Maybe you could not use the report to export to excel and use some of the
code in the example instead:-
http://www.simple-talk.com/sql/t-sql-programming/sql-server-excel-workbench/
It would work around the problem.
Dale
"falbrech" <falbrech_www@.gmx.de> wrote in message
news:1187077661.875246.296900@.57g2000hsv.googlegroups.com...
> Hi Paul,
>> You can design your report in a way to only have a max of 256 columns in
>> your
>> matrix and start a new matrix after.
> might be an idea. But I want to use the same report for HTML and in
> this case all the columns should be shown as usual (column by column).
> Is there a way to distinguish whether a report is rendered for HTML or
> Excel within a report (see a previous post)? Then I might be able to
> use more than one matrix for Excel and one matrix for HTML by hide or
> unhide them.
>> and also it has a limitation on the number of rows I think it is in the
>> 32000 row. so you have to put a page break after each matrix, this way
>> you
> Thnaks for that hint. But this should be a problem! ;)
> Florian
>|||Hi!
> Maybe you could not use the report to export to excel and use some of the
> code in the example instead:-
> http://www.simple-talk.com/sql/t-sql-programming/sql-server-excel-wor...
Thanks, but OLE Automation as it is decribed in the article is not an
option!
br,
Florian