Monday, March 26, 2012
External Images (URL Based) don't display on deployed reports
I have a RS 2005 report which uses a report parameter as the source for an
image external image. When in report designer, everything works fine. When
deployed, the image shows as red x.
I am not using unattended credentials since the image is accessible without
credentials. I even tried images from microsoft.com and cnn.com
Any help would be appreciated.
-PedroHi Pedro,
Probabily the image directory is not proper. Just right click on the Red x
or view source to see where the image points to and check the directory for
your image. Better to include it in your project so that the link is not lost.
Amarnath
"Pedro" wrote:
> Hello,
> I have a RS 2005 report which uses a report parameter as the source for an
> image external image. When in report designer, everything works fine. When
> deployed, the image shows as red x.
> I am not using unattended credentials since the image is accessible without
> credentials. I even tried images from microsoft.com and cnn.com
> Any help would be appreciated.
> -Pedro
>
>
External Image Problem, Please Help me out!
I put a logo image as external source and it works fine on reports server.
The image is in the same folder as report file. However, when I use reporting
service web service to get report as HTML format, I keep getting logon window
and red cross for the image even after I logon. I already follow the
instruction to set up unattended account and reboot server several times. But
it's still no working. The web server is a dormain controller and it's win2k
server with sp4.
Can anyone help me out? I really really appreciate it.
AnthonyCan someone help me this? I asked several questions before, and never got
answered.
"Anthony Wang" wrote:
> Hi,
> I put a logo image as external source and it works fine on reports server.
> The image is in the same folder as report file. However, when I use reporting
> service web service to get report as HTML format, I keep getting logon window
> and red cross for the image even after I logon. I already follow the
> instruction to set up unattended account and reboot server several times. But
> it's still no working. The web server is a dormain controller and it's win2k
> server with sp4.
> Can anyone help me out? I really really appreciate it.
> Anthony|||Images are not rendered by default with SOAP addressability. See
http://groups.google.com/group/microsoft.public.sqlserver.reportingsvcs/browse_frm/thread/ce78cc30cf781cc/5bbfe2e79a693f2c?lnk=st&q=renderstream+group%3A*.reportingsvcs+author%3Alachev&rnum=2&hl=en#5bbfe2e79a693f2c
Long story short, I highly recommend to switch to RS 2005 and use the report
viewer controls. They will handle the images for you.
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"Anthony Wang" <AnthonyWang@.discussions.microsoft.com> wrote in message
news:BB6C8F0C-56A4-44F1-9003-BAEC30EF3A11@.microsoft.com...
> Hi,
> I put a logo image as external source and it works fine on reports server.
> The image is in the same folder as report file. However, when I use
> reporting
> service web service to get report as HTML format, I keep getting logon
> window
> and red cross for the image even after I logon. I already follow the
> instruction to set up unattended account and reboot server several times.
> But
> it's still no working. The web server is a dormain controller and it's
> win2k
> server with sp4.
> Can anyone help me out? I really really appreciate it.
> Anthony|||thank you Teo, the link you give to me helps me a lot. Now I got it worked.
Really appreciate your help.
"Teo Lachev [MVP]" wrote:
> Images are not rendered by default with SOAP addressability. See
> http://groups.google.com/group/microsoft.public.sqlserver.reportingsvcs/browse_frm/thread/ce78cc30cf781cc/5bbfe2e79a693f2c?lnk=st&q=renderstream+group%3A*.reportingsvcs+author%3Alachev&rnum=2&hl=en#5bbfe2e79a693f2c
> Long story short, I highly recommend to switch to RS 2005 and use the report
> viewer controls. They will handle the images for you.
> --
> HTH,
> ---
> Teo Lachev, MVP, MCSD, MCT
> "Microsoft Reporting Services in Action"
> "Applied Microsoft Analysis Services 2005"
> Home page and blog: http://www.prologika.com/
> ---
> "Anthony Wang" <AnthonyWang@.discussions.microsoft.com> wrote in message
> news:BB6C8F0C-56A4-44F1-9003-BAEC30EF3A11@.microsoft.com...
> > Hi,
> >
> > I put a logo image as external source and it works fine on reports server.
> > The image is in the same folder as report file. However, when I use
> > reporting
> > service web service to get report as HTML format, I keep getting logon
> > window
> > and red cross for the image even after I logon. I already follow the
> > instruction to set up unattended account and reboot server several times.
> > But
> > it's still no working. The web server is a dormain controller and it's
> > win2k
> > server with sp4.
> >
> > Can anyone help me out? I really really appreciate it.
> >
> > Anthony
>
>
Monday, March 12, 2012
Extended Proc
I have compiled a dll in delphi but I cannot use it as extended procedure(it
always returns null). Here is my source and usage in sql server:
--
library testdll;
uses
SysUtils,
Classes;
{$R *.res}
function xp_a:string;
begin
{for test}
result:='10';
end;
exports xp_a;
end.
________________________________________
_
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
exec sp_addextendedproc N'xp_a', N'testdll.dll'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
________________________________________
_
declare @.a varchar(10)
exec master..xp_a @.a output
select @.a as output
--
Any help would be greatly appreciated.
LeilaYou can not return a string, you need to return it as an output parameter
instead, an XP always and only returns an integer.
See for examples and helper libraries:
http://www.howtodothings.com/viewar...spx?article=223
http://mastercluster.com/xproc.html
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Leila" <Leilas@.hotpop.com> wrote in message
news:OSr6YI6JFHA.2796@.tk2msftngp13.phx.gbl...
> Hi,
> I have compiled a dll in delphi but I cannot use it as extended
> procedure(it
> always returns null). Here is my source and usage in sql server:
> --
> library testdll;
> uses
> SysUtils,
> Classes;
> {$R *.res}
> function xp_a:string;
> begin
> {for test}
> result:='10';
> end;
> exports xp_a;
> end.
> ________________________________________
_
> SET QUOTED_IDENTIFIER OFF
> GO
> SET ANSI_NULLS OFF
> GO
> exec sp_addextendedproc N'xp_a', N'testdll.dll'
> GO
> SET QUOTED_IDENTIFIER OFF
> GO
> SET ANSI_NULLS ON
> GO
> ________________________________________
_
> declare @.a varchar(10)
> exec master..xp_a @.a output
> select @.a as output
> --
> Any help would be greatly appreciated.
> Leila
>
>
Friday, March 9, 2012
Expressions and Datareader Source
Greetings my SSIS friends,
Apologies for asking a similar question again but I am still non the wiser with this problem!
Let me explain to you my situation and the method I've adopted to try and solve it.
I have some source data residing in a SQL Server 6.5 database. The source data consists of a single table. For this example I will assume that my table contains only 2 columns, an ID column called result_ID and a Result_Name.
The idea is to retrieve new data each time the package is run. We will know this because the result_IDs in the source table will be greater than the maximum result_ID in my destination table . The way the package should work is like this :
1) Retrieve maximum result_ID from destination table
2) retrieve data from source table where result_ID > maximum result_ID from destination table.
My package consists of a
1) SQL Query Task which retrieves the maximum result_ID and places it in a user variable (type Int32).
2) A Data flow task with a Datareader source adapter which uses an expression to retrieve the data. My expression looks like this : "select * from result where result_id > " + (dt_str, 10, 1252) @.[User::max_result_id]
When I run my package the first time all the rows are retrieved (as my destination table is empty to begin with). BUT when I run it the second time the same thing happens again!! All rows are retrieved.
I placed a breakpoint at the point where the variable gets populated with the maximum result_ID and true enough, the variable gets populated with the correct result_ID BUT then that variable gets reset to 0 in my expression!
This problem is driving me crazy! Has anybody out there experienced this kind of problem before?! What are the ways to solve it?!
Thanks for your help in advance.
What is the scope of the variable, User::max_result_id?|||
The scpe of my variable is Package so my data flow component shouldn't have a problem accessing it surely.
|||Phil,
I have just read an interesting article by Kirk Haselden about Variables and their scope and I have now solved my problem! It turns out that I had another variable with a lower scope but with the same name and that was set to 0. In other words my Package level variable was working until SSIS got to the second variable and used that one instead.
I am officially an idiot today.
|||Glad you got it.
Expression-based Data Source + subscription = No-go?
Set up reports to use expression-based data sources and everything works fine as far as executing and viewing the reports. The ConnectionString expression includes the credentials, and the "No credentials required" option is selected.
Unfortunately, am getting this when trying to create a subscription for same report. WTF?
eportingServicesService!processing!3!12/20/2006-12:20:07:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'XXXData'., ;
Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'XXXData'. > System.InvalidOperationException: The ConnectionString property has not been initialized.
at System.Data.SqlClient.SqlConnection.PermissionDemand()
at System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.ReportingServices.DataExtensions.SqlConnectionWrapper.Open()
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ReportRuntimeDataSourceNode.OpenConnection(DataSource dataSourceObj, ReportProcessingContext pc)
End of inner exception stack trace
You probably use something like “User!UserID” in data source expression. It’s forbidden for subscriptions (http://msdn2.microsoft.com/en-gb/library/ms156307.aspx) as there is no user at subscription execution time. Also, you probably created subscription first and changed data source definition after – otherwise you would get error during subscription creation.
|||No, I'm not doing anything like that. In fact, it kind of seems like a MSFT bug to me?
Here is the expression for it:
=Assembly.Namespace.ClassName.StaticMethod("ConnectionStrings", Parameters!VariableName.Value, "KeyGroupInConfigFile")
Basically, it uses an assembly to pull a full connection string out (including the credentials) of a config file based on a key (Parameters!VariableName.Value).
|||Moreover, the subscription is saving the proper value for Parameters!VariableName.Value.|||Most likely the custom assembly does not have enough permissions to access the config file and fails with a FileIOException or a code access security exception.
Can you check if the account configured to run the RS Windows Service has permissions in the file system to read from your configuration file?
-- Robert
|||Will check that and report back...
|||So I double-checked and the Windows service is currently running under the Local System account. So, it would seem all the rights would be there for it? Also, the config file in question is actually the RS Server web.config.
Would there be some sort of extra .Net configuration to do (keeping in mind that I pretty much made the trust on the custom assembly wide-open)?
|||Shameless reply to get back to the top. Anyone at MSFT able to help?|||Anyone?|||It most likely not an issue with user permissions. Are you sure your assembly has full trust?|||
Yes, as mentioned in previous post, the assembly does have full trust. Mind you, it works fine when running it, just the subscriptions are failing.
It kind of seems like the sequence of events when getting a subscription report ready has getting the datasources ready as the 1st step. If the datasource is based on expression, and that expression uses a saved parameter value, it bombs. Can you confirm or refute that? Thanks
|||OK, problem solved! And I almost feel ashamed to admit what it was.
Essentially, as I mentioned in one of my first posts, the custom assembly looks to some values stored in the web.config. That's fine on the UI, but a subscription uses the WINDOWS service, and as such, my specialized web.config code wasn't working. A slight tweak to the assembly got everything on the right track.
Thanks to those who offered advice.
|||Hi Bingo,
What was the tweak?
Thanks
Expression-based Data Source + subscription = No-go?
Set up reports to use expression-based data sources and everything works fine as far as executing and viewing the reports. The ConnectionString expression includes the credentials, and the "No credentials required" option is selected.
Unfortunately, am getting this when trying to create a subscription for same report. WTF?
eportingServicesService!processing!3!12/20/2006-12:20:07:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'XXXData'., ;
Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'XXXData'. > System.InvalidOperationException: The ConnectionString property has not been initialized.
at System.Data.SqlClient.SqlConnection.PermissionDemand()
at System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.ReportingServices.DataExtensions.SqlConnectionWrapper.Open()
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ReportRuntimeDataSourceNode.OpenConnection(DataSource dataSourceObj, ReportProcessingContext pc)
End of inner exception stack trace
You probably use something like “User!UserID” in data source expression. It’s forbidden for subscriptions (http://msdn2.microsoft.com/en-gb/library/ms156307.aspx) as there is no user at subscription execution time. Also, you probably created subscription first and changed data source definition after – otherwise you would get error during subscription creation.
|||No, I'm not doing anything like that. In fact, it kind of seems like a MSFT bug to me?
Here is the expression for it:
=Assembly.Namespace.ClassName.StaticMethod("ConnectionStrings", Parameters!VariableName.Value, "KeyGroupInConfigFile")
Basically, it uses an assembly to pull a full connection string out (including the credentials) of a config file based on a key (Parameters!VariableName.Value).
|||Moreover, the subscription is saving the proper value for Parameters!VariableName.Value.|||Most likely the custom assembly does not have enough permissions to access the config file and fails with a FileIOException or a code access security exception.
Can you check if the account configured to run the RS Windows Service has permissions in the file system to read from your configuration file?
-- Robert
|||Will check that and report back...
|||So I double-checked and the Windows service is currently running under the Local System account. So, it would seem all the rights would be there for it? Also, the config file in question is actually the RS Server web.config.
Would there be some sort of extra .Net configuration to do (keeping in mind that I pretty much made the trust on the custom assembly wide-open)?
|||Shameless reply to get back to the top. Anyone at MSFT able to help?|||Anyone?|||It most likely not an issue with user permissions. Are you sure your assembly has full trust?|||
Yes, as mentioned in previous post, the assembly does have full trust. Mind you, it works fine when running it, just the subscriptions are failing.
It kind of seems like the sequence of events when getting a subscription report ready has getting the datasources ready as the 1st step. If the datasource is based on expression, and that expression uses a saved parameter value, it bombs. Can you confirm or refute that? Thanks
|||OK, problem solved! And I almost feel ashamed to admit what it was.
Essentially, as I mentioned in one of my first posts, the custom assembly looks to some values stored in the web.config. That's fine on the UI, but a subscription uses the WINDOWS service, and as such, my specialized web.config code wasn't working. A slight tweak to the assembly got everything on the right track.
Thanks to those who offered advice.
|||Hi Bingo,
What was the tweak?
Thanks
Sunday, February 19, 2012
Exporting to multiple files from a single source table using DTS
I have been trying to solve this problem for the last 2 days but no luck.
Here is the problem that I am facing.
The task on had is to transfer data from a single table (the source) to multiple files (Destination) based on the record type.
I have tried to changing the Datasource property of the Text File Connection object dynamically by using an ActiveX Script. But the data is still being written only to one file.
Can anyone please help me.
Thanks in advance.
Srinivas.Can't you split up your export by using views with restrictions on your recordtype instead of your table?|||manthenasri, does DTS allow you to redirect output on the fly? From what I have seen the source and destination is fixed at design time.
Have you tried BCP with a query? You could use DTS to script your BCP commands to a CMD file. Then at the cmd prompt you could use DTSRUN to build the CMD file and then execute the CMD file. Or just set up a procedure to script the BCP commands and use xp_cmdshell.
Sort of bassackwards but it's the best I could come up with.|||Hello Paul
I do not know much about BCP. But here is the problem that i have to solve.
I have a table by name T1 which has the following data
Business Unit Name SSN RATE
1 Joe 923456789 40
1 Jenny 568234569 50
3 Mike 234198634 35
3 Meri 743579374 45
Now i need to create a two files by name 1.ben and 3.ben on the fly.
and them put in the data related to Joe and Jenny into 1.ben and the data for Mike and Meri into 3.ben. If there is more data related to other business units i need to create those files also.
Can you please tell me how i can accomplish using BCP.
Thanks,
Srinivas.|||I think the BCP command you want is...
bcp "select * from <dbname>.<owner>.<table> where <where clause>" queryout <file name> -c -T -S <server>
probably could wrap it all up like this:
create table manthenasri([Business Unit] int, [Name] varchar(15), SSN varchar(9), Rate int)
insert into manthenasri values(1,'Joe','923456789',40)
insert into manthenasri values(1,'Jenny','568234569',50)
insert into manthenasri values(3,'Mike','234198634',35)
insert into manthenasri values(3,'Meri','743579374',45)
declare @.bu int, @.TSQL varchar(255)
select @.bu = min([Business Unit]) from manthenasri
while @.bu is not null begin
set @.TSQL = 'bcp "select * from ' + db_name() + '..' + 'manthenasri where [Business Unit] = ' + cast(@.bu as varchar) + '" queryout ' + cast(@.bu as varchar) + '.ben -c -T -S ' + @.@.servername
print @.TSQL
-- master.dbo.xp_cmdshell(@.TSQL)
select @.bu = min([Business Unit]) from manthenasri where [Business Unit] > @.bu
end
Open Query Analyzer and run the above code. It should produce a few BCP commands. Make adjustments for your table and rerun the script. Next try cutting and pasting the results to a CMD prompt and see how it works. Once that's done you can un-comment the xp_cmdshell call and try running this on your server.
THIS IS UNTESTED CODE!
Look this over and post back with questions.|||Hi Srinivas ,
Use DTS designer add one data pump task for each condition and output file.
For example : Use select statement as the source of data pump task with where clause and desination to the the disired out put file.
cheers :)
Shaji
Originally posted by manthenasri
Hi Friends
I have been trying to solve this problem for the last 2 days but no luck.
Here is the problem that I am facing.
The task on had is to transfer data from a single table (the source) to multiple files (Destination) based on the record type.
I have tried to changing the Datasource property of the Text File Connection object dynamically by using an ActiveX Script. But the data is still being written only to one file.
Can anyone please help me.
Thanks in advance.
Srinivas.|||Hai Paul
Thank you for the BCP solution that you have given. I really appreciate you patience in giving me a sample program also.
The sample worked just fine except for the brackets enclosing the variable @.Tsql. I think these brackets should not be there. I had to remove these brackets.
But now have a problem of reading from multiple files and posting that data into table. I have to do an isert and also an update on the table. How can i do that?
Thank you very much once again.
Srinivas.