Showing posts with label report. Show all posts
Showing posts with label report. Show all posts

Tuesday, March 27, 2012

Change Image using parameter

I need to change the logo on my reports according to a parameter that I pass from VB.NET.

What is the best way to load the image into the report?

I have attempted to use a dataset:

I created a logo field in my dataset
I loaded the correct image in VB.NET
I then assigned the 'logo' field in the dataset to this image

My problem is that I don't know what the data type of the logo field should be - I have created the dataset manually and the images are not in a database.

This is my code:

'Load image into ByteArray
Dim fs As New System.IO.FileStream("C:\temp\test.jpg", IO.FileMode.Open)
Dim nBytes As Integer = fs.Length
Dim ByteArray(nBytes) As Byte
Dim nBytesRead As Integer = fs.Read(ByteArray, 0, nBytes)
fs.Read(ByteArray, 0, Convert.ToInt32(fs.Length.ToString(), 10) - 1)

'Set logo field to this image
Dim tbl As New mySchemas.myDataTable
Dim rw As DataRow = tbl.NewRow
rw("logo") = ByteArray 'AN ERROR OCCURS ON THIS LINE
tbl.Rows.Add(rw)
Dim ds As New DataSet
ds.Tables.Add(tbl)

Is this the best way to do load an image into crystal? If so what should the datatype of the logo field be in the dataset? I tried Byte but that did not work.

Thanks for any help
ElaineElaine,
I'll preface this by saying: I don't use CR10, and don't use .NET with CR.
From your code you are declaring a row object to hold the picture.
Shouldn't you be using a "field" object, or whatever the .NET equivalent is?
Field type should be OLE Object/BLOB(BinaryLargeOBject)/BitStream or similar.

Dave|||Thanks for your reply Dave. All sorted now.

The data type I needed turned out to be 'hexbinary'
Incase anyone has the same problem this is the solution:

Dim data As New DataSet()
Dim row As DataRow

data.Tables.Add("Images")
data.Tables(0).Columns.Add("img", System.Type.GetType("System.Byte[]"))

Dim fs As New FileStream("C:\test.jpg", FileMode.Open)
Dim br As New BinaryReader(fs)

row = data.Tables(0).NewRow()
row(0) = br.ReadBytes(br.BaseStream.Length)
data.Tables(0).Rows.Add(row)

br.close
fs.close

br = Nothing
fs = Nothing

' CrystalReport1 is a strongly typed report created in Visual Studio.
Dim cr As New CrystalReport1()
cr.SetDataSource(data)
CrystalReportViewer1.ReportSource = cr|||Are you using the version of crystal reports that came with visual net??
I create the typed dataset with a field hexBinary and load the pictur there but how can I put that picture in the report it shows as a number and no image apearssql

Change image properties at runtime

Hi,
I'm using Reporting Services for SQL2K. My report will need to dynamically
call a custom assembly for each row in a dataset, and then show the image
file that the custom assembly creates. I was thinking of using an Image
control in the report and then changing the path to the image file at
runtime. But I can not figure out how to access the image1.Value property.
Any tips on this or perhaps an alternative solution?
TIA
JonasI found the answer, and it was very easy ;-)
When the control is selected in the Report Designer, it it possible to edit
the properties as usual. The property for Value can also use an Expression,
and voila, this can point to a variable which contains a dynamically created
path.
Brgds
Jonas
"Jonas" <Jonas@.nospam.pl> wrote in message
news:%23z53z3cHGHA.240@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I'm using Reporting Services for SQL2K. My report will need to dynamically
> call a custom assembly for each row in a dataset, and then show the image
> file that the custom assembly creates. I was thinking of using an Image
> control in the report and then changing the path to the image file at
> runtime. But I can not figure out how to access the image1.Value property.
> Any tips on this or perhaps an alternative solution?
> TIA
> Jonas
>
>

Change Image

I'm using Crystal Report 7 ,use storc prcdure n vb 6. my prblem : let say in my system have company and their staff. how can i display one company and their staffname+ their picture. e.g: company A and their staff photo will appear n for cmpny B their staff photo will appear. means that the staff photo will appear based on their company.tnkiu..I'm using Crystal Report 7 ,use storc prcdure n vb 6. my prblem : let say in my system have company and their staff. how can i display one company and their staffname+ their picture. e.g: company A and their staff photo will appear n for cmpny B their staff photo will appear. means that the staff photo will appear based on their company.tnkiu..

simple sort the data by company name|||I'm using Crystal Report 7 ,use storc prcdure n vb 6. my prblem : let say in my system have company and their staff. how can i display one company and their staffname+ their picture. e.g: company A and their staff photo will appear n for cmpny B their staff photo will appear. means that the staff photo will appear based on their company.tnkiu..

Just sort the data by company name|||what do you mean by sort data by company name?

Change Header of Report?

Hi all,

I'm pretty new to SQL Reporting Services so my question might be a little silly. Tongue Tied

I was wondering, if it was possible to change the toolbar of a report. The only thing I found to change there, is the sorting and filter dropdowns. But other than that, is there a way to add my own controls like a Commandbutton? If not, is it possible to remove certain things from the toolbar like the print icon?

Thanks for your answers in advance.

Nat

If you are using Report Manager, you cannot change the toolbar of the report viewer. If you are using the new ReportViewer controls (included in Visual Studio 2005) in your application, you can remove buttons from the toolbar. However, you cannot add things to the toolbar. You could have your own toolbar along with the report viewer.

|||Hi Brian,
Thanks for your answer and I apologize for the big delay in answering.
I tried the ReportViewer control in VS 2005. I set the Report Server URL and the Report Path but I keep getting the error: "The request failed with HTTP status 401: Unauthorized."
As I said, I'm all new to this so I have no idea where to search for this error.

Thanks again for your answers in advance.

Nat

change grouping at runtime

I have a report with a large result set that can be grouped multiple ways.
Is there a way to give a user the option to change the grouping level at
runtime. For example if my data was grouped like this:
A
B
C
C
B
C
C
But instead of seeing the grouping broken up by "B", the user wants to view
the data without the "B" groups. They could have a drop-down list or
something that lets them switch it to be:
A
C
C
C
C
Hope this makes sense and someone has an idea.
--
Patrick StadlerHi,
I have the same functionality in some of my reports and what I end-up doing
is create a grouping parameter for my reports and use this parameter.value to
group my data within my report table ...
HTH,
Eric
"Stads" wrote:
> I have a report with a large result set that can be grouped multiple ways.
> Is there a way to give a user the option to change the grouping level at
> runtime. For example if my data was grouped like this:
> A
> B
> C
> C
> B
> C
> C
> But instead of seeing the grouping broken up by "B", the user wants to view
> the data without the "B" groups. They could have a drop-down list or
> something that lets them switch it to be:
> A
> C
> C
> C
> C
> Hope this makes sense and someone has an idea.
> --
> Patrick Stadlersql

Sunday, March 25, 2012

Change display of subtotal row in Matrix report

I'd like to display the subtotal and Grand total rows of my Matrix report in
grey, but I can't find a proprties box to change. I've changed the area
that displays the text ie. "Grand Total", but there are not separate boxes
for the subtotal values like you'd see with a table. I also seem to be
stuck with my subtotal text in the second column when I'd like to print it in
the first column. I'd like to see
SubTotal xxxxx
Grand Total
I can't define in the same box.
I'm really "winging it" with this Matrix report. All my other report
experiences have been with tables.
Thank you in advance for any help you can provide.... PBOn Mar 13, 1:44 pm, ppbedz <ppb...@.discussions.microsoft.com> wrote:
> I'd like to display the subtotal and Grand total rows of my Matrix report in
> grey, but I can't find a proprties box to change. I've changed the area
> that displays the text ie. "Grand Total", but there are not separate boxes
> for the subtotal values like you'd see with a table. I also seem to be
> stuck with my subtotal text in the second column when I'd like to print it in
> the first column. I'd like to see
> SubTotal xxxxx
> Grand Total
> I can't define in the same box.
> I'm really "winging it" with this Matrix report. All my other report
> experiences have been with tables.
> Thank you in advance for any help you can provide.... PB
In the Layout view/tab, click on the matrix cell that has the
subtotals/grandtotal and select F4 (to get the Properties window).
Below Appearance, to the right of BackgroundColor select
'<Expressions...>' from the drop-down list and enter something like
the following:
=iif(Fields!FieldName.Value = "Subtotal" or Fields!FieldName.Value ="Grand Total", "LightGrey", "White")
Where LightGrey is the value if true and White is the color otherwise.
If you create the subtotal in your stored procedure or query that
sources the report, you can set the column using an expression
(similar to above); however, I believe. if you use the one created in
the report, it will force you to a specific column. Hope this helps.
Regards,
Enrique Martinez
Sr. SQL Server Developer|||Thank you. You have been a great help! I have 60 Finance reports to be
created with Visual Studio and no formal training. I am so grateful for
your answers to my posts! Can you recommend any other resources/discussion
groups that would be helpful? I did purchase the book "Hitchhikers Guide to
SQL Server 2000 Reporting Services". It has been helpful with the basics,
but not with the more kind of detailed "coding" that you have been helping me
with. I'd love to have a reference for creating "code" (I've created some
.code to check for division by zero, but it's been copied from other
references) and for the ".expressions" that can be used with a field names
(ie. .substring, .value, etc.)
Regards,
PB
"EMartinez" wrote:
> On Mar 13, 1:44 pm, ppbedz <ppb...@.discussions.microsoft.com> wrote:
> > I'd like to display the subtotal and Grand total rows of my Matrix report in
> > grey, but I can't find a proprties box to change. I've changed the area
> > that displays the text ie. "Grand Total", but there are not separate boxes
> > for the subtotal values like you'd see with a table. I also seem to be
> > stuck with my subtotal text in the second column when I'd like to print it in
> > the first column. I'd like to see
> >
> > SubTotal xxxxx
> >
> > Grand Total
> >
> > I can't define in the same box.
> >
> > I'm really "winging it" with this Matrix report. All my other report
> > experiences have been with tables.
> >
> > Thank you in advance for any help you can provide.... PB
> In the Layout view/tab, click on the matrix cell that has the
> subtotals/grandtotal and select F4 (to get the Properties window).
> Below Appearance, to the right of BackgroundColor select
> '<Expressions...>' from the drop-down list and enter something like
> the following:
> =iif(Fields!FieldName.Value = "Subtotal" or Fields!FieldName.Value => "Grand Total", "LightGrey", "White")
> Where LightGrey is the value if true and White is the color otherwise.
> If you create the subtotal in your stored procedure or query that
> sources the report, you can set the column using an expression
> (similar to above); however, I believe. if you use the one created in
> the report, it will force you to a specific column. Hope this helps.
> Regards,
> Enrique Martinez
> Sr. SQL Server Developer
>|||Mr Martinez will probably give you some more tips, but I just want to add a
link to William Pearson's articles on Reporting Serivces
http://www.databasejournal.com/article.php/1459531
You need to scroll down almost to the bottom, but there you find 38
tutorials. A lot of them are focused on OLAP based reports, but most of the
things you can do with OLAP based reports you can do with database based
reports as well.
Direct Reports (Brian Welcker's Weblog) at
http://blogs.msdn.com/bwelcker/default.aspx is good too. I also read Bob's
SQL Reporting Services Blog at http://blogs.msdn.com/bobmeyers/default.aspx
As for discussion groups, I usually end up with this news group, either
following it through a news reader, or searching with Google groups.
Can't give you a lot of tips on the code bit, though, haven't done too much
of that myself.
Kaisa M. Lindahl Lervik
http://blogs.spipp.net/blogs/kaisa
"ppbedz" <ppbedz@.discussions.microsoft.com> wrote in message
news:7F2266E8-5FC4-4000-B2C3-3C18641C47C3@.microsoft.com...
> Thank you. You have been a great help! I have 60 Finance reports to be
> created with Visual Studio and no formal training. I am so grateful for
> your answers to my posts! Can you recommend any other
> resources/discussion
> groups that would be helpful? I did purchase the book "Hitchhikers Guide
> to
> SQL Server 2000 Reporting Services". It has been helpful with the basics,
> but not with the more kind of detailed "coding" that you have been helping
> me
> with. I'd love to have a reference for creating "code" (I've created
> some
> .code to check for division by zero, but it's been copied from other
> references) and for the ".expressions" that can be used with a field names
> (ie. .substring, .value, etc.)
> Regards,
> PB
>
> "EMartinez" wrote:
>> On Mar 13, 1:44 pm, ppbedz <ppb...@.discussions.microsoft.com> wrote:
>> > I'd like to display the subtotal and Grand total rows of my Matrix
>> > report in
>> > grey, but I can't find a proprties box to change. I've changed the
>> > area
>> > that displays the text ie. "Grand Total", but there are not separate
>> > boxes
>> > for the subtotal values like you'd see with a table. I also seem to
>> > be
>> > stuck with my subtotal text in the second column when I'd like to print
>> > it in
>> > the first column. I'd like to see
>> >
>> > SubTotal xxxxx
>> >
>> > Grand Total
>> >
>> > I can't define in the same box.
>> >
>> > I'm really "winging it" with this Matrix report. All my other report
>> > experiences have been with tables.
>> >
>> > Thank you in advance for any help you can provide.... PB
>> In the Layout view/tab, click on the matrix cell that has the
>> subtotals/grandtotal and select F4 (to get the Properties window).
>> Below Appearance, to the right of BackgroundColor select
>> '<Expressions...>' from the drop-down list and enter something like
>> the following:
>> =iif(Fields!FieldName.Value = "Subtotal" or Fields!FieldName.Value =>> "Grand Total", "LightGrey", "White")
>> Where LightGrey is the value if true and White is the color otherwise.
>> If you create the subtotal in your stored procedure or query that
>> sources the report, you can set the column using an expression
>> (similar to above); however, I believe. if you use the one created in
>> the report, it will force you to a specific column. Hope this helps.
>> Regards,
>> Enrique Martinez
>> Sr. SQL Server Developer
>>|||On Mar 14, 8:04 am, "Kaisa M. Lindahl Lervik" <kais...@.hotmail.com>
wrote:
> Mr Martinez will probably give you some more tips, but I just want to add a
> link to William Pearson's articles on Reporting Serivces
> http://www.databasejournal.com/article.php/1459531
> You need to scroll down almost to the bottom, but there you find 38
> tutorials. A lot of them are focused on OLAP based reports, but most of the
> things you can do with OLAP based reports you can do with database based
> reports as well.
> Direct Reports (Brian Welcker's Weblog) athttp://blogs.msdn.com/bwelcker/default.aspxis good too. I also read Bob's
> SQL Reporting Services Blog athttp://blogs.msdn.com/bobmeyers/default.aspx
> As for discussion groups, I usually end up with this news group, either
> following it through a news reader, or searching with Google groups.
> Can't give you a lot of tips on the code bit, though, haven't done too much
> of that myself.
> Kaisa M. Lindahl Lervikhttp://blogs.spipp.net/blogs/kaisa
> "ppbedz" <ppb...@.discussions.microsoft.com> wrote in message
> news:7F2266E8-5FC4-4000-B2C3-3C18641C47C3@.microsoft.com...
> > Thank you. You have been a great help! I have 60 Finance reports to be
> > created with Visual Studio and no formal training. I am so grateful for
> > your answers to my posts! Can you recommend any other
> > resources/discussion
> > groups that would be helpful? I did purchase the book "Hitchhikers Guide
> > to
> > SQL Server 2000 Reporting Services". It has been helpful with the basics,
> > but not with the more kind of detailed "coding" that you have been helping
> > me
> > with. I'd love to have a reference for creating "code" (I've created
> > some
> > .code to check for division by zero, but it's been copied from other
> > references) and for the ".expressions" that can be used with a field names
> > (ie. .substring, .value, etc.)
> > Regards,
> > PB
> > "EMartinez" wrote:
> >> On Mar 13, 1:44 pm, ppbedz <ppb...@.discussions.microsoft.com> wrote:
> >> > I'd like to display the subtotal and Grand total rows of my Matrix
> >> > report in
> >> > grey, but I can't find a proprties box to change. I've changed the
> >> > area
> >> > that displays the text ie. "Grand Total", but there are not separate
> >> > boxes
> >> > for the subtotal values like you'd see with a table. I also seem to
> >> > be
> >> > stuck with my subtotal text in the second column when I'd like to print
> >> > it in
> >> > the first column. I'd like to see
> >> > SubTotal xxxxx
> >> > Grand Total
> >> > I can't define in the same box.
> >> > I'm really "winging it" with this Matrix report. All my other report
> >> > experiences have been with tables.
> >> > Thank you in advance for any help you can provide.... PB
> >> In the Layout view/tab, click on the matrix cell that has the
> >> subtotals/grandtotal and select F4 (to get the Properties window).
> >> Below Appearance, to the right of BackgroundColor select
> >> '<Expressions...>' from the drop-down list and enter something like
> >> the following:
> >> =iif(Fields!FieldName.Value = "Subtotal" or Fields!FieldName.Value => >> "Grand Total", "LightGrey", "White")
> >> Where LightGrey is the value if true and White is the color otherwise.
> >> If you create the subtotal in your stored procedure or query that
> >> sources the report, you can set the column using an expression
> >> (similar to above); however, I believe. if you use the one created in
> >> the report, it will force you to a specific column. Hope this helps.
> >> Regards,
> >> Enrique Martinez
> >> Sr. SQL Server Developer
You are very welcome. Glad to be of assistance. I can email you a kind
of 'how tos' list (that I have created along the way), if you would
like. This news group is the most active one (for Reporting Services),
so it usually gets the most responses and assistance. A couple of
lower activity ones are: http://groups.google.com/group/ReportingServices
and http://groups.google.com/group/RS2005. I tend to help out on those
as well. These Microsoft links are pretty handy (but not too easy to
navigate): http://msdn2.microsoft.com/en-us/library/ms159106.aspx and
http://msdn2.microsoft.com/en-us/library/ms170246.aspx. Also, if you
know of anyone that would be interested, I will be offering a SQL
Server 2005 Reporting Services class in the Nashville, TN area
starting the end of April.
Regards,
Enrique Martinez
Sr. SQL Server Developer|||Hi all!
I'm using the function SubToal built in RS.
How can I change the row's background for the row's handling the subtotals
infos?
Is there a way to find the value of a textboxX instead of the value of a
field?
Thanks, Julien
"ppbedz" <ppbedz@.discussions.microsoft.com> wrote in message
news:66E08C5E-4E81-49D4-9FA8-81616926508F@.microsoft.com...
> I'd like to display the subtotal and Grand total rows of my Matrix report
> in
> grey, but I can't find a proprties box to change. I've changed the area
> that displays the text ie. "Grand Total", but there are not separate
> boxes
> for the subtotal values like you'd see with a table. I also seem to be
> stuck with my subtotal text in the second column when I'd like to print it
> in
> the first column. I'd like to see
> SubTotal xxxxx
> Grand Total
> I can't define in the same box.
> I'm really "winging it" with this Matrix report. All my other report
> experiences have been with tables.
> Thank you in advance for any help you can provide.... PB|||Hi Julien,
I had the same problem and I solved it using the InScope() function.
You will find an example on this blog :
http://devauthority.com/blogs/chrisslatt/archive/2005/07/06/Reporting_Service_Using_InScope_to_do_custom_subtotals.aspx
Best regards,
Jean-Baptiste
"Julien Bonnier" wrote:
> Hi all!
> I'm using the function SubToal built in RS.
> How can I change the row's background for the row's handling the subtotals
> infos?
> Is there a way to find the value of a textboxX instead of the value of a
> field?
> Thanks, Julien
>
> "ppbedz" <ppbedz@.discussions.microsoft.com> wrote in message
> news:66E08C5E-4E81-49D4-9FA8-81616926508F@.microsoft.com...
> > I'd like to display the subtotal and Grand total rows of my Matrix report
> > in
> > grey, but I can't find a proprties box to change. I've changed the area
> > that displays the text ie. "Grand Total", but there are not separate
> > boxes
> > for the subtotal values like you'd see with a table. I also seem to be
> > stuck with my subtotal text in the second column when I'd like to print it
> > in
> > the first column. I'd like to see
> >
> > SubTotal xxxxx
> >
> > Grand Total
> >
> > I can't define in the same box.
> >
> > I'm really "winging it" with this Matrix report. All my other report
> > experiences have been with tables.
> >
> > Thank you in advance for any help you can provide.... PB
>
>|||FABOULOUS!!!
Thanks alot! I'm gonna add this to all my reports!
Thanks again!
Julien
"jbb92" <jbb92@.discussions.microsoft.com> wrote in message
news:905BD939-9C3E-4EBE-B002-7FFBC064752B@.microsoft.com...
> Hi Julien,
> I had the same problem and I solved it using the InScope() function.
> You will find an example on this blog :
> http://devauthority.com/blogs/chrisslatt/archive/2005/07/06/Reporting_Service_Using_InScope_to_do_custom_subtotals.aspx
> Best regards,
> Jean-Baptiste
> "Julien Bonnier" wrote:
>> Hi all!
>> I'm using the function SubToal built in RS.
>> How can I change the row's background for the row's handling the
>> subtotals
>> infos?
>> Is there a way to find the value of a textboxX instead of the value of a
>> field?
>> Thanks, Julien
>>
>> "ppbedz" <ppbedz@.discussions.microsoft.com> wrote in message
>> news:66E08C5E-4E81-49D4-9FA8-81616926508F@.microsoft.com...
>> > I'd like to display the subtotal and Grand total rows of my Matrix
>> > report
>> > in
>> > grey, but I can't find a proprties box to change. I've changed the
>> > area
>> > that displays the text ie. "Grand Total", but there are not separate
>> > boxes
>> > for the subtotal values like you'd see with a table. I also seem to
>> > be
>> > stuck with my subtotal text in the second column when I'd like to print
>> > it
>> > in
>> > the first column. I'd like to see
>> >
>> > SubTotal xxxxx
>> >
>> > Grand Total
>> >
>> > I can't define in the same box.
>> >
>> > I'm really "winging it" with this Matrix report. All my other report
>> > experiences have been with tables.
>> >
>> > Thank you in advance for any help you can provide.... PB
>>

Thursday, March 22, 2012

Change default input parameter drop down list size

I am working on a report which uses a multi value input parameter. The value
set is depend on the other input parameter, so the size and value are
different when the value of the other parameter has changed. The problem is
sometime it works perfectly, but the other time when there are only two
value, the drop down list will show "Select All" and first item and gives me
a scroll bar. This is very annoying. Anyone know how to make the drop down
list to disply more desirous number of items. In addition, is there a way to
control the parameter text box length?I have the same problem but even a worse scenario. My list is filtered by
another and can end up with only one entry. While two entries at least lets
you scroll through the list ('cause the scroll buttons are shown), a list of
only one value doesn't even show the scroll buttons.
I also need a way to allow/force a list this short to be at least long
enough to show the scrollbars.
Jon

Change Default Filename with Export?

When I use URL Access to render a report with specified parameters and a
format (e.g. PDF), when I choose "Save" (instead of Open) the default
filename is listed as "ThisReportName.pdf". I need to have the "Save As"
name to be very specific (e.g. include the date and the customer ID, like
EN12345-9-27-07.pdf) and ready to save without any typing by the end-user.
I cannot find a URL parameter that will change the default filename (to be
saved) for an exported PDF. Is this possible with SSRS?
Thanks for any help or direction.On Sep 27, 12:10 pm, "Don Miller" <nos...@.nospam.com> wrote:
> When I use URL Access to render a report with specified parameters and a
> format (e.g. PDF), when I choose "Save" (instead of Open) the default
> filename is listed as "ThisReportName.pdf". I need to have the "Save As"
> name to be very specific (e.g. include the date and the customer ID, like
> EN12345-9-27-07.pdf) and ready to save without any typing by the end-user.
> I cannot find a URL parameter that will change the default filename (to be
> saved) for an exported PDF. Is this possible with SSRS?
> Thanks for any help or direction.
I believe that I answered this question in your other posting.
Regards,
Enrique Martinez
Sr. Software Consultant

Tuesday, March 20, 2012

change date format from MMDDYYYY to DDMMYYY ?

Hi,
My report dates are coming out in the following format MM/DD/YYYY. How can I
change this to DD/MM/YYYY.
i.e is this to do with IIS, reporting services or the report itself ?
(machine is DD/MM/YYY)
Thanks
Scottscott wrote:
> Hi,
> My report dates are coming out in the following format MM/DD/YYYY.
How can I
> change this to DD/MM/YYYY.
> i.e is this to do with IIS, reporting services or the report itself ?
> (machine is DD/MM/YYY)
> Thanks
> Scott
In tools/options set International Settings to be same as Microsoft
Office.
Find Report object on the Properties window dropdown and set the
Language property to English (UK)
This should now allow you to set the format of the textbox to
dd/mm/yyyy or similar. (Go to property pages for some default options -
right click text box and go to properties.)|||thanks
scott

change datasource with sqlReportingService2005 class

hi pro , i created model project with .net 2005 after that , create report with reportbuilder that it use this model. it s ok.

i have project and i want to change datasource (connection string ) in runtime when User click on report ,i use sqlReportingService2005 class :

Dim rs As New ReportingService2005()

rs.Credentials = System.Net.CredentialCache.DefaultCredentials

Dim definition As New DataSourceDefinition()
definition.CredentialRetrieval = CredentialRetrievalEnum.Integrated
definition.ConnectString = "Data Source=" & serverName & ";Initial Catalog=" & DataBaseName & ";Integrated Security=True"
definition.Enabled = True
definition.EnabledSpecified = True
definition.Extension = "SQL"
definition.ImpersonateUser = False
definition.ImpersonateUserSpecified = False ' True
definition.Prompt = Nothing
definition.WindowsCredentials = True ' False

Try
rs.SetDataSourceContents("/Data Sources/" & DataSourceName, definition)

Catch ex As SoapException
Console.WriteLine(ex.Detail.OuterXml)
End Try
End Sub

error "An unhandled exception of type 'System.Net.WebException' occurred in System.Web.Services.dll

Additional information: The request failed with HTTP status 404: Object Not Found." happend

( i checked Enable Unmanged code debugging =true)

please help me

tanks

This error occurs only when the report server URL is given wrong or does not exists. Do check your report server URL assigned to the rs.Url property.

|||

tanks for reply. i was forgotten to say : i have 2 machin ,the first one uses Windows 2003 Server and i installed sql server on it , another machin uses windows a xp and i run project on it( it s like client). when i take project on sql server 2005 it s work nice but when i run project on xp it dosent work.

|||

Are you able to open the report server url in browser?

Change datasource on the fly

is it possible to change the differece datasource when execution of report,
since I need to keep the data into 5 difference databases by some reasons,
but I don't want to create 5 new reports for that each time. it wastle a lot
of time to reproduce the same reports. any ideas I appreciated.
Thanks in advance.Hi,
you can use parametrization to use IIF to change the datasource
properties.
HTH, Jens K. Suessmeyer.
--
http://www.sqlserver2005.de
--|||Could you please give me some samples, I am a newbie for RS.
"Jens" <Jens@.sqlserver2005.de>
'?:1168941447.869460.85450@.11g2000cwr.googlegroups.com...
> Hi,
> you can use parametrization to use IIF to change the datasource
> properties.
> HTH, Jens K. Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
>|||Hi,
i don=B4t have actually a RS Server at hand but it is like the following
query (non-tested), change the connection string to listen to a
parameter:
=3D"Data Source=3D" & Parameters!DataSourceSelector.Value & ";Initial
Catalog=3DSomeDB"
You can also use IIF in the above mentioned statment, like:
=3D"Data Source=3D" & IIF(Parameters!DataSourceSelector.Value =3D
"TestEnvironment";"TestServer";ProductionServer) & ";Initial
Catalog=3DSomeDB"
HTH, Jens K. Suessmeyer.
--
http://www.sqlserver2005.de
--

Change Datasource connectionstring

Hey,

I have a SQL Server 2005, an Reporting Services is also installed.
Now I have a report 'Report1' and a datasource 'DS1', the report is build and deployed.
The report works fine when i see it in a browser.

Now I have made a vb.net application with a dataviewer, the dataviewer shows the report 'Report1'.
But I want to be able to change the datasource 'DS1' from my application code.

How can I do this?

thanks

Hi,

you could use a hidden parameter which will influence the beahaviour of a dynamic evaluated connectring string, though connection strings can be designed dynamically like ="Data Source" + IIF(Parameters!SomeParam.Value = 1, "SomeServer",SomeOtherServer") That is a thing which is most common, enabling you to do this also on the brwoser interface by just manipulating the URL of the Report.


HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

Change Datasource abuout url access

Hallo,
We have a ASP.Net app and need a way to manage the datasource.
We have one report for 5 Customer. Every customer has his own DB on our
Server. And Every customer has his own Datasource in the Reportmanager.
Now i call my report with url and will tell the reportservices to take
Connecton 1 or Connection 2 usw.
can i do this with a URL ACCESS ?
UweAbout the only way you could do that now, is with a parameter you pass into
the report...
Still there is a problem... Connections are not dynamic... So you would have
to put Stored procedures or dynamic queries which referred to linked servers
or used openquery, openrowset to move between servers...
SQL 2005 has a dynamic connection capability that will help make this
easier.
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Uwe Mielisch" <uwe@.mielisch.de> wrote in message
news:%23UE$dvUiFHA.2916@.TK2MSFTNGP14.phx.gbl...
> Hallo,
> We have a ASP.Net app and need a way to manage the datasource.
> We have one report for 5 Customer. Every customer has his own DB on our
> Server. And Every customer has his own Datasource in the Reportmanager.
> Now i call my report with url and will tell the reportservices to take
> Connecton 1 or Connection 2 usw.
> can i do this with a URL ACCESS ?
> Uwe
>|||Hallo Wayne,
Thank you. What do youn mean with
<parameter you pass into the report...>
Uwe
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> schrieb im Newsbeitrag
news:u1K2jlhiFHA.1412@.TK2MSFTNGP09.phx.gbl...
> About the only way you could do that now, is with a parameter you pass
> into the report...
> Still there is a problem... Connections are not dynamic... So you would
> have to put Stored procedures or dynamic queries which referred to linked
> servers or used openquery, openrowset to move between servers...
> SQL 2005 has a dynamic connection capability that will help make this
> easier.
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Uwe Mielisch" <uwe@.mielisch.de> wrote in message
> news:%23UE$dvUiFHA.2916@.TK2MSFTNGP14.phx.gbl...
>> Hallo,
>> We have a ASP.Net app and need a way to manage the datasource.
>> We have one report for 5 Customer. Every customer has his own DB on our
>> Server. And Every customer has his own Datasource in the Reportmanager.
>> Now i call my report with url and will tell the reportservices to take
>> Connecton 1 or Connection 2 usw.
>> can i do this with a URL ACCESS ?
>> Uwe
>

Change Dataset font size

Is there there a way to change font size of the text of the data set while working in the Report Designer?

In the menu: Go to "Tools" --> "Options"; then under "Environment" --> "Fonts and Colors"

You can edit alot of elements within the dev. studio. (I just didn't find the way to change the font size of the generic query builder (maybe that only happens after restart which I didn't do))

Monday, March 19, 2012

Change data source for mutiple datasets at once

Hi All,

In the BI development studio when I have to change the data source for data sets within a report, I have to go to each of the datasets individually to do this. Is there a quicker way to do this. Say I want to change data source for the entire report in BI dev studio.

thanks

Sonny

Use shared data sources across the reports.

Then you will only have to change the data in the data source and not the datasets.

This will automatically be reflected in the IDE.

Obviously this will not be updated on the report server until you redeploy, be aware of the project based setting "OverwriteDataSources" when deploying!|||

thanks Adolf , that helped.

sonny

Change data source for mutiple datasets at once

Hi All,

In the BI development studio when I have to change the data source for data sets within a report, I have to go to each of the datasets individually to do this. Is there a quicker way to do this. Say I want to change data source for the entire report in BI dev studio.

thanks

Sonny

Use shared data sources across the reports.

Then you will only have to change the data in the data source and not the datasets.

This will automatically be reflected in the IDE.

Obviously this will not be updated on the report server until you redeploy, be aware of the project based setting "OverwriteDataSources" when deploying!|||

thanks Adolf , that helped.

sonny

Change data source dynamically in report server.

Hi,

I need to change the data source for report server objects (rdl files) dynamically. In other words, I am having databases with identical structures but different data for different clients. Then I need to use same set of reports for different customers. They will access reports through web and they should provide user id/pwd and database name in web login interface, and then it should direct to the the particular database and should be able to access the same set of reports.

Any thoughts !

Roshan.

You can accomplish this using Report Parameters. The connection string would look something like the following.

="Data Source=ServerName;Initial Catalog=" & Parameters!Database.Value

Ian|||

Thanks, it is working.

Is there any way to change datasource in report model dynamically ?. i.e. sharing reports created from Report Builder between multiple databases.

I would like to create one standard report model with standard set of reports and letting usrs (different customers) add their own reports.

-Roshan

Change Data Source at run time

Hi,
I am using a web Report viewer control for viewing reports on a SRS 2005
report server.
Is it possible to change the data source of the report at run-time?
e.g. I have 2 identical databases - the live database and a test
database. I want to be able to set the data source to point to one of
these depending whether I am testing or not.
This was easily achieved with Crystal, but I cannot work out how to do
it using SQL Reporting Services.
Any help apprectiated.
Thanks.
PaulIf you are using the VS 2005 viewer control then I think you can set it in
there. Another option might be to base the report on a stored procedure
that returns records based on a parameter sent. For example, if parameter =1 then select from live database and if = 0 select from test database.
David
"Paul Cheetham" <PAC.News@.dsl.pipex.com> wrote in message
news:ODJVQZm2HHA.5884@.TK2MSFTNGP02.phx.gbl...
> Hi,
> I am using a web Report viewer control for viewing reports on a SRS 2005
> report server.
> Is it possible to change the data source of the report at run-time?
> e.g. I have 2 identical databases - the live database and a test database.
> I want to be able to set the data source to point to one of these
> depending whether I am testing or not.
> This was easily achieved with Crystal, but I cannot work out how to do it
> using SQL Reporting Services.
> Any help apprectiated.
> Thanks.
>
> Paul|||see ths 2005 BOL at
http://msdn2.microsoft.com/en-us/library/ms156450.aspx
"Paul Cheetham" <PAC.News@.dsl.pipex.com> wrote in message
news:ODJVQZm2HHA.5884@.TK2MSFTNGP02.phx.gbl...
> Hi,
> I am using a web Report viewer control for viewing reports on a SRS 2005
> report server.
> Is it possible to change the data source of the report at run-time?
> e.g. I have 2 identical databases - the live database and a test database.
> I want to be able to set the data source to point to one of these
> depending whether I am testing or not.
> This was easily achieved with Crystal, but I cannot work out how to do it
> using SQL Reporting Services.
> Any help apprectiated.
> Thanks.
>
> Paul

Change Crystal Database in vba

hi,

I have to use vba to display a report.
But this report should work on multiple database without having to change the report each time.
So I would like to change the report on runtime.
I think i can use LogOnServer (method of the application Object) or something.

Now i don't know how to use it. Looked for examples on the kb of crystal and this forum but wasn't succesfull to make it work.

Can somebody help me.

This is the code i use to call the report:

Set crxReport = crxApplication.OpenReport(MyReportFile)

crxReport.ParameterFields(1).AddCurrentValue (DocNumber)

Me!Crviewer1.ReportSource = crxReport

Me!Crviewer1.ViewReport

Crviewer1.Zoom (100)

While Me!Crviewer1.IsBusy
DoEvents
Wendreport.Database.Tables(1).SetLogOnInfo ServerName, DBName, UserID, Pwd

This will set the logon info for the table used in the report.

Sunday, March 11, 2012

Change CommandText

I have a report created on the reporting services and i
need to change the query that the report uses to retrieve
data dynamically based on a criteria page.
All I need is to change part of the RDL of the report
that includes the command text but i can't seem to find
how to do that. Can anyone please HELP!!!.
Thanks...
Omniams-help://MS.RSBOL80.1033/RSCREATE/htm/rcr_creating_structure_data_v1_41ir.htm
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Omnia" <anonymous@.discussions.microsoft.com> wrote in message
news:725a01c494ba$37e1cf70$a601280a@.phx.gbl...
>I have a report created on the reporting services and i
> need to change the query that the report uses to retrieve
> data dynamically based on a criteria page.
> All I need is to change part of the RDL of the report
> that includes the command text but i can't seem to find
> how to do that. Can anyone please HELP!!!.
>
> Thanks...
> Omnia|||Thanks very much for the link...
But I still have the following issues:
- Primarily the walkthrough does not work as it insists
on generating errors being unable to parse the query and
I can't manage to make it work...
- The other issue is that this will provide either
an 'ALL' or single selection but not multiple selection
which is what I primarily wanted to achieve, nevertheless
I do appreciate if you can help me further with the
syntax to make the walkthrough work...
Thanks again !!!
Omnia
>--Original Message--
>ms-
help://MS.RSBOL80.1033/RSCREATE/htm/rcr_creating_structure
_data_v1_41ir.htm
>--
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>"Omnia" <anonymous@.discussions.microsoft.com> wrote in
message
>news:725a01c494ba$37e1cf70$a601280a@.phx.gbl...
>>I have a report created on the reporting services and i
>> need to change the query that the report uses to
retrieve
>> data dynamically based on a criteria page.
>> All I need is to change part of the RDL of the report
>> that includes the command text but i can't seem to find
>> how to do that. Can anyone please HELP!!!.
>>
>> Thanks...
>> Omnia
>
>.
>|||Could you post your query and exact error message?
Multiple selection feature is in our wishlist for future releases.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Omnia" <anonymous@.discussions.microsoft.com> wrote in message
news:80f101c495a4$c5efd1a0$a501280a@.phx.gbl...
> Thanks very much for the link...
> But I still have the following issues:
> - Primarily the walkthrough does not work as it insists
> on generating errors being unable to parse the query and
> I can't manage to make it work...
> - The other issue is that this will provide either
> an 'ALL' or single selection but not multiple selection
> which is what I primarily wanted to achieve, nevertheless
> I do appreciate if you can help me further with the
> syntax to make the walkthrough work...
>
> Thanks again !!!
> Omnia
>
>
>
>>--Original Message--
>>ms-
> help://MS.RSBOL80.1033/RSCREATE/htm/rcr_creating_structure
> _data_v1_41ir.htm
>>--
>>This posting is provided "AS IS" with no warranties, and
> confers no rights.
>>"Omnia" <anonymous@.discussions.microsoft.com> wrote in
> message
>>news:725a01c494ba$37e1cf70$a601280a@.phx.gbl...
>>I have a report created on the reporting services and i
>> need to change the query that the report uses to
> retrieve
>> data dynamically based on a criteria page.
>> All I need is to change part of the RDL of the report
>> that includes the command text but i can't seem to find
>> how to do that. Can anyone please HELP!!!.
>>
>> Thanks...
>> Omnia
>>
>>.|||Thank You very much for your assistance, the walkthrough
worked fine, and I will try to apply that around here...
>--Original Message--
>Could you post your query and exact error message?
>Multiple selection feature is in our wishlist for future
releases.
>--
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>
>"Omnia" <anonymous@.discussions.microsoft.com> wrote in
message
>news:80f101c495a4$c5efd1a0$a501280a@.phx.gbl...
>> Thanks very much for the link...
>> But I still have the following issues:
>> - Primarily the walkthrough does not work as it insists
>> on generating errors being unable to parse the query
and
>> I can't manage to make it work...
>> - The other issue is that this will provide either
>> an 'ALL' or single selection but not multiple selection
>> which is what I primarily wanted to achieve,
nevertheless
>> I do appreciate if you can help me further with the
>> syntax to make the walkthrough work...
>>
>> Thanks again !!!
>> Omnia
>>
>>
>>
>>--Original Message--
>>ms-
help://MS.RSBOL80.1033/RSCREATE/htm/rcr_creating_structure
>> _data_v1_41ir.htm
>>--
>>This posting is provided "AS IS" with no warranties,
and
>> confers no rights.
>>"Omnia" <anonymous@.discussions.microsoft.com> wrote in
>> message
>>news:725a01c494ba$37e1cf70$a601280a@.phx.gbl...
>>I have a report created on the reporting services and
i
>> need to change the query that the report uses to
>> retrieve
>> data dynamically based on a criteria page.
>> All I need is to change part of the RDL of the report
>> that includes the command text but i can't seem to
find
>> how to do that. Can anyone please HELP!!!.
>>
>> Thanks...
>> Omnia
>>
>>.
>
>.
>|||What is ms-help://MS.RSBOL80.1033/RSCREATE/htm/rcr_creating_structure_data_v1_41ir.htm
Is that a URL ? Or is it
http://MS.RSBOL80.1033/RSCREATE/htm/rcr_creating_structure_data_v1_41ir.htm
I can access neither.
Please help !|||ms-help: link should work if you have books online installed.
MSDN page is here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rscreate/htm/rcr_creating_structure_data_v1_41ir.asp
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"mangaraju venuturupalli" <mangaraju@.yahoo.com> wrote in message
news:784bfe81.0409141309.18bae5e6@.posting.google.com...
> What is
> ms-help://MS.RSBOL80.1033/RSCREATE/htm/rcr_creating_structure_data_v1_41ir.htm
> Is that a URL ? Or is it
> http://MS.RSBOL80.1033/RSCREATE/htm/rcr_creating_structure_data_v1_41ir.htm
> I can access neither.
> Please help !