Friday, March 30, 2012
Problem scheduling job
dump some aggregate data into a table for reporting purposes. It populates
a
few temp tables, then inserts into the destination table.
This script works fine in QA, but when I try to run it from a SA Job it
fails with the following error:
Line 12: Incorrect syntax near '20050128'. [SQLSTATE 42000] (Error 170).
NOTE: The step was retried the requested number of times (1) without
succeeding. The step failed.
Here's my script:
--begin script
USE NGEPMProd
GO
SELECT TTM.desc_30 AS TaskType, TU.user_id AS Owner, TU.createdate,T.status
INTO #NotStarted
FROM tasks T
INNER JOIN task_type_mstr TTM ON
TTM.task_type_id = T.task_type_id
INNER JOIN task_users_assigned_to TU ON
TU.task_id = T.task_id
WHERE t.status = 1
ORDER BY TU.user_id ASC
SELECT Owner, COUNT(OWNER) AS NumberNotStarted, CONVERT(char(10), GETDATE(),
101)AS [DATE]
INTO #NSTotals
FROM #NotStarted
GROUP BY owner
ORDER BY OWNER ASC
----
--
USE NGEPMProd
GO
SELECT TTM.desc_30 AS TaskType, TU.user_id AS Owner, TU.createdate,T.status
INTO #InProgress
FROM tasks T
INNER JOIN task_type_mstr TTM ON
TTM.task_type_id = T.task_type_id
INNER JOIN task_users_assigned_to TU ON
TU.task_id = T.task_id
WHERE t.status = 3
ORDER BY TU.user_id ASC
SELECT Owner, COUNT(OWNER) AS NumberInProgress,CONVERT(char(10), GETDATE(),
101)AS [DATE]
INTO #ProgTotals
FROM #InProgress
GROUP BY owner
ORDER BY OWNER ASC
----
-
USE NGEPMProd
GO
SELECT TTM.desc_30 AS TaskType, TU.user_id AS Owner, TU.createdate,T.status,
CONVERT(char(10), T.followup_date, 101)AS FUDate
INTO #Overdue
FROM tasks T
INNER JOIN task_type_mstr TTM ON
TTM.task_type_id = T.task_type_id
INNER JOIN task_users_assigned_to TU ON
TU.task_id = T.task_id
WHERE T.status = '3'
ORDER BY TU.user_id ASC
SELECT Owner, COUNT(OWNER) AS NumberOverdue, CONVERT(char(10), GETDATE(),
101)AS [DATE]
INTO #ODTotals
FROM #Overdue
WHERE FUDate < GETDATE()
GROUP BY owner
ORDER BY OWNER ASC
----
-
USE NGEPMProd
GO
SELECT TTM.desc_30 AS TaskType, TU.user_id AS Owner, TU.createdate,T.status,
CONVERT(char(10), T.completion_date, 101) AS CompletedDate
INTO #Completed
FROM tasks T
INNER JOIN task_type_mstr TTM ON
TTM.task_type_id = T.task_type_id
INNER JOIN task_users_assigned_to TU ON
TU.task_id = T.task_id
WHERE t.status = 2
--att tasks completed in the last 24 hours
AND T.completion_date >= DATEADD(hh, -24,GETDATE())-- or enter a specific
date like this '20050127'
ORDER BY TU.user_id ASC
SELECT Owner, COUNT(OWNER) AS NumberCompleted, CONVERT(char(10), GETDATE(),
101)AS [DATE]
INTO #CompTotals
FROM #Completed
GROUP BY owner
ORDER BY OWNER ASC
----
---
--insert records into permanent table for reports
INSERT INTO task_totals_collector
SELECT UM.user_id AS Employee, NS.NumberNotStarted AS NotStarted,
PT.NumberInProgress AS InProgress,CT.NumberCompleted AS Completed,
CONVERT(char(10), GETDATE(), 101)AS CalcDate, OT.NumberOverdue AS Overdue
FROM user_mstr UM
LEFT JOIN #NSTotals NS
ON UM.user_id=NS.owner
LEFT JOIN #ProgTotals PT ON
UM.user_id=PT.owner
LEFT JOIN #CompTotals CT ON
UM.user_id=CT.owner
LEFT JOIN #ODTotals OT ON
UM.user_id=OT.owner
ORDER BY UM.user_id ASC
--end of script
Patrick Rouse
Microsoft MVP - Terminal Server
http://www.workthin.com"Patrick Rouse" <PatrickRouse@.discussions.microsoft.com> wrote in message
news:F723A708-5FF4-4E8A-9F41-38A49BB08BE4@.microsoft.com...
> --att tasks completed in the last 24 hours
> AND T.completion_date >= DATEADD(hh, -24,GETDATE())-- or enter a specific
> date like this '20050127'
Patrick,
The only thing I can see that might be causing that error is this part; I'm
not sure if this is just wrapped because of the news client, though... You
should double-check that to make sure. I can't find the string '20050128'
in your code anywhere... Do you have some dynamic SQL that's not posted?
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--|||No, I think it's getting this from GETDATE(). The database I'm working with
has a lot of dates stored as CHAR(8), which drives me nuts, as I can ORDER B
Y
on these columns. In my query I CONVERT them to DATETIME, but they're still
formatted as 'YYYYMMDD'.
"Adam Machanic" wrote:
> "Patrick Rouse" <PatrickRouse@.discussions.microsoft.com> wrote in message
> news:F723A708-5FF4-4E8A-9F41-38A49BB08BE4@.microsoft.com...
> Patrick,
> The only thing I can see that might be causing that error is this part; I'
m
> not sure if this is just wrapped because of the news client, though... You
> should double-check that to make sure. I can't find the string '20050128'
> in your code anywhere... Do you have some dynamic SQL that's not posted?
>
> --
> Adam Machanic
> SQL Server MVP
> http://www.sqljunkies.com/weblog/amachanic
> --
>
>|||One thing I can suggest is to put brackets ( [ ] ) around all your table and
column names as you have a lot of reserved words as object names.
Andrew J. Kelly SQL MVP
"Patrick Rouse" <PatrickRouse@.discussions.microsoft.com> wrote in message
news:F723A708-5FF4-4E8A-9F41-38A49BB08BE4@.microsoft.com...
>I have a script that I wrote (please pardon my less than beautiful code) to
> dump some aggregate data into a table for reporting purposes. It
> populates a
> few temp tables, then inserts into the destination table.
> This script works fine in QA, but when I try to run it from a SA Job it
> fails with the following error:
> Line 12: Incorrect syntax near '20050128'. [SQLSTATE 42000] (Error 170).
> NOTE: The step was retried the requested number of times (1) without
> succeeding. The step failed.
>
> Here's my script:
> --begin script
> USE NGEPMProd
> GO
> SELECT TTM.desc_30 AS TaskType, TU.user_id AS Owner,
> TU.createdate,T.status
> INTO #NotStarted
> FROM tasks T
> INNER JOIN task_type_mstr TTM ON
> TTM.task_type_id = T.task_type_id
> INNER JOIN task_users_assigned_to TU ON
> TU.task_id = T.task_id
> WHERE t.status = 1
> ORDER BY TU.user_id ASC
> SELECT Owner, COUNT(OWNER) AS NumberNotStarted, CONVERT(char(10),
> GETDATE(),
> 101)AS [DATE]
> INTO #NSTotals
> FROM #NotStarted
> GROUP BY owner
> ORDER BY OWNER ASC
> ----
--
> USE NGEPMProd
> GO
> SELECT TTM.desc_30 AS TaskType, TU.user_id AS Owner,
> TU.createdate,T.status
> INTO #InProgress
> FROM tasks T
> INNER JOIN task_type_mstr TTM ON
> TTM.task_type_id = T.task_type_id
> INNER JOIN task_users_assigned_to TU ON
> TU.task_id = T.task_id
> WHERE t.status = 3
> ORDER BY TU.user_id ASC
> SELECT Owner, COUNT(OWNER) AS NumberInProgress,CONVERT(char(10),
> GETDATE(),
> 101)AS [DATE]
> INTO #ProgTotals
> FROM #InProgress
> GROUP BY owner
> ORDER BY OWNER ASC
> ----
--
> USE NGEPMProd
> GO
> SELECT TTM.desc_30 AS TaskType, TU.user_id AS Owner,
> TU.createdate,T.status,
> CONVERT(char(10), T.followup_date, 101)AS FUDate
> INTO #Overdue
> FROM tasks T
> INNER JOIN task_type_mstr TTM ON
> TTM.task_type_id = T.task_type_id
> INNER JOIN task_users_assigned_to TU ON
> TU.task_id = T.task_id
> WHERE T.status = '3'
> ORDER BY TU.user_id ASC
> SELECT Owner, COUNT(OWNER) AS NumberOverdue, CONVERT(char(10), GETDATE(),
> 101)AS [DATE]
> INTO #ODTotals
> FROM #Overdue
> WHERE FUDate < GETDATE()
> GROUP BY owner
> ORDER BY OWNER ASC
> ----
--
> USE NGEPMProd
> GO
> SELECT TTM.desc_30 AS TaskType, TU.user_id AS Owner,
> TU.createdate,T.status,
> CONVERT(char(10), T.completion_date, 101) AS CompletedDate
> INTO #Completed
> FROM tasks T
> INNER JOIN task_type_mstr TTM ON
> TTM.task_type_id = T.task_type_id
> INNER JOIN task_users_assigned_to TU ON
> TU.task_id = T.task_id
> WHERE t.status = 2
> --att tasks completed in the last 24 hours
> AND T.completion_date >= DATEADD(hh, -24,GETDATE())-- or enter a specific
> date like this '20050127'
> ORDER BY TU.user_id ASC
> SELECT Owner, COUNT(OWNER) AS NumberCompleted, CONVERT(char(10),
> GETDATE(),
> 101)AS [DATE]
> INTO #CompTotals
> FROM #Completed
> GROUP BY owner
> ORDER BY OWNER ASC
> ----
---
> --insert records into permanent table for reports
> INSERT INTO task_totals_collector
> SELECT UM.user_id AS Employee, NS.NumberNotStarted AS NotStarted,
> PT.NumberInProgress AS InProgress,CT.NumberCompleted AS Completed,
> CONVERT(char(10), GETDATE(), 101)AS CalcDate, OT.NumberOverdue AS Overdue
> FROM user_mstr UM
> LEFT JOIN #NSTotals NS
> ON UM.user_id=NS.owner
> LEFT JOIN #ProgTotals PT ON
> UM.user_id=PT.owner
> LEFT JOIN #CompTotals CT ON
> UM.user_id=CT.owner
> LEFT JOIN #ODTotals OT ON
> UM.user_id=OT.owner
> ORDER BY UM.user_id ASC
> --end of script
>
>
> Patrick Rouse
> Microsoft MVP - Terminal Server
> http://www.workthin.com|||I put brackets around the tables named user_id, and then ran just the first
section (up to the first --), which fails at the first GETDATE with
this error:
Incorrect syntax near '20050128'. [SQLSTATE 42000] (Error 170). The step
failed.
Like I said, it works fine in QA, just not in a job. :(
"Andrew J. Kelly" wrote:
> One thing I can suggest is to put brackets ( [ ] ) around all your table a
nd
> column names as you have a lot of reserved words as object names.
> --
> Andrew J. Kelly SQL MVP
>
> "Patrick Rouse" <PatrickRouse@.discussions.microsoft.com> wrote in message
> news:F723A708-5FF4-4E8A-9F41-38A49BB08BE4@.microsoft.com...
>
>|||Patrick,
I haven't followed the whole thread but do you actually have "GO" in your
SQL step. "GO" is a batch terminator used by QA and is not part of T-SQL.
So, you would want to take it out.
-oj
"Patrick Rouse" <PatrickRouse@.discussions.microsoft.com> wrote in message
news:5B11E86A-08E5-4027-926E-84AE2A3AFBEA@.microsoft.com...
>I put brackets around the tables named user_id, and then ran just the first
> section (up to the first --), which fails at the first GETDATE with
> this error:
> Incorrect syntax near '20050128'. [SQLSTATE 42000] (Error 170). The step
> failed.
> Like I said, it works fine in QA, just not in a job. :(
> "Andrew J. Kelly" wrote:
>|||Good to know, but I removed the USE DatabaseName & GO statements and still
get the same error.
"Patrick Rouse" wrote:
> No, I think it's getting this from GETDATE(). The database I'm working wi
th
> has a lot of dates stored as CHAR(8), which drives me nuts, as I can ORDER
BY
> on these columns. In my query I CONVERT them to DATETIME, but they're stil
l
> formatted as 'YYYYMMDD'.
> "Adam Machanic" wrote:
>|||First off as OJ mentions , do you have the GO's in the actual code? How you
know it is the GETDATE() that is failing or are you assuming because it is a
date type value in the error message? Here is the first block from your
original post:
<<<<<
--begin script
USE NGEPMProd
GO
SELECT TTM.desc_30 AS TaskType, TU.user_id AS Owner, TU.createdate,T.status
INTO #NotStarted
FROM tasks T
INNER JOIN task_type_mstr TTM ON
TTM.task_type_id = T.task_type_id
INNER JOIN task_users_assigned_to TU ON
TU.task_id = T.task_id
WHERE t.status = 1
ORDER BY TU.user_id ASC
SELECT Owner, COUNT(OWNER) AS NumberNotStarted, CONVERT(char(10), GETDATE(),
101)AS [DATE]
INTO #NSTotals
FROM #NotStarted
GROUP BY owner
ORDER BY OWNER ASC
I can't tell from this post but it looks like you don't have a space between
the end of the CONVERT and the AS. What happens if you set the date to a
variable and use the variable in the select instead?
Andrew J. Kelly SQL MVP
"Patrick Rouse" <PatrickRouse@.discussions.microsoft.com> wrote in message
news:5B11E86A-08E5-4027-926E-84AE2A3AFBEA@.microsoft.com...
>I put brackets around the tables named user_id, and then ran just the first
> section (up to the first --), which fails at the first GETDATE with
> this error:
> Incorrect syntax near '20050128'. [SQLSTATE 42000] (Error 170). The step
> failed.
> Like I said, it works fine in QA, just not in a job. :(
> "Andrew J. Kelly" wrote:
>|||Patrick,
Make it easier on us if you would script out the job and post it here. ;-)
(you can use EM to do that).
There's probably a silly syntax error.
-oj
"Patrick Rouse" <PatrickRouse@.discussions.microsoft.com> wrote in message
news:58F52F80-E014-4CF7-8868-9A919AA4EBEA@.microsoft.com...
> Good to know, but I removed the USE DatabaseName & GO statements and still
> get the same error.
>|||I assume it's the get date, because that returns the date listed in the erro
r
I posted, and the error states on "line 12" which is where GETDATE is
specified.
"Andrew J. Kelly" wrote:
> First off as OJ mentions , do you have the GO's in the actual code? How y
ou
> know it is the GETDATE() that is failing or are you assuming because it is
a
> date type value in the error message? Here is the first block from your
> original post:
> <<<<<
> --begin script
> USE NGEPMProd
> GO
> SELECT TTM.desc_30 AS TaskType, TU.user_id AS Owner, TU.createdate,T.statu
s
> INTO #NotStarted
> FROM tasks T
> INNER JOIN task_type_mstr TTM ON
> TTM.task_type_id = T.task_type_id
> INNER JOIN task_users_assigned_to TU ON
> TU.task_id = T.task_id
> WHERE t.status = 1
> ORDER BY TU.user_id ASC
> SELECT Owner, COUNT(OWNER) AS NumberNotStarted, CONVERT(char(10), GETDATE(
),
> 101)AS [DATE]
> INTO #NSTotals
> FROM #NotStarted
> GROUP BY owner
> ORDER BY OWNER ASC
> I can't tell from this post but it looks like you don't have a space betwe
en
> the end of the CONVERT and the AS. What happens if you set the date to a
> variable and use the variable in the select instead?
> --
> Andrew J. Kelly SQL MVP
>
> "Patrick Rouse" <PatrickRouse@.discussions.microsoft.com> wrote in message
> news:5B11E86A-08E5-4027-926E-84AE2A3AFBEA@.microsoft.com...
>
>sql
Wednesday, March 28, 2012
Problem Reporting services with VMWARE.
Hello
I protected an image VMWARE of a waiter(server) SQL Server on 2005, and I created a new server from this image.
I work with both waiters(servers), if I throw(launch) on a customer navigator a report(relationship) of the second to server that walks(works) but a report(relationship) of the first one to sever that walks(works) not, an error message " Impossible to post(show) the page ".
You know why PLEASE..
...|||Hi,
could you explain this in detail, I did not get the point yet.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
I made a protection(saving) of a machine VMWARE (name: devrepsrv, which contains sql server on 2005 and Reporting services).
I created with this protection (saving) an image VMWARE for create the second waiter (server) VMWARE (name: dev2rs).
Bitter the creation of the second waiter (server), I cannot any more reached since another post(post office) the first waiter(server):
http://devrepsrv/Reports/Pages/Folder.aspx
And I can reached the second waiter(server):
http://dev2rs/Reports/Pages/Folder.aspx
And all this since the third post.
Thank’s very match
Monday, March 26, 2012
Problem rendering to Excel when using SOAP
I'm using Reporting Services 2005 with VS2005 and getting garbage when setting format=excel. (snippit below) All the other formats work fine and excel works fine if I use URL access with the report manager for the same report.
Any ideas how to troubleshoot this? My SOAP code is as follows:
Dim reportAsByte() =NothingDim rsAs report_engine.ReportExecutionService =New report_engine.ReportExecutionService'credentialsrs.Credentials =
New System.Net.NetworkCredential("zzzzzzz","zzzzzzzzz","zzzzzzzzzzz")rs.PreAuthenticate =
TrueDim reportpathAsString ="/" & System.Configuration.ConfigurationManager.AppSettings("report_folder") &"/" & report_nameDim zoomAsString ="False"Dim streamRootAsString =NothingDim deviceInfoAsString =NothingSelectCase formatCase"HTML4.0","HTML3.2"deviceInfo =
"<DeviceInfo>"deviceInfo &=
"<StreamRoot>" & streamRoot &"</StreamRoot>"deviceInfo &=
"<Toolbar>False</Toolbar>"deviceInfo &=
"<Parameters>False</Parameters>"deviceInfo &=
"<HTMLFragment>True</HTMLFragment>"deviceInfo &=
"<StyleStream>False</StyleStream>"deviceInfo &=
"<Section>0</Section>"deviceInfo &=
"<Zoom>" & zoom &"</Zoom>"deviceInfo &=
"</DeviceInfo>"CaseElsedeviceInfo =
"<DeviceInfo></DeviceInfo>"EndSelect'variables for the remaining paramtersDim historyIDAsString =NothingDim credentialsAs report_engine.DataSourceCredentials =NothingDim showHideToggleAsString =NothingDim encodingAsStringDim mimeTypeAsStringDim warnings()As report_engine.Warning =NothingDim reportHistoryParameters()As report_engine.ParameterValue =NothingDim streamIDS()AsString =NothingDim execInfoAsNew report_engine.ExecutionInfoDim execHeaderAsNew report_engine.ExecutionHeaderrs.ExecutionHeaderValue = execHeader
execInfo = rs.LoadReport(reportpath, historyID)
Try'execute the reportreport = rs.Render(Format, deviceInfo,
"", mimeType,"", warnings, streamIDS)'flush any pending responseResponse.Clear()
'set the http headers for a PDF responseHttpContext.Current.Response.ClearHeaders()
HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ContentType =
"text/html"'filename is the default filename displayedHttpContext.Current.Response.AppendHeader(
"Content-Disposition","filename=""" & savefilename &"""")'send the byte array containing the reportHttpContext.Current.Response.BinaryWrite(report)
HttpContext.Current.Response.End()
Catch exAs ExceptionIf ex.Message ="Thread was being aborted."ThenHttpContext.Current.Response.ClearHeaders()
HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ContentType =
"text/html"HttpContext.Current.Response.Write(
"<HTML><body><h1>Error</h1><br>" & ex.Message &"</body></html>")EndIfEndTry
Here's the garbage that is generated:
? ? ?> ? ?????????????????????????????????????? !"#$%&'()*+,-./0123456789:;<=>?@.ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi?????????ot Entry ?? `?# v??Workbook ? ??? ? ? ?? ? ?\p B ? a ?= ? ? ? = ??? X @. ? " ? ? 1 ?? Arial1 ?? Arial1 ?? Arial1 ?? Arial1 ? ? Arial1 @. ? Arial 3 "$"#,##0_);\("$"#,##0\) = "$"#,##0_);[Red]\("$"#,##0\) ? "$"#,##0.00_);\("$"#,##0.00\) I " "$"#,##0.00_);[Red]\("$"#,##0.00\) i*2 _("$"* #,##0_);_("$"* \(#,##0\);_("$"* "-"_);_(@._) W)) _(* #,##0_);_(* \(#,##0\);_(* "-"_);_(@._) y,: _("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@._) g+1 _(* #,##0.00_);_(* \(#,##0.00\);_(* "-"??_);_(@._) )? [$-1010409]General?? ????? ????? ????? ??????????????????????????????????? (?? +?? )?? ,?? *?? ?? `@.@.?? `@.?? ` @.?? `@.?? `@. @. ?? @.?? `@. @. ?? ` ?? `@. @. ?? `"" ?? `"" ?? `"" ? ? ? `"" ?? ? `"" ? ? `@. ?? `@. @. ? ? ` ?? ? ? ? ? ? ? ? ? ? ??0需 drugs_for_reordering? ? ??8 ? ?? ?? ?R ? 3????;s??? ?F ??3????;s????JFIF HH? (" & #0$&*+-.- "251,5(,-,? , ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,? 0 " ? ? } !1A Qa "q 2? #B??R?$3br? %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz????????????????????????稩????? ? w !1 AQ aq "2? B??#3R??ъ $4? &'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz??????????????????????妧詪???? ??E?? ?{?[??z.?e??? Z????????=?黄a??Y? ??w ??8?Μ ??z?qZ]???&o x??????? г??達??4????? ?a?M'? ы F? zWQ_5x UO x??\G K??仄? ?? ??8z?<?????? Q?fv8 Rk??? ?M?w???%#?o??'°xz?_k??X???B????f?K???d\??? ?Ty??????U Nk??h|*?a?
I solved my own issue. I was setting the headers wrong. Needed to changeHttpContext.Current.Response.ContentType =
"text/html"
to excel
sqlProblem rendering Reports with sub-reports to CSV
Hi, all.
Hope all is well with you. I have a Q re Reporting Services, hope someone can help me out. My setup: SQL Server Reporting Services 2000 SP 2, running in W2K3, Visual Studio 2003.
I have a report made up of a few sub-reports, stacked on top of each other. When I render the main report in Report Manager (HTML), the sub-reports comes out on top of each other as designed in the Layout, similarly when I export it to PDF.
However, when I export the main report to CSV, all of the sub-reports come out next to each other, rather than on top of each other, as originally designed.
Does anyone know how to overcome this problem?
Thank you very much.
Cliff.
Unfortunately the CSV renderer is not at all a layout renderer -- it just emits the data without too much regard for layout.|||So, are you saying that there's probably no way around this problem?
Thanks.
problem recreating a report - 2nd dataset doesn't exist?
I am just starting out with reporting services (I have a book which I have
not read yet). I have copied the basic part of a report to a new report for
learning purposes. This contains a parameter which I included in the query.
This works so far. But the original report also includes a table of fields
that are based on a separate dataset. I am getting an error now. How do I
add/imlement this secondary dataset? The error message says that this
dataset does not exist. I presume it means the dataset does not exist in the
report because the tables in sql server exist. How do I create this dataset?
Thanks,
Richopen report project by using visual studio
open report document (double click the report file - solution explorer)
go to Data tab (Data / Layout / Preview)
click dataset dropdown and choose <new dataset...>
have fun
"Rich" <Rich@.discussions.microsoft.com> escreveu na mensagem
news:D8EE2D83-6A8B-49AF-B875-DF9191DAD51A@.microsoft.com...
> Hello,
> I am just starting out with reporting services (I have a book which I have
> not read yet). I have copied the basic part of a report to a new report
> for
> learning purposes. This contains a parameter which I included in the
> query.
> This works so far. But the original report also includes a table of
> fields
> that are based on a separate dataset. I am getting an error now. How do
> I
> add/imlement this secondary dataset? The error message says that this
> dataset does not exist. I presume it means the dataset does not exist in
> the
> report because the tables in sql server exist. How do I create this
> dataset?
> Thanks,
> Rich|||Nevermind. I figured it out. Goto Data, New Dataset.
I didn't check the entire list of datasets in the original report.
"Rich" wrote:
> Hello,
> I am just starting out with reporting services (I have a book which I have
> not read yet). I have copied the basic part of a report to a new report for
> learning purposes. This contains a parameter which I included in the query.
> This works so far. But the original report also includes a table of fields
> that are based on a separate dataset. I am getting an error now. How do I
> add/imlement this secondary dataset? The error message says that this
> dataset does not exist. I presume it means the dataset does not exist in the
> report because the tables in sql server exist. How do I create this dataset?
> Thanks,
> Rich|||Thanks. I am sort of having fun. At least I can get my report to run.
Note: I am outputting this report in Excel format. The first set of fields
(about 3 of them) are based on the first dataset - the master data. Then I
have the 2nd dataset which is the detail data (about 6 fields). When I run
the report (outside of VS, like from an Access database app) the first
dataset displays on the first sheet of an Excel workbook, but the 2nd
dataset, the detail data, is displaying on a 2nd Excel sheet. How can I keep
the detail data on the same sheet as the master data? Is there something I
need to do in the Layout view in VS?
Thanks,
Rich
"Ricardo" wrote:
> open report project by using visual studio
> open report document (double click the report file - solution explorer)
> go to Data tab (Data / Layout / Preview)
> click dataset dropdown and choose <new dataset...>
> have fun
> "Rich" <Rich@.discussions.microsoft.com> escreveu na mensagem
> news:D8EE2D83-6A8B-49AF-B875-DF9191DAD51A@.microsoft.com...
> > Hello,
> >
> > I am just starting out with reporting services (I have a book which I have
> > not read yet). I have copied the basic part of a report to a new report
> > for
> > learning purposes. This contains a parameter which I included in the
> > query.
> > This works so far. But the original report also includes a table of
> > fields
> > that are based on a separate dataset. I am getting an error now. How do
> > I
> > add/imlement this secondary dataset? The error message says that this
> > dataset does not exist. I presume it means the dataset does not exist in
> > the
> > report because the tables in sql server exist. How do I create this
> > dataset?
> >
> > Thanks,
> > Rich
>
>
Friday, March 23, 2012
Problem Reading .CSV file data from reporting services
In our application we are using DTS to import data from .csv file. now they came up with a requirement to compare data in .csv is exact match with imported data in the table using a report.
i had hard time to implement this. we tried two options to do so..
1. reading .csv file with custom extensions and rendering it on report (problem is datasource file name was standard, where a i am planning to read it from a table).
2. We have a separate DTS to read data from .csv but when we are accessing it from reproting services i am getting "Multistep OLE DB access error".
Can some one guide me right way to implement my requirement.
Thanks,
-Geeks..
You can use the XML rendering extension to output just the data in the report. then use an Integration Services (formerly DTS) package to compare the input and output data.
Hope that helps,
-Lukasz
Problem Reading .CSV file data from reporting services
In our application we are using DTS to import data from .csv file. now they came up with a requirement to compare data in .csv is exact match with imported data in the table using a report.
i had hard time to implement this. we tried two options to do so..
1. reading .csv file with custom extensions and rendering it on report (problem is datasource file name was standard, where a i am planning to read it from a table).
2. We have a separate DTS to read data from .csv but when we are accessing it from reproting services i am getting "Multistep OLE DB access error".
Can some one guide me right way to implement my requirement.
Thanks,
-Geeks..
You can use the XML rendering extension to output just the data in the report. then use an Integration Services (formerly DTS) package to compare the input and output data.
Hope that helps,
-Lukasz
Problem printing reports
Hello,
When print reports in Reporting Services 2005, the default paper is "A4", but our reports have letter size, or even "A3" or "legal". Could we set a default paper for printing for each report?
thanks,
Pablo Orte
Can't anybody help me?
:-/
|||In the layout tab of the report designer, right click on an area outside your report and select properties. Then, set the height, width, and margins.I hope this helps.
TF|||
This is already done, but when you want to print the report the page is still "a4"
Thanks
|||Try to change the paper size in Report > Report Properties. Then Click on the LayOut tab. There you can just indicate the Page Width and Page Height of your report.
Hope this helps..
|||Hum... what part of "already done" don′t you understand?
The size is correct when I export to PDF, but the print paper doesn′t change.
|||Well.. if that doesnt work, maybe you can just try adjusting your fields or tables.. to accomodate the paper size you prefer.. because, maybe the paper size is correct but maybe you have a very big table.. Try to adjust the fonts size and/or the table margins..|||The size, margins, and textboxes/table size are correct, but the default paper when you click on "print" is "A4", when the report size is much bigger.|||What about changing the paper orietation.. like from portrait to landscape or vise versa.. you can do that by interchanging the width size and height size..
Sorry but im out of ideas..
|||The orientation has been changed too, it is in landscape. Don't worry.|||I have the same problem. Its as if SRS doesn't communicate with the printer.
|||We solved it. It was a printer drivers problem.
Our customers could print with the rigth paper in ther PCs.
Problem printing reports
Hello,
When print reports in Reporting Services 2005, the default paper is "A4", but our reports have letter size, or even "A3" or "legal". Could we set a default paper for printing for each report?
thanks,
Pablo Orte
Can't anybody help me?
:-/
|||In the layout tab of the report designer, right click on an area outside your report and select properties. Then, set the height, width, and margins.I hope this helps.
TF|||
This is already done, but when you want to print the report the page is still "a4"
Thanks
|||Try to change the paper size in Report > Report Properties. Then Click on the LayOut tab. There you can just indicate the Page Width and Page Height of your report.
Hope this helps..
|||Hum... what part of "already done" don′t you understand?
The size is correct when I export to PDF, but the print paper doesn′t change.
|||Well.. if that doesnt work, maybe you can just try adjusting your fields or tables.. to accomodate the paper size you prefer.. because, maybe the paper size is correct but maybe you have a very big table.. Try to adjust the fonts size and/or the table margins..|||The size, margins, and textboxes/table size are correct, but the default paper when you click on "print" is "A4", when the report size is much bigger.|||What about changing the paper orietation.. like from portrait to landscape or vise versa.. you can do that by interchanging the width size and height size..
Sorry but im out of ideas..
|||The orientation has been changed too, it is in landscape. Don't worry.|||I have the same problem. Its as if SRS doesn't communicate with the printer.
|||We solved it. It was a printer drivers problem.
Our customers could print with the rigth paper in ther PCs.
Problem Printing local report in Sql reporting services
I have a local report for which i am binding the Dataset dynamically. I am trying to print this report using a seperate button on the page. I saw in the forums saying that the reportviewer can be converted to an EMF file, bind this to an image control and can Print this image using Javascript.
Can anyone help me with the sample code to print local report from the reportviewer (it may be in any approach.)
Thanks in advance.
Sekhar TThis thread should help.http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=790287&SiteID=1&mode=1&PageID=0
or at least get you on the right path.|||
Am sorry, my app is not windows, it is web based
I tried it but didn't help me a lot. My requirement is to allow clients to print reports from their browsers. I am using a single reportviewer control to display reports by dynamically binding different business objects and reports. One important thing to notice is that my connection string changes on user selection.
I am not really sure if there is another way using server mode to do this. I don't want to create reports to each database on the server. I am looking for a solution where i can use the same report for different databases.
|||When you say "One important thing to notice is that my connection string changes on user selection." you mean you're connecting to different reporting servers?Here's my class. at the moment i'm confused as to why the 2nd device info has a start page of + 1 where the 1st one is set to 0. But it should work for you, assuming you know how to change the properties on each report server, aka changing the reportview.serverreport.reportpath, and the reportview.serverreport.reportserverurl. (these contain the same info as the connection string)
Hope this helps.
using System;
using System.IO;
using System.Data;
using System.Text;
using System.Drawing.Imaging;
using System.Drawing.Printing;
using System.Collections.Generic;
using System.Collections.Specialized;
using Microsoft.Reporting.WebForms;
using Microsoft.Reporting;
using System.Drawing;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Demo demo = new Demo();
demo.Run();
}
}
public class Demo : IDisposable
{
private int m_currentPageIndex;
private IList<Stream> m_streams;
private void Export(ServerReport report)
{
string deviceInfo =
"<DeviceInfo>" +
"<OutputFormat>EMF</OutputFormat>" +
" <MarginTop>0.25in</MarginTop>" +
" <MarginLeft>0.25in</MarginLeft>" +
" <MarginRight>0.25in</MarginRight>" +
" <MarginBottom>0.25in</MarginBottom>" +
" <StartPage>0</StartPage>" +
"</DeviceInfo>";
m_streams = new List<Stream>();
string encoding;
string mimeType;
string extension;
Warning[] warnings;
string[] streamIDs = null;
Byte[][] pages = null;
//Create Byte array containing the rendered image. of the 1st page.
Byte[] firstPage = report.Render("Image", deviceInfo, out mimeType, out encoding, out extension, out streamIDs, out warnings);
m_streams.Add(new MemoryStream(firstPage));
// The total number of pages of the report is 1 + the streamIDs
int m_numberOfPages = streamIDs.Length + 1;
pages = new Byte[m_numberOfPages][];
// The first page was already rendered
pages[0] = firstPage;
for (int pageIndex = 1; pageIndex < m_numberOfPages; pageIndex++)
{
// Build device info based on start page
deviceInfo = String.Format(
"<DeviceInfo>" +
"<OutputFormat>EMF</OutputFormat>" +
" <MarginTop>0.25in</MarginTop>" +
" <MarginLeft>0.25in</MarginLeft>" +
" <MarginRight>0.25in</MarginRight>" +
" <MarginBottom>0.25in</MarginBottom>" +
" <StartPage>{0}</StartPage>" +
"</DeviceInfo>", pageIndex+1);
//Render the page to a byte array.
pages[pageIndex] = report.Render("Image", deviceInfo, out mimeType, out encoding, out extension, out streamIDs, out warnings);
//create a stream of the page's byte array
m_streams.Add(new MemoryStream(pages[pageIndex]));
//set the position of the stream to 0 to make sure when the stream is read
//it starts from the beginning.
m_streams[m_streams.Count-1].Position = 0;
}
m_currentPageIndex = 0;
}
private void PrintPage(object sender, PrintPageEventArgs ev)
{
//create a new metafile based on the page that we're trying to print.
Metafile pageImage = new Metafile(m_streams[m_currentPageIndex]);
//draw the an image deciding what to draw, and where to place it on the page.
ev.Graphics.DrawImage(pageImage, 0, 0);
//increment to the next page.
m_currentPageIndex++;
//decide if we've read our last stream.
ev.HasMorePages = (m_currentPageIndex < m_streams.Count);
}
private void Print()
{
//the name of the printer.
const string printerName = "Microsoft Office Document Image Writer";//;"\\\\NPSERVER\\MAIN"
//if there's nothing to print return
if (m_streams == null || m_streams.Count == 0)
return;
//create the printdocument object
PrintDocument printDoc = new PrintDocument();
//set the printername, deal w/ the printer being invalid
printDoc.PrinterSettings.PrinterName = printerName;
if (!printDoc.PrinterSettings.IsValid)
{
string msg = String.Format("Can't find printer \"{0}\".", printerName);
System.Diagnostics.Debug.WriteLine(msg);
return;
}
//attatch an event handler that will fire for each page that is printed.
printDoc.PrintPage += new PrintPageEventHandler(PrintPage);
//call print method, which get's the process going and ultimately calls the printpage method via the eventhandler.
printDoc.Print();
}
public void Run()
{
//create a new reportviewer object
ReportViewer rv = new ReportViewer();
//set the serverreport properties
rv.ServerReport.ReportPath = "/CRAMReports/ConcentrationReport";
rv.ServerReport.ReportServerUrl = new System.Uri("http://localhost/reportserver");
//configure params
List<ReportParameter> myParams = new List<ReportParameter>();
ReportParameter param = new ReportParameter("NAV", "0", false);
myParams.Add(param);
//set the params based on the param list.
rv.ServerReport.SetParameters(myParams);
//call the export method that builds the stream list.
Export(rv.ServerReport);
//call the print funciton
Print();
//call dispose which closes all the streams.
Dispose();
}
public void Dispose()
{
if (m_streams != null)
{
foreach (Stream stream in m_streams)
stream.Close();
}
}
}
|||
I am using reportviewer in local mode, where i am not using sql reporting server.
what i meant saying different connection strings is for different business objects from different databases in sql server 2005. we have different databases in sql server 2005.
Does your solution print from the browser? shall give it a try now
Thnks
Hi, i have add that code
and everything is very good when i run it local through the visual Studio 2005
but when i upload the Application and run it thought the IIS the printing doent work and i dont know why.
Note: i am using local report.
i hope any one help coz i need it so much
|||Hi, i have add that code
and everything is very good when i run it local through the visual Studio 2005
but when i upload the Application and run it thought the IIS the printing doent work and i dont know why.
Note: i am using local report.
|||What type of printers do you have? What are the print drivers?|||hi,
i dont know if i understand your question well or not but iam using printer HP DeskJet 1220C from my client PC,
i hope i answer your question ,
i hope you help me soon because i need this part so much.
Maylo
|||Guys,
There seem to be a couple of confusions here (I may be misreading the messages, but I'm going to give this a try anyway).
1. Sekhar T, even though you are using "local mode", not server mode, it's not like the actual databinding is happening on the client. It's happening on your web server. So to my mind the fact that you are dynamically binding is not all that relevant. You have the same opportunity in a "separate button" as you do when the page is normally posted back, to evaluate the user's needs and re-bind.
2. While it is true that report pages can be rendered to EMF, that doesn't make sense in your case. First, because you would be doing that on the web server (which has nothing to do with printing in the browser, agreed) and second, because I am not sure localmode reports can render to EMFs.
3. *HOWEVER* localmode reports can render to PDFs and of course PDFs can be easily printed by the user. While the user can already export to PDF from the reportviewer interface, you can in fact use a separate button for this purpose on the web page. See code below; I will include some binding code.
Code Snippet
Partial Class pages_Default
Inherits System.Web.UI.Page
' here's a sketch of how to send the PDF
' back from your separate button
Protected Sub Button1_Click( _
ByVal sender As Object, ByVal e As System.EventArgs) _
Handles Button1.Click
Dim buffer As Byte(), f As String, fs As System.IO.FileStream
f = System.IO.Path.GetTempFileName()
System.IO.Path.ChangeExtension(f, "PDF")
' there is probably a better way to set up the rendered PDF
' for redirecting to the Response output, but this one works.
' here is the binding bit. Revise to suit your dynamic situation.
' if you aren't really dynamically binding data against one
' loaded report, but rather changing
' reports to suit the user's needs, that will work too.
Dim ReportDataSourceX = _
New Microsoft.Reporting.WebForms.ReportDataSource()
ReportDataSourceX.Name = "DataSet1_Recipient"
ReportDataSourceX.Value = Me.SqlDataSource1
With Me.ReportViewer1.LocalReport
.DataSources.Clear()
.DataSources.Add(ReportDataSourceX)
buffer = .Render("PDF", Nothing, Nothing, Nothing, _
Nothing, Nothing, Nothing)
End With
fs = New System.IO.FileStream(f, System.IO.FileMode.Create)
fs.Write(buffer, 0, buffer.Length)
fs.Close()
fs.Dispose()
Response.ContentType = "Application/pdf"
Response.WriteFile(f)
Response.End()
System.IO.File.Delete(f)
End Sub
End Class
4. I am not so sure that it makes sense to have the separate button actually do the printing instead of bringing back the PDF and having the user print. If the user has to push a button anyway, shouldn't the user be able to make the normal printing decisions (such as what printer and features to use)? This is kind of the nature of a browser-based application.
5. If you really wanted javascript to print, the code would be a little different than what you see below, but not all that much. Instead of being a server-side control, I would use a "regular" button. The client side script would post to a URL that contained the required information for this user to get the report and data the way the user needed it. The client side script would receive back this data from its post and then probably save the file locally, finally sending the file out to the printer. However I don'tt think this is going to work in a whole bunch of security-limited cases. It requires too much control by script in the browser complex. Try what I"m suggesting in points 3 and 4, please, and think it over...
HTH,
>L<
Problem Printing local report in Sql reporting services
I have a local report for which i am binding the Dataset dynamically. I am trying to print this report using a seperate button on the page. I saw in the forums saying that the reportviewer can be converted to an EMF file, bind this to an image control and can Print this image using Javascript.
Can anyone help me with the sample code to print local report from the reportviewer (it may be in any approach.)
Thanks in advance.
Sekhar TThis thread should help.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=790287&SiteID=1&mode=1&PageID=0
or at least get you on the right path.
|||
Am sorry, my app is not windows, it is web based
I tried it but didn't help me a lot. My requirement is to allow clients to print reports from their browsers. I am using a single reportviewer control to display reports by dynamically binding different business objects and reports. One important thing to notice is that my connection string changes on user selection.
I am not really sure if there is another way using server mode to do this. I don't want to create reports to each database on the server. I am looking for a solution where i can use the same report for different databases.
|||When you say "One important thing to notice is that my connection string changes on user selection." you mean you're connecting to different reporting servers?Here's my class. at the moment i'm confused as to why the 2nd device info has a start page of + 1 where the 1st one is set to 0. But it should work for you, assuming you know how to change the properties on each report server, aka changing the reportview.serverreport.reportpath, and the reportview.serverreport.reportserverurl. (these contain the same info as the connection string)
Hope this helps.
using System;
using System.IO;
using System.Data;
using System.Text;
using System.Drawing.Imaging;
using System.Drawing.Printing;
using System.Collections.Generic;
using System.Collections.Specialized;
using Microsoft.Reporting.WebForms;
using Microsoft.Reporting;
using System.Drawing;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Demo demo = new Demo();
demo.Run();
}
}
public class Demo : IDisposable
{
private int m_currentPageIndex;
private IList<Stream> m_streams;
private void Export(ServerReport report)
{
string deviceInfo =
"<DeviceInfo>" +
"<OutputFormat>EMF</OutputFormat>" +
" <MarginTop>0.25in</MarginTop>" +
" <MarginLeft>0.25in</MarginLeft>" +
" <MarginRight>0.25in</MarginRight>" +
" <MarginBottom>0.25in</MarginBottom>" +
" <StartPage>0</StartPage>" +
"</DeviceInfo>";
m_streams = new List<Stream>();
string encoding;
string mimeType;
string extension;
Warning[] warnings;
string[] streamIDs = null;
Byte[][] pages = null;
//Create Byte array containing the rendered image. of the 1st page.
Byte[] firstPage = report.Render("Image", deviceInfo, out mimeType, out encoding, out extension, out streamIDs, out warnings);
m_streams.Add(new MemoryStream(firstPage));
// The total number of pages of the report is 1 + the streamIDs
int m_numberOfPages = streamIDs.Length + 1;
pages = new Byte[m_numberOfPages][];
// The first page was already rendered
pages[0] = firstPage;
for (int pageIndex = 1; pageIndex < m_numberOfPages; pageIndex++)
{
// Build device info based on start page
deviceInfo = String.Format(
"<DeviceInfo>" +
"<OutputFormat>EMF</OutputFormat>" +
" <MarginTop>0.25in</MarginTop>" +
" <MarginLeft>0.25in</MarginLeft>" +
" <MarginRight>0.25in</MarginRight>" +
" <MarginBottom>0.25in</MarginBottom>" +
" <StartPage>{0}</StartPage>" +
"</DeviceInfo>", pageIndex+1);
//Render the page to a byte array.
pages[pageIndex] = report.Render("Image", deviceInfo, out mimeType, out encoding, out extension, out streamIDs, out warnings);
//create a stream of the page's byte array
m_streams.Add(new MemoryStream(pages[pageIndex]));
//set the position of the stream to 0 to make sure when the stream is read
//it starts from the beginning.
m_streams[m_streams.Count-1].Position = 0;
}
m_currentPageIndex = 0;
}
private void PrintPage(object sender, PrintPageEventArgs ev)
{
//create a new metafile based on the page that we're trying to print.
Metafile pageImage = new Metafile(m_streams[m_currentPageIndex]);
//draw the an image deciding what to draw, and where to place it on the page.
ev.Graphics.DrawImage(pageImage, 0, 0);
//increment to the next page.
m_currentPageIndex++;
//decide if we've read our last stream.
ev.HasMorePages = (m_currentPageIndex < m_streams.Count);
}
private void Print()
{
//the name of the printer.
const string printerName = "Microsoft Office Document Image Writer";//;"\\\\NPSERVER\\MAIN"
//if there's nothing to print return
if (m_streams == null || m_streams.Count == 0)
return;
//create the printdocument object
PrintDocument printDoc = new PrintDocument();
//set the printername, deal w/ the printer being invalid
printDoc.PrinterSettings.PrinterName = printerName;
if (!printDoc.PrinterSettings.IsValid)
{
string msg = String.Format("Can't find printer \"{0}\".", printerName);
System.Diagnostics.Debug.WriteLine(msg);
return;
}
//attatch an event handler that will fire for each page that is printed.
printDoc.PrintPage += new PrintPageEventHandler(PrintPage);
//call print method, which get's the process going and ultimately calls the printpage method via the eventhandler.
printDoc.Print();
}
public void Run()
{
//create a new reportviewer object
ReportViewer rv = new ReportViewer();
//set the serverreport properties
rv.ServerReport.ReportPath = "/CRAMReports/ConcentrationReport";
rv.ServerReport.ReportServerUrl = new System.Uri("http://localhost/reportserver");
//configure params
List<ReportParameter> myParams = new List<ReportParameter>();
ReportParameter param = new ReportParameter("NAV", "0", false);
myParams.Add(param);
//set the params based on the param list.
rv.ServerReport.SetParameters(myParams);
//call the export method that builds the stream list.
Export(rv.ServerReport);
//call the print funciton
Print();
//call dispose which closes all the streams.
Dispose();
}
public void Dispose()
{
if (m_streams != null)
{
foreach (Stream stream in m_streams)
stream.Close();
}
}
}
|||
I am using reportviewer in local mode, where i am not using sql reporting server.
what i meant saying different connection strings is for different business objects from different databases in sql server 2005. we have different databases in sql server 2005.
Does your solution print from the browser? shall give it a try now
Thnks
Hi, i have add that code
and everything is very good when i run it local through the visual Studio 2005
but when i upload the Application and run it thought the IIS the printing doent work and i dont know why.
Note: i am using local report.
i hope any one help coz i need it so much
|||Hi, i have add that code
and everything is very good when i run it local through the visual Studio 2005
but when i upload the Application and run it thought the IIS the printing doent work and i dont know why.
Note: i am using local report.
|||What type of printers do you have? What are the print drivers?|||hi,
i dont know if i understand your question well or not but iam using printer HP DeskJet 1220C from my client PC,
i hope i answer your question ,
i hope you help me soon because i need this part so much.
Maylo
|||Guys,
There seem to be a couple of confusions here (I may be misreading the messages, but I'm going to give this a try anyway).
1. Sekhar T, even though you are using "local mode", not server mode, it's not like the actual databinding is happening on the client. It's happening on your web server. So to my mind the fact that you are dynamically binding is not all that relevant. You have the same opportunity in a "separate button" as you do when the page is normally posted back, to evaluate the user's needs and re-bind.
2. While it is true that report pages can be rendered to EMF, that doesn't make sense in your case. First, because you would be doing that on the web server (which has nothing to do with printing in the browser, agreed) and second, because I am not sure localmode reports can render to EMFs.
3. *HOWEVER* localmode reports can render to PDFs and of course PDFs can be easily printed by the user. While the user can already export to PDF from the reportviewer interface, you can in fact use a separate button for this purpose on the web page. See code below; I will include some binding code.
Code Snippet
PartialClass pages_Default
Inherits System.Web.UI.Page
' here's a sketch of how to send the PDF
' back from your separate button
ProtectedSub Button1_Click( _
ByVal sender AsObject, ByVal e As System.EventArgs) _
Handles Button1.Click
Dim buffer AsByte(), f AsString, fs As System.IO.FileStream
f = System.IO.Path.GetTempFileName()
System.IO.Path.ChangeExtension(f, "PDF")
' there is probably a better way to set up the rendered PDF
' for redirecting to the Response output, but this one works.
' here is the binding bit. Revise to suit your dynamic situation.
' if you aren't really dynamically binding data against one
' loaded report, but rather changing
' reports to suit the user's needs, that will work too.
Dim ReportDataSourceX = _
New Microsoft.Reporting.WebForms.ReportDataSource()
ReportDataSourceX.Name = "DataSet1_Recipient"
ReportDataSourceX.Value = Me.SqlDataSource1
WithMe.ReportViewer1.LocalReport
.DataSources.Clear()
.DataSources.Add(ReportDataSourceX)
buffer = .Render("PDF", Nothing, Nothing, Nothing, _
Nothing, Nothing, Nothing)
EndWith
fs = New System.IO.FileStream(f, System.IO.FileMode.Create)
fs.Write(buffer, 0, buffer.Length)
fs.Close()
fs.Dispose()
Response.ContentType = "Application/pdf"
Response.WriteFile(f)
Response.End()
System.IO.File.Delete(f)
EndSub
EndClass
4. I am not so sure that it makes sense to have the separate button actually do the printing instead of bringing back the PDF and having the user print. If the user has to push a button anyway, shouldn't the user be able to make the normal printing decisions (such as what printer and features to use)? This is kind of the nature of a browser-based application.
5. If you really wanted javascript to print, the code would be a little different than what you see below, but not all that much. Instead of being a server-side control, I would use a "regular" button. The client side script would post to a URL that contained the required information for this user to get the report and data the way the user needed it. The client side script would receive back this data from its post and then probably save the file locally, finally sending the file out to the printer. However I don'tt think this is going to work in a whole bunch of security-limited cases. It requires too much control by script in the browser complex. Try what I"m suggesting in points 3 and 4, please, and think it over...
HTH,
>L<
Problem Printing local report in Sql reporting services
I have a local report for which i am binding the Dataset dynamically. I am trying to print this report using a seperate button on the page. I saw in the forums saying that the reportviewer can be converted to an EMF file, bind this to an image control and can Print this image using Javascript.
Can anyone help me with the sample code to print local report from the reportviewer (it may be in any approach.)
Thanks in advance.
Sekhar TThis thread should help.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=790287&SiteID=1&mode=1&PageID=0
or at least get you on the right path.
|||
Am sorry, my app is not windows, it is web based
I tried it but didn't help me a lot. My requirement is to allow clients to print reports from their browsers. I am using a single reportviewer control to display reports by dynamically binding different business objects and reports. One important thing to notice is that my connection string changes on user selection.
I am not really sure if there is another way using server mode to do this. I don't want to create reports to each database on the server. I am looking for a solution where i can use the same report for different databases.
|||When you say "One important thing to notice is that my connection string changes on user selection." you mean you're connecting to different reporting servers?Here's my class. at the moment i'm confused as to why the 2nd device info has a start page of + 1 where the 1st one is set to 0. But it should work for you, assuming you know how to change the properties on each report server, aka changing the reportview.serverreport.reportpath, and the reportview.serverreport.reportserverurl. (these contain the same info as the connection string)
Hope this helps.
using System;
using System.IO;
using System.Data;
using System.Text;
using System.Drawing.Imaging;
using System.Drawing.Printing;
using System.Collections.Generic;
using System.Collections.Specialized;
using Microsoft.Reporting.WebForms;
using Microsoft.Reporting;
using System.Drawing;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Demo demo = new Demo();
demo.Run();
}
}
public class Demo : IDisposable
{
private int m_currentPageIndex;
private IList<Stream> m_streams;
private void Export(ServerReport report)
{
string deviceInfo =
"<DeviceInfo>" +
"<OutputFormat>EMF</OutputFormat>" +
" <MarginTop>0.25in</MarginTop>" +
" <MarginLeft>0.25in</MarginLeft>" +
" <MarginRight>0.25in</MarginRight>" +
" <MarginBottom>0.25in</MarginBottom>" +
" <StartPage>0</StartPage>" +
"</DeviceInfo>";
m_streams = new List<Stream>();
string encoding;
string mimeType;
string extension;
Warning[] warnings;
string[] streamIDs = null;
Byte[][] pages = null;
//Create Byte array containing the rendered image. of the 1st page.
Byte[] firstPage = report.Render("Image", deviceInfo, out mimeType, out encoding, out extension, out streamIDs, out warnings);
m_streams.Add(new MemoryStream(firstPage));
// The total number of pages of the report is 1 + the streamIDs
int m_numberOfPages = streamIDs.Length + 1;
pages = new Byte[m_numberOfPages][];
// The first page was already rendered
pages[0] = firstPage;
for (int pageIndex = 1; pageIndex < m_numberOfPages; pageIndex++)
{
// Build device info based on start page
deviceInfo = String.Format(
"<DeviceInfo>" +
"<OutputFormat>EMF</OutputFormat>" +
" <MarginTop>0.25in</MarginTop>" +
" <MarginLeft>0.25in</MarginLeft>" +
" <MarginRight>0.25in</MarginRight>" +
" <MarginBottom>0.25in</MarginBottom>" +
" <StartPage>{0}</StartPage>" +
"</DeviceInfo>", pageIndex+1);
//Render the page to a byte array.
pages[pageIndex] = report.Render("Image", deviceInfo, out mimeType, out encoding, out extension, out streamIDs, out warnings);
//create a stream of the page's byte array
m_streams.Add(new MemoryStream(pages[pageIndex]));
//set the position of the stream to 0 to make sure when the stream is read
//it starts from the beginning.
m_streams[m_streams.Count-1].Position = 0;
}
m_currentPageIndex = 0;
}
private void PrintPage(object sender, PrintPageEventArgs ev)
{
//create a new metafile based on the page that we're trying to print.
Metafile pageImage = new Metafile(m_streams[m_currentPageIndex]);
//draw the an image deciding what to draw, and where to place it on the page.
ev.Graphics.DrawImage(pageImage, 0, 0);
//increment to the next page.
m_currentPageIndex++;
//decide if we've read our last stream.
ev.HasMorePages = (m_currentPageIndex < m_streams.Count);
}
private void Print()
{
//the name of the printer.
const string printerName = "Microsoft Office Document Image Writer";//;"\\\\NPSERVER\\MAIN"
//if there's nothing to print return
if (m_streams == null || m_streams.Count == 0)
return;
//create the printdocument object
PrintDocument printDoc = new PrintDocument();
//set the printername, deal w/ the printer being invalid
printDoc.PrinterSettings.PrinterName = printerName;
if (!printDoc.PrinterSettings.IsValid)
{
string msg = String.Format("Can't find printer \"{0}\".", printerName);
System.Diagnostics.Debug.WriteLine(msg);
return;
}
//attatch an event handler that will fire for each page that is printed.
printDoc.PrintPage += new PrintPageEventHandler(PrintPage);
//call print method, which get's the process going and ultimately calls the printpage method via the eventhandler.
printDoc.Print();
}
public void Run()
{
//create a new reportviewer object
ReportViewer rv = new ReportViewer();
//set the serverreport properties
rv.ServerReport.ReportPath = "/CRAMReports/ConcentrationReport";
rv.ServerReport.ReportServerUrl = new System.Uri("http://localhost/reportserver");
//configure params
List<ReportParameter> myParams = new List<ReportParameter>();
ReportParameter param = new ReportParameter("NAV", "0", false);
myParams.Add(param);
//set the params based on the param list.
rv.ServerReport.SetParameters(myParams);
//call the export method that builds the stream list.
Export(rv.ServerReport);
//call the print funciton
Print();
//call dispose which closes all the streams.
Dispose();
}
public void Dispose()
{
if (m_streams != null)
{
foreach (Stream stream in m_streams)
stream.Close();
}
}
}
|||
I am using reportviewer in local mode, where i am not using sql reporting server.
what i meant saying different connection strings is for different business objects from different databases in sql server 2005. we have different databases in sql server 2005.
Does your solution print from the browser? shall give it a try now
Thnks
Hi, i have add that code
and everything is very good when i run it local through the visual Studio 2005
but when i upload the Application and run it thought the IIS the printing doent work and i dont know why.
Note: i am using local report.
i hope any one help coz i need it so much
|||Hi, i have add that code
and everything is very good when i run it local through the visual Studio 2005
but when i upload the Application and run it thought the IIS the printing doent work and i dont know why.
Note: i am using local report.
|||What type of printers do you have? What are the print drivers?|||hi,
i dont know if i understand your question well or not but iam using printer HP DeskJet 1220C from my client PC,
i hope i answer your question ,
i hope you help me soon because i need this part so much.
Maylo
|||Guys,
There seem to be a couple of confusions here (I may be misreading the messages, but I'm going to give this a try anyway).
1. Sekhar T, even though you are using "local mode", not server mode, it's not like the actual databinding is happening on the client. It's happening on your web server. So to my mind the fact that you are dynamically binding is not all that relevant. You have the same opportunity in a "separate button" as you do when the page is normally posted back, to evaluate the user's needs and re-bind.
2. While it is true that report pages can be rendered to EMF, that doesn't make sense in your case. First, because you would be doing that on the web server (which has nothing to do with printing in the browser, agreed) and second, because I am not sure localmode reports can render to EMFs.
3. *HOWEVER* localmode reports can render to PDFs and of course PDFs can be easily printed by the user. While the user can already export to PDF from the reportviewer interface, you can in fact use a separate button for this purpose on the web page. See code below; I will include some binding code.
Code Snippet
Partial Class pages_Default
Inherits System.Web.UI.Page
' here's a sketch of how to send the PDF
' back from your separate button
Protected Sub Button1_Click( _
ByVal sender As Object, ByVal e As System.EventArgs) _
Handles Button1.Click
Dim buffer As Byte(), f As String, fs As System.IO.FileStream
f = System.IO.Path.GetTempFileName()
System.IO.Path.ChangeExtension(f, "PDF")
' there is probably a better way to set up the rendered PDF
' for redirecting to the Response output, but this one works.
' here is the binding bit. Revise to suit your dynamic situation.
' if you aren't really dynamically binding data against one
' loaded report, but rather changing
' reports to suit the user's needs, that will work too.
Dim ReportDataSourceX = _
New Microsoft.Reporting.WebForms.ReportDataSource()
ReportDataSourceX.Name = "DataSet1_Recipient"
ReportDataSourceX.Value = Me.SqlDataSource1
With Me.ReportViewer1.LocalReport
.DataSources.Clear()
.DataSources.Add(ReportDataSourceX)
buffer = .Render("PDF", Nothing, Nothing, Nothing, _
Nothing, Nothing, Nothing)
End With
fs = New System.IO.FileStream(f, System.IO.FileMode.Create)
fs.Write(buffer, 0, buffer.Length)
fs.Close()
fs.Dispose()
Response.ContentType = "Application/pdf"
Response.WriteFile(f)
Response.End()
System.IO.File.Delete(f)
End Sub
End Class
4. I am not so sure that it makes sense to have the separate button actually do the printing instead of bringing back the PDF and having the user print. If the user has to push a button anyway, shouldn't the user be able to make the normal printing decisions (such as what printer and features to use)? This is kind of the nature of a browser-based application.
5. If you really wanted javascript to print, the code would be a little different than what you see below, but not all that much. Instead of being a server-side control, I would use a "regular" button. The client side script would post to a URL that contained the required information for this user to get the report and data the way the user needed it. The client side script would receive back this data from its post and then probably save the file locally, finally sending the file out to the printer. However I don'tt think this is going to work in a whole bunch of security-limited cases. It requires too much control by script in the browser complex. Try what I"m suggesting in points 3 and 4, please, and think it over...
HTH,
>L<
Monday, March 12, 2012
Problem of SQL Server 2005 Reporting service installation
I am following the Visual Studio Team Foundation Installation Guide.
The Steps I have done so far are:
1. Install SQL Server 2005 and assign application pool to reports and report server sites in IIS.
2. Try to install Team Foundation Server, but I noticed that it requires sharepoint service to be installed first. The service seems already installed in this computer. So I didn't reinstall the sharepoint service. When I try to exclude the SQL Server Reporting Services Web applications from share point service, the command throw exceptions. When I try to view the localhost/reports, the page has errors(Reports server Unable to generate a temporary class, CS2001: xxx.dll could not be found error CS2008: No inputs specified). xxx.dll refers to different dlls each time I request the page.
3. Uninstall Sharepoint and reinstall, still encounter the same problem.
4. Uninstall SQL Server 2005, I also noticed the ReportServer sites in IIS haven't been removed after uninstallation. So when I reinstall the SQL Server again, on the Report Server Installation Options page, I can't select Install the default configuration (default selection), instead the second option is selected which is no auto configuration(options are all grey out so I can't change the selection). After installation, the report server site get a no page found error.
I also noticed in IIS - Report Server(Stop) can't be start. I get a Parameter is incorrect error when I try to restart. There is two sites underIIS - Report Server(Stop) , they are Reports and ReportServer, they seems correct. But if right click the Report Server(Stop) and click Properties - Asp.NET tab. It point to the D:\Program Files\Microsoft SQL Server\InetPub\wwwroot\web.config. However, I can't find any web.config under Microsoft SQL Server\InetPub\wwwroot\. So it seems something missing there...
Please help... Any idea and suggestion are welcome!
There are a lot of pieces at work here. For some reason, SharePoint doesn't seem to be too happy. We are working on making the RS and SP combination setup experience better but this won't be until RTM. Here is what I would do:
1. Uninstall SQL Server (and RS). Delete the virtual directories in IIS and the SQL directories in the file system (including the databases)
2. Uninstall the .NET Framework 2.0 (this shouldn't be the reason, but just to be safe)
3. Reinstall SharePoint. Make sure that it is working, including the ability to exclude virtual directories.
4. Install RS. You might have to go with a 'non-default' install and use the RS Configuration tool to create the virtual directories. They will need to be in a different application pool than SharePoint. If the default install works, you will need to change the application pool for the vdirs created by setup.
5. Exclude the RS virtual directories in the SP Site Configuration.|||Thank you for your detailed information. One more question, I installed Active Directory after installed the IIS. In your case, did you install IIS after you install AD or before? I just wonder whether I should reinstall IIS.
Cheers|||Thank you very much, I uninstall IIS and sharepoint and reinstall them, everything works fine so I eventually can begin install the Foundation server, but when I install the server, I get 32000 error.
Error 32000. The Commandline "D:\ProgramFiles\Microsoft Visual Studio 2005 Enterprise Server\BISIISDIR\sdk\bin\tfsadaminst.exe" /install DIONYSUS 2420 TFGSS Hyperknowledge\TFSSETUP' return non-zero value:1
I have a look the event viewer and these errors are all cannot create *** performance counter, for example:
The report server cannot create the Cache Misses/Sec (Semantic Models) performance counter.
I wonder wether the memory is not enough in the machine...
Problem of merged cells in excel format after exporting from SQL Reporting Services 2000
Hi All,
I've faced a difficult problem. After exporting any report from reporting services to excel file format, in excel sheet there are several merged cells appearing in a cell. I'm using SQL Server 2000 & Microsoft Visual Studio .Net 2003.
Can anyone help me out regarding this? Is there any method in reporting services, so that every column will appear into one cell in excel sheet after exporting the report?
Thanks,
Uttam Kr. Dhar
Medi Assist India Pvt. Ltd.
Do you have any report items either above or below the table in your report? If so, that's probably the cause of the merged cells.
The Excel rendering extension will merge cells throughout the worksheet in order to preserve the defined report layout. Most often, this happens when there is a textbox above the table that functions as a header. If the boundary of the textbox ends in the middle of a table cell, cells will need to be merged.
Try to ensure that the left or right edges of the report item line up with table columns in order to minimize cell merging.
For more information, see the "Excel" section of this article:
http://www.microsoft.com/technet/prodtechnol/sql/2005/rsdesign.mspx
-Chris
Problem of adding trusted accounts to reporting services: 'Some or all identity references
Hi
I created a new database called "TestReportServer" as mentioned in the installation instruction but I didn't
see (or could select) the option "Create the report server database in SharePoint integrated mode".
How can I select this option? Do I need to remove the reporing services and reinstall it again? Any suggestions?
After creating the database I get the error 'Some or all identity references could not be translated'.
The user I selected is a local administrator and has permission to all groups starting with wss.
I guess the database is not created as a sharepoint integration mode as I can start Server Management Studio
and see the database. Is that a correct assumption?
I hope somebody out there can help as I am strating to bang my head towards my desk right now :-)
What is the version of report server?
|||It is reporting services 2005.|||Do you know build number?|||How and where can I check that?|||It is Microsoft SQL Server Reporting Services Version 9.00.1399.00|||This is SQL Server 2005 RTM. Please install SP2 Nov CTP ( http://www.microsoft.com/downloads/details.aspx?FamilyID=d2da6579-d49c-4b25-8f8a-79d14145500d&DisplayLang=en )
Wednesday, March 7, 2012
Problem installing SQL Server Reporting Services
Reporting Services for serveral hours. My environment is as follows:
XP Pro, SQL Server 2000, SQL Server SP3a, .Net Framework, VS.Net
(Enterprise).
I have uninstalled/reinstalled SQL Server (and SP3a) - several times.
The problem is that when I try to install the RS I only get the option
to install the Client Components (not very helpful for developing
reports locally)
While this looks like a great tool I'm inclined to go back to using
Crystal Reports unless I can get this resolved without <<<wasting>>
much more time!
Anyone have any thoughts?
GlennYou only want the client app on your computer. You can only install the RS
Enterprise on a server. The client app works perfectly fine for developing
reports and deploying them locally to view them. You will have to setup a
separate report server to deploy reports into production, if I understand
your needs.
"Glenn Owens" <gowens@.nixonpeabody.com> wrote in message
news:bc4291aa.0408100706.3f11c1c1@.posting.google.com...
> I've been trying to install the MSDN Developers edition of SQL Server
> Reporting Services for serveral hours. My environment is as follows:
> XP Pro, SQL Server 2000, SQL Server SP3a, .Net Framework, VS.Net
> (Enterprise).
> I have uninstalled/reinstalled SQL Server (and SP3a) - several times.
> The problem is that when I try to install the RS I only get the option
> to install the Client Components (not very helpful for developing
> reports locally)
> While this looks like a great tool I'm inclined to go back to using
> Crystal Reports unless I can get this resolved without <<<wasting>>
> much more time!
> Anyone have any thoughts?
> Glenn|||You are supposed to be able to install this version of XP Pro (see this
link: http://www.microsoft.com/sql/reporting/productinfo/sysreqs.asp)
Do you have XP Pro with SP1?
Another point to consider, XP Pro does not have IIS by default running. Have
you installed IIS? Add/Remove Programs Windows Components.
IIS needs to be installed plus ASP.Net needs to be installed and running. My
guess is something with the web server is not setup correctly.
Bruce L-C
"Lance" <ldacy@.fellowshiptech.com> wrote in message
news:eOVowwufEHA.2468@.TK2MSFTNGP12.phx.gbl...
> You only want the client app on your computer. You can only install the
RS
> Enterprise on a server. The client app works perfectly fine for
developing
> reports and deploying them locally to view them. You will have to setup a
> separate report server to deploy reports into production, if I understand
> your needs.
>
> "Glenn Owens" <gowens@.nixonpeabody.com> wrote in message
> news:bc4291aa.0408100706.3f11c1c1@.posting.google.com...
> > I've been trying to install the MSDN Developers edition of SQL Server
> > Reporting Services for serveral hours. My environment is as follows:
> >
> > XP Pro, SQL Server 2000, SQL Server SP3a, .Net Framework, VS.Net
> > (Enterprise).
> >
> > I have uninstalled/reinstalled SQL Server (and SP3a) - several times.
> > The problem is that when I try to install the RS I only get the option
> > to install the Client Components (not very helpful for developing
> > reports locally)
> >
> > While this looks like a great tool I'm inclined to go back to using
> > Crystal Reports unless I can get this resolved without <<<wasting>>
> > much more time!
> >
> > Anyone have any thoughts?
> >
> > Glenn
>|||I am having the same problem.
"Glenn Owens" <gowens@.nixonpeabody.com> wrote in message
news:bc4291aa.0408100706.3f11c1c1@.posting.google.com...
> I've been trying to install the MSDN Developers edition of SQL Server
> Reporting Services for serveral hours. My environment is as follows:
> XP Pro, SQL Server 2000, SQL Server SP3a, .Net Framework, VS.Net
> (Enterprise).
> I have uninstalled/reinstalled SQL Server (and SP3a) - several times.
> The problem is that when I try to install the RS I only get the option
> to install the Client Components (not very helpful for developing
> reports locally)
> While this looks like a great tool I'm inclined to go back to using
> Crystal Reports unless I can get this resolved without <<<wasting>>
> much more time!
> Anyone have any thoughts?
> Glenn|||I'm having a similar problem...
Enterprise and Developer set up on one server machine, Developer on 2
other desktops. If you access Report Manager from the Server machine,
everything looks fine. But Report Manager accessed from the
non-server machines shows the top banner only... No tabs, no folders,
nothing below the line, so a developer can't upload without switching
over to the server, and even then there are often errors.
Is there some configuration subtlety we missed?
Otherwise this thing is giving me problems with OutOfMemory errors on
local debugs that I know aren't too big.
Ideas?
Jody
"Lance" <ldacy@.fellowshiptech.com> wrote in message news:<eOVowwufEHA.2468@.TK2MSFTNGP12.phx.gbl>...
> You only want the client app on your computer. You can only install the RS
> Enterprise on a server. The client app works perfectly fine for developing
> reports and deploying them locally to view them. You will have to setup a
> separate report server to deploy reports into production, if I understand
> your needs.
>
> "Glenn Owens" <gowens@.nixonpeabody.com> wrote in message
> news:bc4291aa.0408100706.3f11c1c1@.posting.google.com...
> > I've been trying to install the MSDN Developers edition of SQL Server
> > Reporting Services for serveral hours. My environment is as follows:
> >
> > XP Pro, SQL Server 2000, SQL Server SP3a, .Net Framework, VS.Net
> > (Enterprise).
> >
> > I have uninstalled/reinstalled SQL Server (and SP3a) - several times.
> > The problem is that when I try to install the RS I only get the option
> > to install the Client Components (not very helpful for developing
> > reports locally)
> >
> > While this looks like a great tool I'm inclined to go back to using
> > Crystal Reports unless I can get this resolved without <<<wasting>>
> > much more time!
> >
> > Anyone have any thoughts?
> >
> > Glenn|||Your problem seems different. He was having a problem installing. Your
problem seems to be accessing it. It looks to me like you haven't setup your
roles for the developers on other machines.
Bruce L-C
"JodyT" <datagal@.msn.com> wrote in message
news:f9d864c3.0408111251.61c4d16f@.posting.google.com...
> I'm having a similar problem...
> Enterprise and Developer set up on one server machine, Developer on 2
> other desktops. If you access Report Manager from the Server machine,
> everything looks fine. But Report Manager accessed from the
> non-server machines shows the top banner only... No tabs, no folders,
> nothing below the line, so a developer can't upload without switching
> over to the server, and even then there are often errors.
> Is there some configuration subtlety we missed?
> Otherwise this thing is giving me problems with OutOfMemory errors on
> local debugs that I know aren't too big.
> Ideas?
> Jody
>
> "Lance" <ldacy@.fellowshiptech.com> wrote in message
news:<eOVowwufEHA.2468@.TK2MSFTNGP12.phx.gbl>...
> > You only want the client app on your computer. You can only install the
RS
> > Enterprise on a server. The client app works perfectly fine for
developing
> > reports and deploying them locally to view them. You will have to setup
a
> > separate report server to deploy reports into production, if I
understand
> > your needs.
> >
> >
> > "Glenn Owens" <gowens@.nixonpeabody.com> wrote in message
> > news:bc4291aa.0408100706.3f11c1c1@.posting.google.com...
> > > I've been trying to install the MSDN Developers edition of SQL Server
> > > Reporting Services for serveral hours. My environment is as follows:
> > >
> > > XP Pro, SQL Server 2000, SQL Server SP3a, .Net Framework, VS.Net
> > > (Enterprise).
> > >
> > > I have uninstalled/reinstalled SQL Server (and SP3a) - several times.
> > > The problem is that when I try to install the RS I only get the option
> > > to install the Client Components (not very helpful for developing
> > > reports locally)
> > >
> > > While this looks like a great tool I'm inclined to go back to using
> > > Crystal Reports unless I can get this resolved without <<<wasting>>
> > > much more time!
> > >
> > > Anyone have any thoughts?
> > >
> > > Glenn|||Hello all. Thanks for the feedback... sorry for not finishing up the
thread.
My solution was to re-install WIN XP Pro SP1. Once SP1 was
re-installed RS installed with no further problems.
Hope this helps!
Glenn
"Kurt" <kurt_junk@.sdlf.com> wrote in message news:<OUz#lSzfEHA.1092@.TK2MSFTNGP11.phx.gbl>...
> I am having the same problem.
> "Glenn Owens" <gowens@.nixonpeabody.com> wrote in message
> news:bc4291aa.0408100706.3f11c1c1@.posting.google.com...
> > I've been trying to install the MSDN Developers edition of SQL Server
> > Reporting Services for serveral hours. My environment is as follows:
> >
> > XP Pro, SQL Server 2000, SQL Server SP3a, .Net Framework, VS.Net
> > (Enterprise).
> >
> > I have uninstalled/reinstalled SQL Server (and SP3a) - several times.
> > The problem is that when I try to install the RS I only get the option
> > to install the Client Components (not very helpful for developing
> > reports locally)
> >
> > While this looks like a great tool I'm inclined to go back to using
> > Crystal Reports unless I can get this resolved without <<<wasting>>
> > much more time!
> >
> > Anyone have any thoughts?
> >
> > Glenn
Saturday, February 25, 2012
Problem installing setup support files
trying to install Reporting Services Enterprise Ed. on a server machine with
configuration:
- Win 2003 Enterprise with SP1
- MS SQL 2000 Server with SP4
- IIS 6 with ASP.NET 1.1
Problem is that when I execute Setup.exe I receive an message: "Error!"
after only 2-3 seconds and thats it! No more info on what the error is or so.
Only option for me is to click Cancel and the installation ends.
This happens when setup tries to install Microsoft SQL Server Reporting
Services Setup Support Files which is the first to happen.
Please, anyone have an idea what this can be or even how to track down the
error?
No errors are reported in Event Viewer.
I have rerun aspnet_regiis just in case, witout any result.
Thanks.Found the problem!
I was running the installation from my local DVD logged in to the server via
Remote Desktop and my local disks shared.
Copied the installationfiles to server harddisk and it installed!
"Gizmo Gizmo" wrote:
> Hi,
> trying to install Reporting Services Enterprise Ed. on a server machine with
> configuration:
> - Win 2003 Enterprise with SP1
> - MS SQL 2000 Server with SP4
> - IIS 6 with ASP.NET 1.1
> Problem is that when I execute Setup.exe I receive an message: "Error!"
> after only 2-3 seconds and thats it! No more info on what the error is or so.
> Only option for me is to click Cancel and the installation ends.
> This happens when setup tries to install Microsoft SQL Server Reporting
> Services Setup Support Files which is the first to happen.
> Please, anyone have an idea what this can be or even how to track down the
> error?
> No errors are reported in Event Viewer.
> I have rerun aspnet_regiis just in case, witout any result.
> Thanks.
problem installing reporting services, help pls.
setup, it always show the "asp.net not installed or registered on server" and
"visual studio .net 2003 not installed" on the system check pre-requisite?,
my pc is with ms XP, VS Studio 2005, IIS, SQL Server 2000 with SP3, help
pls!, thanks a lot.
does the ms reporting services not supported on visual studio 2005?, help.You have to register ASP.NET on your IIS Server, this arrive when you
install IIS after VS.Net
In command prompt :
1=B0) Go to c:\WINDOWSDirectory\Microsoft.NET\Framework\v1.1.4322
2=B0) Run aspnet_regiis -i|||yep, I already did it, but unfortunately it still shows on pre requisite
system check. Is there actually a "sequence" on installing the vs studio
2005, sql server, iis etc?, thanks.
"rebeuapaname@.hotmail.com" wrote:
> You have to register ASP.NET on your IIS Server, this arrive when you
> install IIS after VS.Net
> In command prompt :
> 1°) Go to c:\WINDOWSDirectory\Microsoft.NET\Framework\v1.1.4322
> 2°) Run aspnet_regiis -i
>
Monday, February 20, 2012
Problem in x64 SQL Server 2005 setup
Trying to install 64-bit SQL Server 2005 RTM on Windows 2003 x64 Server with SP 1. The Reporting services option is not enabled in the installation steps. The installation process gets completed without any errors, but the Reporting Services is not installed.
The server has IIS installed, the .NET framework 2.0 is installed by SQL Server 2005 RTM itself. Am I doing anything wrong.
Can anyone help/suggest ?
Thanks in advance.
On x64 IIS can be configured to run native (64-bit) or WoW64 (32-bit). Check out this topic in Books Online: http://msdn2.microsoft.com/en-us/library/ms143293(en-US,SQL.90).aspx
You'll need to reverse engineer the steps to make sure IIS is configured to run native - provided you're installing the x64 version of SQL Server. If you're installing the 32-bit version of SQL Server on an x64 machine you'll want to follow this article as is.
Cheers,
Dan
Thanks for response. I am installing x64 SQL 2005 RTM on x64 Windows 2003. The IIS settings are exactly the same, what has been described in the article above.
The problem is I am not able to install Reporting Services 2005. The article describes about the problem for not being able to run it. I wonder the scenarios are different ?
I forgot to mention in my question first time, that the x64 Windows 2003, where I am trying to install x64 SQL 2005 RTM does have SQL 2000 installed (32-bit). I doubt this could be the problem ? Not sure.
Thanks in advance.
|||At the beginning of setup we run a configuration checker that checks the IIS configuration. If there is a problem with the IIS configuration you'll get a red circle with an X through it for the IIS entry. In addition, you won't be able to select Reporting Services from the feature selection dialog. Can you rerun setup and see if you get an error for IIS in the configuration checker. If you do post the error you get and we can continue trouble shooting - if I remember correctly there are a couple of IIS checks in the configuration checker.
BTW: Having SQL2K installed to WOW64 shouldn't have any impact on this.
Dan
|||Hi Dan,
I am having the same problem. I want to install SQL 2005 Std x64 on Windows 2003Std x64.
In sql installation wizard everything is great (inlcuding IIS). Only Reporting Servicing has this warning, with the message "
Looking on where the files will go I see "C:\Program files (x86)". I have the impression that entire SQL (database, olap, not just RS) is trying to install with 32bit version, not x64. Do you know why?
How can I be sure what SQL version will be installed?
I will appreciate and help,
Thanks,
Dan
P.S. This is the report from the System Configuration Check, in SQL install wizard.
System Configuration Check
- WMI Service Requirement (Success)
Messages
* WMI Service Requirement
* Check Passed
- MSXML Requirement (Success)
Messages
* MSXML Requirement
* Check Passed
- Operating System Minimum Level Requirement (Success)
Messages
* Operating System Minimum Level Requirement
* Check Passed
- Operating System Service Pack Level Requirement. (Success)
Messages
* Operating System Service Pack Level Requirement.
* Check Passed
- SQL Server Edition Operating System Compatibility (Success)
Messages
* SQL Server Edition Operating System Compatibility
* Check Passed
- Minimum Hardware Requirement (Success)
Messages
* Minimum Hardware Requirement
* Check Passed
- IIS Feature Requirement (Success)
Messages
* IIS Feature Requirement
* Check Passed
- Pending Reboot Requirement (Success)
Messages
* Pending Reboot Requirement
* Check Passed
- Performance Monitor Counter Requirement (Success)
Messages
* Performance Monitor Counter Requirement
* Check Passed
- Default Installation Path Permission Requirement (Success)
Messages
* Default Installation Path Permission Requirement
* Check Passed
- Internet Explorer Requirement (Success)
Messages
* Internet Explorer Requirement
* Check Passed
- COM Plus Catalog Requirement (Success)
Messages
* COM Plus Catalog Requirement
* Check Passed
- ASP.Net Version Registration Requirement (Warning)
Messages
* ASP.Net Version Registration Requirement
* 64-bit ASP.Net is Registered. Required 32-bit ASP.Net to install Microsoft Reporting Services 2005(32-bit).
- Minimum MDAC Version Requirement (Success)
Messages
* Minimum MDAC Version Requirement
* Check Passed
Problem in x64 SQL Server 2005 setup
Trying to install 64-bit SQL Server 2005 RTM on Windows 2003 x64 Server with SP 1. The Reporting services option is not enabled in the installation steps. The installation process gets completed without any errors, but the Reporting Services is not installed.
The server has IIS installed, the .NET framework 2.0 is installed by SQL Server 2005 RTM itself. Am I doing anything wrong.
Can anyone help/suggest ?
Thanks in advance.
On x64 IIS can be configured to run native (64-bit) or WoW64 (32-bit). Check out this topic in Books Online: http://msdn2.microsoft.com/en-us/library/ms143293(en-US,SQL.90).aspx
You'll need to reverse engineer the steps to make sure IIS is configured to run native - provided you're installing the x64 version of SQL Server. If you're installing the 32-bit version of SQL Server on an x64 machine you'll want to follow this article as is.
Cheers,
Dan
Thanks for response. I am installing x64 SQL 2005 RTM on x64 Windows 2003. The IIS settings are exactly the same, what has been described in the article above.
The problem is I am not able to install Reporting Services 2005. The article describes about the problem for not being able to run it. I wonder the scenarios are different ?
I forgot to mention in my question first time, that the x64 Windows 2003, where I am trying to install x64 SQL 2005 RTM does have SQL 2000 installed (32-bit). I doubt this could be the problem ? Not sure.
Thanks in advance.
|||At the beginning of setup we run a configuration checker that checks the IIS configuration. If there is a problem with the IIS configuration you'll get a red circle with an X through it for the IIS entry. In addition, you won't be able to select Reporting Services from the feature selection dialog. Can you rerun setup and see if you get an error for IIS in the configuration checker. If you do post the error you get and we can continue trouble shooting - if I remember correctly there are a couple of IIS checks in the configuration checker.
BTW: Having SQL2K installed to WOW64 shouldn't have any impact on this.
Dan
|||Hi Dan,
I am having the same problem. I want to install SQL 2005 Std x64 on Windows 2003Std x64.
In sql installation wizard everything is great (inlcuding IIS). Only Reporting Servicing has this warning, with the message "
Looking on where the files will go I see "C:\Program files (x86)". I have the impression that entire SQL (database, olap, not just RS) is trying to install with 32bit version, not x64. Do you know why?
How can I be sure what SQL version will be installed?
I will appreciate and help,
Thanks,
Dan
P.S. This is the report from the System Configuration Check, in SQL install wizard.
System Configuration Check
- WMI Service Requirement (Success)
Messages
* WMI Service Requirement
* Check Passed
- MSXML Requirement (Success)
Messages
* MSXML Requirement
* Check Passed
- Operating System Minimum Level Requirement (Success)
Messages
* Operating System Minimum Level Requirement
* Check Passed
- Operating System Service Pack Level Requirement. (Success)
Messages
* Operating System Service Pack Level Requirement.
* Check Passed
- SQL Server Edition Operating System Compatibility (Success)
Messages
* SQL Server Edition Operating System Compatibility
* Check Passed
- Minimum Hardware Requirement (Success)
Messages
* Minimum Hardware Requirement
* Check Passed
- IIS Feature Requirement (Success)
Messages
* IIS Feature Requirement
* Check Passed
- Pending Reboot Requirement (Success)
Messages
* Pending Reboot Requirement
* Check Passed
- Performance Monitor Counter Requirement (Success)
Messages
* Performance Monitor Counter Requirement
* Check Passed
- Default Installation Path Permission Requirement (Success)
Messages
* Default Installation Path Permission Requirement
* Check Passed
- Internet Explorer Requirement (Success)
Messages
* Internet Explorer Requirement
* Check Passed
- COM Plus Catalog Requirement (Success)
Messages
* COM Plus Catalog Requirement
* Check Passed
- ASP.Net Version Registration Requirement (Warning)
Messages
* ASP.Net Version Registration Requirement
* 64-bit ASP.Net is Registered. Required 32-bit ASP.Net to install Microsoft Reporting Services 2005(32-bit).
- Minimum MDAC Version Requirement (Success)
Messages
* Minimum MDAC Version Requirement
* Check Passed