Showing posts with label dynamically. Show all posts
Showing posts with label dynamically. Show all posts

Tuesday, March 27, 2012

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
>
>

Sunday, March 25, 2012

Change Flat File Source Dynamically

I am a relative newbie to SSIS. I have been tasked with writing packages to import data from our clients. We have about 100 clients. Each client has a few different file formats. None of the clients have the same format as each other. We load files from each client each day. Each day the file name changes. I have done all of my current development work with a constant file name in a text file connection manager.

Ultimately we will write a VB application for the computer operator to select the flat file to load and the SSIS package to load it with. I had been planning on accomplishing this thru the SSIS command line interface. Can I specify the flat file to load via a variable that is passed through the command line? Do I need to use a Script Component to take the variable and assign it to the connection manager?

Is there a better way to do this? I have seen glimpses of a VB interface to SSIS. Maybe that is a better way to kick off the packages from a VB app?

Thanks,

Chris

You can set the ConnectionString property of your flat file connection managers to be based on an expression, which is in turn based on a package variable. You can then set the value of the variable from the command line when you run DEXEC.

You can also use the Foreach Loop container to loop through all of the files in a given folder, and use the package variable as the loop enumerator, so that it will be automatically set to the name of the current file. If you know that files that are of a given format from a given client will always be in a specific folder, this might eliminate the need to have a custom UI and rely on operator input to kick off the ETL process. I don't know if this makes sense for your environment, but it sounds attractive to me.

I have not personally used the .NET API to execute packages, so I cannot comment on that approach.

|||

Matthew,

Thank you! I knew that should be possible, but, I couldn't figure out how. Based on your hint (expression) I was able to find the expressions section on my Connection's properties pane. I added an expression the ConnectionString (path) to a variable. It works!

One small oddity... I wanted to set the variable in a Script Component for testing (rather than command line). However, I couldn't set the Script Component as the first object on my Data Flow since the Flat File Source object will not take a predecessor. Instead I created another Data Flow, made my main one dependent on that, and then added a "Source" Script Component to the new Data Flow... then I populated the new variable in that Script Component.

Thanks,

Chris

|||

tofferr wrote:

One small oddity... I wanted to set the variable in a Script Component for testing (rather than command line). However, I couldn't set the Script Component as the first object on my Data Flow since the Flat File Source object will not take a predecessor. Instead I created another Data Flow, made my main one dependent on that, and then added a "Source" Script Component to the new Data Flow... then I populated the new variable in that Script Component.

Thanks,

Chris

Why not use a Script Task immediately before your data flow task to set the variable?

|||

jwelch wrote:

Why not use a Script Task immediately before your data flow task to set the variable?

That's a good idea... but, how do I access the varibales? Variables.variableName is not getting recognized in the script component editor, even after I added it to the ReadWriteVariables list.

Thanks,

Chris

|||

This article from Jamies is right on point for much of this.

http://blogs.conchango.com/jamiethomson/archive/2006/03/11/3063.aspx

Chris

|||Dts.Variables("NameofVar") should work in the Script Task.|||

jwelch wrote:

Dts.Variables("NameofVar") should work in the Script Task.

You also need to remember to specify the (case-sensitive!) variable's name in the ReadWriteVariables property of the Script task for this to work.

|||

tofferr wrote:

Matthew,

Thank you! I knew that should be possible, but, I couldn't figure out how. Based on your hint (expression) I was able to find the expressions section on my Connection's properties pane. I added an expression the ConnectionString (path) to a variable. It works!

Thanks for the feedback!

If you ask me, SSIS Expressions are the most powerful single feature in the SSIS toolset. Being able to declaratively bind arbitrary expressions to arbitrary properties of arbitrary components (with a few restrictions, of course), so that the expression is evaluated whenever the property is accessed, is incredibly powerful and cool. So many people I talk to use SSIS without having a real "light bulb moment" about expressions, but to me they are a primary tool for making SSIS packages configurable, maintainable and reusable.

I feel a blog post coming on...

sql

Change dynamically(via code) the SqlDataSource for a GridView....

Hi,

say I have two Sqldatasources objects:SqlDataSource1 and SqlDataSource2...

Does anybody know how can I alter programmatically these two sqldatasources in a gridview?

Thanks!!!

Ok,I resolved it,

I had to delete the "DataSourceID="SqlDataSource1" from the gridview directive and add the following code to a button event:

GridView1.DataSource = SqlDataSource1

GridView1.DataBind()

|||

But now my new question is :Confused

How can I see what is the current/previous DataSource of my GridView Control?

Thanks...

|||

GridView1.DataSource will return the data source (as an object)

You can also useGridView1.DataSourceID to obtain the ID of the datasource as a string

For example:

dim TheCurrentDataSource as object

TheCurrentDataSource =GridView1.DataSource

GridView1.DataSource = The NextDataSource

GridView1.DataBind()

HTH

Tuesday, March 20, 2012

change Datasource at runtime

Hi

Is it possible to change the datasource dynamically in reporting services.

For example if I have a dataset named DataSet1 whose datasource1 connects to server1, how can I change the same DataSet1 to use datasource2 to points to a different server. I would like to know if this datasource change is possible out side the dataset (dynamically).
Thanks

Hi pzmrcd
I've had the same problem. I found that it was not possible without re-rendering the SRS code(XML). It is not possible in SRS since you can't use an expression to change the dataset. Also the field names of datasets may differ.

Monday, March 19, 2012

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

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 !

Change Column Order in Report

Dear Anyone,

Is there a way to dynamically change the order of the columns displayed in an RS report in RS2005?

Thanks,
Joseph

have u found out the solution. i m also trying to implement but i couldn. can u help me to proceed.|||

There is no way to change the column order in RS2005.

The next viable alternative is to change the field that is assigned to the column programatically. You can do this by using the expression edittor of the text box that holds the column information. You will need to assign conditions on what field should be displayed in the column

|||

thanks.. i have also tried that. I m having many cases and also i couldn judge the column order.. its all dynamic.

Change Column Order in Report

Dear Anyone,

Is there a way to dynamically change the order of the columns displayed in an RS report in RS2005?

Thanks,
Joseph

have u found out the solution. i m also trying to implement but i couldn. can u help me to proceed.|||

There is no way to change the column order in RS2005.

The next viable alternative is to change the field that is assigned to the column programatically. You can do this by using the expression edittor of the text box that holds the column information. You will need to assign conditions on what field should be displayed in the column

|||

thanks.. i have also tried that. I m having many cases and also i couldn judge the column order.. its all dynamic.

Thursday, March 8, 2012

Change chart type dynamically from Column to Line graph?

I am developing several charts with column type and sub type as stacked. There is a requirement from the users that they want an option to choose the type of chart.

Is it possible to change chart type dynamically from say Column type to Line type based on user option in front-end?

Any help will be appreciated.

Thanks in advance !!

The closest you can get directly in RS at this point is to define multiple charts with different types and conditionally only show one of the charts based on a parameter selection.

-- Robert

|||

I have the same problem.

I created 5 charts on one report. but i dont want to execute the report for each change.

all the charts are using the same dataset.

Can i show /Hide all the charts except the choosen one by clicking on a textbox?

thanks

|||

Yes you could do that by adding a drillthrough navigation action on the textbox. Add a drillthrough parameter which determines which chart should be shown in the drillthrough target report. Note that you could also setup the navigation action to drill to the current report with a certain parameter value.

More information about drillthrough reports is available here: http://msdn2.microsoft.com/en-us/library/aa337167.aspx

-- Robert

|||

thanks Robert.

but, by using the drillthrough option, i actually execute again the same report, and again i execute the sql store-procedure.

i want to avoid it: one time execution and after it all the graphs changes will be on the client side.

does it doable?

thanks.

Yuval

Change chart type dynamically from Column to Line graph?

I am developing several charts with column type and sub type as stacked. There is a requirement from the users that they want an option to choose the type of chart.

Is it possible to change chart type dynamically from say Column type to Line type based on user option in front-end?

Any help will be appreciated.

Thanks in advance !!

The closest you can get directly in RS at this point is to define multiple charts with different types and conditionally only show one of the charts based on a parameter selection.

-- Robert

|||

I have the same problem.

I created 5 charts on one report. but i dont want to execute the report for each change.

all the charts are using the same dataset.

Can i show /Hide all the charts except the choosen one by clicking on a textbox?

thanks

|||

Yes you could do that by adding a drillthrough navigation action on the textbox. Add a drillthrough parameter which determines which chart should be shown in the drillthrough target report. Note that you could also setup the navigation action to drill to the current report with a certain parameter value.

More information about drillthrough reports is available here: http://msdn2.microsoft.com/en-us/library/aa337167.aspx

-- Robert

|||

thanks Robert.

but, by using the drillthrough option, i actually execute again the same report, and again i execute the sql store-procedure.

i want to avoid it: one time execution and after it all the graphs changes will be on the client side.

does it doable?

thanks.

Yuval