Thursday, March 29, 2012
Edit data with Query Analyzer
graphic grid, i.e. actually changing individual values in cells? Using
SQL statements is too cumbersome for my purpose; I need to have more
hands-on control.Rick,
Use the Object Browser (F8) --> right-click table --> Open.
HTH
Jerry
"Rick Charnes" <rickxyz--nospam.zyxcharnes@.thehartford.com> wrote in message
news:MPG.1dc1e9977390b6f9989901@.msnews.microsoft.com...
> Is there any way I can use Query Analyzer to edit data in a table via a
> graphic grid, i.e. actually changing individual values in cells? Using
> SQL statements is too cumbersome for my purpose; I need to have more
> hands-on control.|||Rick Charnes wrote:
> Is there any way I can use Query Analyzer to edit data in a table via
> a graphic grid, i.e. actually changing individual values in cells?
> Using SQL statements is too cumbersome for my purpose; I need to have
> more hands-on control.
Some tables yes and some tables no. I've never figures out why. I would
use SQL Enterprise Manager instead if you absolutely have to edit the
data in a table in this fashion.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||I will give another solution, you can actually do everything you want to
manually. even queries can be developed using that... wondering what is it..
it is around every one but rarely people use that is access adp. More so, yo
u
can develop forms/ and reports from sql server data with ease.
follow these simple steps,
1.open access(better xp or above)
2.select new
3.select new project from exisiting data in the side pane( by this select
adp project not mdb)
4.data link dialogue appears, fill credentials and connection details
5.Rest is the world that you wont imagine
--
Regards
R.D
--Knowledge gets doubled when shared
"David Gugick" wrote:
> Rick Charnes wrote:
> Some tables yes and some tables no. I've never figures out why. I would
> use SQL Enterprise Manager instead if you absolutely have to edit the
> data in a table in this fashion.
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com
>|||> Some tables yes and some tables no. I've never figures out why.
I always thought it is depending on whether the table has a PK, UQ, unique i
ndex or not.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:eIQsIpc1FHA.3520@.TK2MSFTNGP10.phx.gbl...
> Rick Charnes wrote:
> Some tables yes and some tables no. I've never figures out why. I would us
e SQL Enterprise Manager
> instead if you absolutely have to edit the data in a table in this fashion
.
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com|||David Gugick wrote:
> Rick Charnes wrote:
> Some tables yes and some tables no. I've never figures out why.
I've noticed that tables with no unique constraint of any
kind appear as read-only, but once you add a primary key for example,
you are able to modify data.
If QA front end is written in MFC, then it is probably related
to the behavior of MFC recordset, which is also read-only after
pulling data from such a table.|||Tibor Karaszi wrote:
> I always thought it is depending on whether the table has a PK, UQ,
> unique index or not.
That's probably the case.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Enterprise manager can do that, although I would not do it except when
creating a database for a non-live project.
All data manipulation needs to be done through applications such as
databrowsers and so on.
"Rick Charnes" <rickxyz--nospam.zyxcharnes@.thehartford.com> wrote in message
news:MPG.1dc1e9977390b6f9989901@.msnews.microsoft.com...
> Is there any way I can use Query Analyzer to edit data in a table via a
> graphic grid, i.e. actually changing individual values in cells? Using
> SQL statements is too cumbersome for my purpose; I need to have more
> hands-on control.
Monday, March 26, 2012
Easy question - changing Visibility of textbox
returned in my dataset. The field is a summed field, and I simply do NOT
want to show the field if it is 0, less than zero, or NULL.
What should my expression for the "Visbility" property look like?
TIA,
--
Brian Grant
Senior Programmer
SI International
www.si-intl.comiif(Parameters!Fieldname.Value <= 0 OR Parameters!Fieldname.Value IS Nothing, True, False)
"G" wrote:
> I'm trying to affect the visibility of a text box based upon a field value
> returned in my dataset. The field is a summed field, and I simply do NOT
> want to show the field if it is 0, less than zero, or NULL.
> What should my expression for the "Visbility" property look like?
> TIA,
> --
> Brian Grant
> Senior Programmer
> SI International
> www.si-intl.com
>
>|||IS Nothing
that is what was tripping me up, thanks comet.
--
Brian Grant
Senior Programmer
SI International
www.si-intl.com
"comet61" <comet61@.discussions.microsoft.com> wrote in message
news:CFF1A78C-9DE1-475E-9BB9-5D4D6F4EAE04@.microsoft.com...
> iif(Parameters!Fieldname.Value <= 0 OR Parameters!Fieldname.Value IS
Nothing, True, False)
> "G" wrote:
> > I'm trying to affect the visibility of a text box based upon a field
value
> > returned in my dataset. The field is a summed field, and I simply do NOT
> > want to show the field if it is 0, less than zero, or NULL.
> >
> > What should my expression for the "Visbility" property look like?
> >
> > TIA,
> >
> > --
> > Brian Grant
> > Senior Programmer
> > SI International
> > www.si-intl.com
> >
> >
> >
Wednesday, March 21, 2012
Dynamicalt changing sql query in crystal sub report
i had make sql change in main report
but
How to make to send a SQL request for the subreport ?
IreshMoved to a more proper forum|||Open the subreport and change the query that you want
Friday, March 9, 2012
Dynamically changing Web Service Task parameters at runtime?...
I am trying to access a web service that has parameters (three of them, all strings). But I want to access this service repeatedly, and drive the thing from a table.
I've got the Foreach Loop correctly getting variables from the recordset I populate from the table. That works and I can run a script with msgbox showing all the correct values being read from the table.
My problem is taking these variables and sticking them in the Name / Type / Value entries in the Input tab of the Web Service Task. There doesn't seem to be any mechanism for dynamically updating these at runtime, and if there isn't, that is a HUGE hole in the product. Who accesses Web Services with the same parameters every time?!?
No doubt you know this by now Lazamataz but this can't be done. you're right, it IS a hole in the product!
-Jamie|||
I'm trying to do this to...
Is there a way of accessing web service parameters through a script and the runtime / tasks?
|||Absolutely, yes. Buy Donald Farmer's book (available at the usual places). That has a downloadable chapter that shows you how.
-Jamie
Dynamically changing Web Service Task parameters at runtime?...
I am trying to access a web service that has parameters (three of them, all strings). But I want to access this service repeatedly, and drive the thing from a table.
I've got the Foreach Loop correctly getting variables from the recordset I populate from the table. That works and I can run a script with msgbox showing all the correct values being read from the table.
My problem is taking these variables and sticking them in the Name / Type / Value entries in the Input tab of the Web Service Task. There doesn't seem to be any mechanism for dynamically updating these at runtime, and if there isn't, that is a HUGE hole in the product. Who accesses Web Services with the same parameters every time?!?
No doubt you know this by now Lazamataz but this can't be done. you're right, it IS a hole in the product!
-Jamie|||
I'm trying to do this to...
Is there a way of accessing web service parameters through a script and the runtime / tasks?
|||Absolutely, yes. Buy Donald Farmer's book (available at the usual places). That has a downloadable chapter that shows you how.
-Jamie
Dynamically Changing the Picture at the Record Level.
Appreciate your help on the following.
I need to display images according to the status of the record. For example,
I am displaying product list where the margin is less than 15% then display
image1, when margin is between 16% and 25% display image2 etc. I am currently
using a table to store the path of the images.
Thank you again,
KG@.SF
Highly appreciate your helpI also have to develop similar concept but Matrix report where I have to
again display image indicators when a category of product margin falls betwen
a certain range. Appreciate your help,
KG
"KG@.SFC" wrote:
> Hi,
> Appreciate your help on the following.
> I need to display images according to the status of the record. For example,
> I am displaying product list where the margin is less than 15% then display
> image1, when margin is between 16% and 25% display image2 etc. I am currently
> using a table to store the path of the images.
> Thank you again,
> KG@.SF
> Highly appreciate your help
Dynamically Changing the length of a varchar(n) field
I have a question about dynamically changing the length of a varchar(n)
field, in case the value I'm trying to insert is too big and will give
a "truncated" error, but before the error is given! i.e. Is there some
kind of a way to "test" the length of the field while Inserting the
value into it, and to have it automatically increase its length to the
length of the value being inserted, in case the value is too big?
I've been able to do this in a "primitive" way, simply by identifying
the specific error number in case the value is being truncated, and
then increasing the length of the varchar(n) field by using the ALTER
command, and then duplicating the insert statement, but is there a
standard (shorter) way of doing this?
Here is my code (I'm working in an ASP environment):
<%
var_txt = "abcdefghijklmnopqrstuvwxyz12345678789"
sql = "Insert Into Table1 (text) Values ('" & var_txt & "')"
On Error Resume Next
conn.Execute sql
If err = -2147217833 Then
Response.Write "Error Recognized Successfully!<br /><br />"
sql = "ALTER TABLE Table1 ALTER COLUMN text VARCHAR(" &
Len(var_txt) &
") NOT NULL"
On Error Resume Next
conn.Execute sql
If err<>0 Then
Response.Write "Error while trying to alter Column:<br
/>" & err & "
= " & err.description & "<br />"
Else
Response.Write "Column altered successfully to: " &
Len(var_txt) &
"<br />"
sql = "Insert Into Table1 (text) Values ('" & var_txt &
"')"
On Error Resume Next
conn.Execute sql
If err<>0 Then
Response.Write "<br />Error number 2:<br />" &
err.description &
"<br />"
Else
Response.Write "Now it was added successfully!
HaHa!<br />"
End If
End If
Else
Response.Write "Success."
End If
%>
Thanks in advance!On 26.12.2006 12:46, John wrote:
Quote:
Originally Posted by
I have a question about dynamically changing the length of a varchar(n)
field, in case the value I'm trying to insert is too big and will give
a "truncated" error, but before the error is given! i.e. Is there some
kind of a way to "test" the length of the field while Inserting the
value into it, and to have it automatically increase its length to the
length of the value being inserted, in case the value is too big?
>
I've been able to do this in a "primitive" way, simply by identifying
the specific error number in case the value is being truncated, and
then increasing the length of the varchar(n) field by using the ALTER
command, and then duplicating the insert statement, but is there a
standard (shorter) way of doing this?
There are several things to say to this. First, the length of a VARCHAR
column should generally be dependent on business requirements - i.e. the
length comes before the inserted values. You can view it as a
requirement (for example a zip code is just 5 characters here in
Germany) and data not satisfying that requirement basically should not
go into that column. In this case the table will only change if the
business requirement changes (they changed length of zip code from 4 to
5 after the wall broke down over here) and not according to data inserted.
Having said that the easiest solution in your case (i.e. if you want to
maintain that you have to insert strings with arbitrary length) is to
just set the length to the max length allowed for that column (in SQL
Server 2k it's 8000 IIRC). Additionally you will have to take
application level measures to limit the length of inserted values to the
columns width.
Alternatively you could use a TEXT column but changing an existing
VARCHAR to a TEXT column is not as easy as executing an ALTER TABLE.
Kind regards
robert|||Hey Robert,
Thank you for your reply! That's pretty good advice and I think I'll do
just that, since it's far less complicated than what I was trying to do
(obviously).
Robert Klemme wrote:
Quote:
Originally Posted by
On 26.12.2006 12:46, John wrote:
Quote:
Originally Posted by
I have a question about dynamically changing the length of a varchar(n)
field, in case the value I'm trying to insert is too big and will give
a "truncated" error, but before the error is given! i.e. Is there some
kind of a way to "test" the length of the field while Inserting the
value into it, and to have it automatically increase its length to the
length of the value being inserted, in case the value is too big?
I've been able to do this in a "primitive" way, simply by identifying
the specific error number in case the value is being truncated, and
then increasing the length of the varchar(n) field by using the ALTER
command, and then duplicating the insert statement, but is there a
standard (shorter) way of doing this?
>
There are several things to say to this. First, the length of a VARCHAR
column should generally be dependent on business requirements - i.e. the
length comes before the inserted values. You can view it as a
requirement (for example a zip code is just 5 characters here in
Germany) and data not satisfying that requirement basically should not
go into that column. In this case the table will only change if the
business requirement changes (they changed length of zip code from 4 to
5 after the wall broke down over here) and not according to data inserted.
>
Having said that the easiest solution in your case (i.e. if you want to
maintain that you have to insert strings with arbitrary length) is to
just set the length to the max length allowed for that column (in SQL
Server 2k it's 8000 IIRC). Additionally you will have to take
application level measures to limit the length of inserted values to the
columns width.
>
Alternatively you could use a TEXT column but changing an existing
VARCHAR to a TEXT column is not as easy as executing an ALTER TABLE.
>
Kind regards
>
robert
Dynamically Changing the DataSource of the Report
hi to all,
This is SidRogers,
i was newer to the this Reporting Services..
my Pbm is....
Creating the Report with or with out having any dataSource with SqlServer BI Studio.
I have some dummy fields in the Report..after I deployed into the ReportServer...
After that my Task is... Getting that ReportDefinition and Assinging the DataSource at the Runtime..in .Net frameWork 2.0...
upto My R & D.. i got one ReportDefintion.VB file.... I saw other forums. it said that. By using classes in this Vb file we can change the DataSource..if so may i know how...
this is very Urgent Work..
pleaseeeeeee urgently let me knoww..if u know any body....
thax in Advance,
Hi Sid-
You can set data source properties of a report through VB script, using the rs.exe tool, or you can alter it via the SOAP API from any C#/VB application. For more information on using script, some samples can be found here: http://msdn2.microsoft.com/en-us/library/ms160854.aspx
-JonHP
dynamically changing the connection properties
I want to transfer data from one server to another by using SSIS. i want the connection string to be dynamic and also according to the some other variable, the transforming data is changing.
Could you provide me the solution thet how i am able to change my connetction string dynamically and the other variable too.
i am using VS 2003 as front end and SQL server 2005 as a backhand.
Due to VS.NET 2003 i am able to create DTS packages but i have to migrate it and then anly i am able to use it in JOB in SQL server agent of SQL server 2005.
is that any code or any stored procedure from which i am able to migrate DTS packages to SSIS packages.
Thank you
You need Business Intelligence Developers Studio or Visual Studio 2005 to edit SSIS packages. You can use configurations to change connection strings or variables, or you can set them by using the /SET switch for DTEXEC.|||You can reset the connection string using Script task in you SSIS and you can acess the conneciton variable as DTS.Connection|||I suggest that you use configurations, or variables and expressions before you start with Script Tasks. The latter are harder to support. Using one of the more structured options should be easier, and also more manageable going forward, particularly when looking to future versions.
dynamically changing TextDecoration property of a text box
TextDecoration underline property . How do I change the underline property to
None dynamically based on the data. I am writing the following code in the
Expression section of TextDecoration property of the text box.
If Parameters!pParam.Value = "Something" Underline else None
Please advice.Right click on the box and select properties, then go to the font tab, in
the decoration section click on FX on the right and enter your expression ie
iif(fields!mycol.value = "Yes","Underline","None")
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Kiran" <Kiran@.discussions.microsoft.com> wrote in message
news:A7E8C6EC-9C00-4178-BC83-B89556B127B3@.microsoft.com...
>I need to make one column on a report to display as hyperlink. I am using
> TextDecoration underline property . How do I change the underline property
> to
> None dynamically based on the data. I am writing the following code in the
> Expression section of TextDecoration property of the text box.
> If Parameters!pParam.Value = "Something" Underline else None
> Please advice.|||Hi,
I have a report with a textbox acting as a hyperlink. when i click on it, i
want the target to be opened in a new window, i.e. i want target="_blank" but
i havent found a soln yet to this. could you help me with this' i cant
believe they left out this while designing reporting services :(
Thanks
"Wayne Snyder" wrote:
> Right click on the box and select properties, then go to the font tab, in
> the decoration section click on FX on the right and enter your expression ie
> iif(fields!mycol.value = "Yes","Underline","None")
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> (Please respond only to the newsgroup.)
> I support the Professional Association for SQL Server ( PASS) and it's
> community of SQL Professionals.
> "Kiran" <Kiran@.discussions.microsoft.com> wrote in message
> news:A7E8C6EC-9C00-4178-BC83-B89556B127B3@.microsoft.com...
> >I need to make one column on a report to display as hyperlink. I am using
> > TextDecoration underline property . How do I change the underline property
> > to
> > None dynamically based on the data. I am writing the following code in the
> > Expression section of TextDecoration property of the text box.
> > If Parameters!pParam.Value = "Something" Underline else None
> >
> > Please advice.
>
>
Dynamically changing task name displayed within ForEach Loop Container
Does anyone know how to change the task name displayed within a ForEach Loop Container (or of the ForEach Loop Container task itself) based on a variable. I am pretty familiar with setting variable values during task execution and using expressions to alter task properties based on variables. I have tried using an expression to alter the value of the Name property of the ForEach Loop Container but the name of the ForEach Loop Container does not change during execution. Since the color of the various tasks change during execution, I would think that the task names could be changed as well.
What? Why would you want to do this? The fact that the colors change is just a pretty *debug feature* and means nothing in the execution of the package.|||I know that. I have a loop that executes through a few hundred iterations and runs for 30 minutes or so. I'd like to review how far in the process it is while it runs.|||Can you write a counter to a log file or something?|||
You can create checkpoints or if that does not fit your needs; you could write to a file or table on each iteration an the look at that. if you are interacting with a DB you may use a DB profiler to monitor the activity. Or try to loop only a few times until you get confident with the package result.
Rafael Salas
|||No, you can't change the task name during execution.
You can log to the log output window though and only log the increment count, that would be the equivalent.
|||Thanks to everyone for the alternative suggestions. Thanks to Kirk for the definitive answer.
Dynamically changing SQL ConnectionString for live/test environments
Hello. What I'm trying to do should be fairly simple, but after an hour of searching and trials, I can't seem to get it working.
When I run my website on my test machine, I would like it to use a certain value for my connectionString. But when it's run on the live server, it should use a different connection string. This way, when it's on the test server it'll use the test database.
In my Web.Config file, I have this:
<connectionStrings>
<add name="myConnectionString" connectionString="Data Source=TEST_DB;Initial Catalog=tester;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
I would like to be able to change the connectionString in something like the Global.asax file, when the application is loaded. I'd check for a certain environment variable, or some other condition, and change the value of the connectionString.
I tried this in my Global.asax, but it told me the value was read_only:
ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString = "Data Source=LIVE_DB;Initial Catalog=live;Integrated Security=True"
Does anyone have a good way of doing this, so I don't need to juggle Web.Config files when I publish my site?
Thanks.
You can have a separate app.config file for production or have a separate configuration section so that when you build the application (deploy), Visual Studio will replace the connection strings
Take a look at this post (http://msdn2.microsoft.com/en-us/library/bb164473(VS.80).aspx)
|||After a more varied search, I came across the Web Deployment Projects tools.
http://msdn2.microsoft.com/en-us/asp.net/Aa336619.aspx
Now I've got it simply including a different piece of config code when it builds the website in either Debug or Release mode.
Thanks for the reply, though. I'm all set now.
Dynamically changing reports at runtime
time going down the wrong path, so I hope someone can answer my questions
about Reporting Services capabilities...
With Reporting Services, can I dynamically (at runtime via code):
1) add or remove subreports from a report?
2) make a subreport visible or hidden?
3) add or delete columns?
4) make columns visible or hidden?
5) add or delete tables?
6) make a table visible or hidden?
Is doing any of these things fairly straightforward?
Thanks so much in advance,
SherylYes, you can use an expression for the Hidden property of respective report
elements to dynamically show/hide them at runtime.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Sheryl Landon" <shland@.comcast.net> wrote in message
news:OoDKy5$pEHA.3244@.tk2msftngp13.phx.gbl...
> Hi - I'm trying to decide among reporting options without spending too
much
> time going down the wrong path, so I hope someone can answer my questions
> about Reporting Services capabilities...
> With Reporting Services, can I dynamically (at runtime via code):
> 1) add or remove subreports from a report?
> 2) make a subreport visible or hidden?
> 3) add or delete columns?
> 4) make columns visible or hidden?
> 5) add or delete tables?
> 6) make a table visible or hidden?
> Is doing any of these things fairly straightforward?
> Thanks so much in advance,
> Sheryl
>
Dynamically changing position of Textbox
Hi,
In my report, I've to print the address of the customer in a form which is in a pre-defined format. So while printing, the line number and position should be specified by the user. Is there any ways in SSRS to change the position of a textbox/any control dynamically by inputing the x and y coordinates? If there is a way please let me know that.
Thanks in Advance,
Leks
What does the surrounding content in the layout look like? Do you have a "clear" region in which you could place a very large textbox, representing the all the page area in which the textbox could potentially be placed?
If so, you might be able to do this with padding. IOW, you would place this very large textbox in the layout and then you would pad the top and left to "push" the content of the text box into the customer's preferred position, at runtime.
This is possible because you can express the padding values as expressions. Think of the textbox's true top and left as an offset from 0,0, which you will subtract from the customer's input values (which will be parameters) to get the padded top and left at runtime.
HTH,
>L<
|||Hi Lisa,
Thanks for your quick reply. But unfortunately my layout is not clear. It contains other data too that I need to position according to the input for them. For each item in the report we have to enter the position. I know this process is a bit tedious. but there is no other ways. They actualy need the report data such that it can be printed in many forms. Please reply as soon as possible.
Thank you dear,
Leks
|||Hi Leks,
If you have to enter the position of each item in the report, then I think your best option is to edit the RDL on the fly, put your coordinates right in the report definition.
Are you comfortable with doing this? It may be quite straightward. Some things that would enter into it and might change what you have to do would include:
* -- What type of data region are you using (list/table) to contain the dynamic items?
* -- Are there additional items in the report that are *not* dynamically positioned, for example is this an order header you are trying to position so that it fits in a window envelope with a table of order lines that is relatively static?
>L<
|||Hi Lisa,
Here all the data should change position dynamically. So Your solution shoud work. But I didnt get it. How we can change the rdl on the fly?
Thanking you,
Leks
|||You can write a whole RDL on the fly if you want to. Look for an example called something like "generate RDL dynamically" on http://gotreportviewer.com/ and there is another example there that will show you how to LoadReportDefinition for a local report from a stream. If the report is a serverreport, you could use the SOAP API to upload the adjusted report definition instead.
In your case, I don't think that it will be necessary to write the whole RDL from scratch (although you will still have to load or upload your revised version). You can have a "template" RDL that you adjust, for each run or each customer, or as needed.
There are two ways to do an RDL template revision, the way I would do it and the way most developers would prefer to do it <g>. I prefer XSLT; in this case I might have a parameter in the XSLT for each positionable item in the report, or pass the entire set of adjustments in the form of a lookup document. If you prefer to load up the RDL in the DOM and select the textboxes as nodes to adjust each of them, this is pretty easy too.
Do you need more help than this, or is this what you're looking for?
>L<
|||Hi Lisa,
Yes. This was what I was looking for. Now I know that using the XSLT we can position the textbox or any control dynamically.
Thank you so much Lisa,
Leks
|||Great -- if you get stuck, holler. I am very willing to go the extra mile for other folks who like XSLT <s>.
>L<
Dynamically changing position of Textbox
Hi,
In my report, I've to print the address of the customer in a form which is in a pre-defined format. So while printing, the line number and position should be specified by the user. Is there any ways in SSRS to change the position of a textbox/any control dynamically by inputing the x and y coordinates? If there is a way please let me know that.
Thanks in Advance,
Leks
What does the surrounding content in the layout look like? Do you have a "clear" region in which you could place a very large textbox, representing the all the page area in which the textbox could potentially be placed?
If so, you might be able to do this with padding. IOW, you would place this very large textbox in the layout and then you would pad the top and left to "push" the content of the text box into the customer's preferred position, at runtime.
This is possible because you can express the padding values as expressions. Think of the textbox's true top and left as an offset from 0,0, which you will subtract from the customer's input values (which will be parameters) to get the padded top and left at runtime.
HTH,
>L<
|||Hi Lisa,
Thanks for your quick reply. But unfortunately my layout is not clear. It contains other data too that I need to position according to the input for them. For each item in the report we have to enter the position. I know this process is a bit tedious. but there is no other ways. They actualy need the report data such that it can be printed in many forms. Please reply as soon as possible.
Thank you dear,
Leks
|||Hi Leks,
If you have to enter the position of each item in the report, then I think your best option is to edit the RDL on the fly, put your coordinates right in the report definition.
Are you comfortable with doing this? It may be quite straightward. Some things that would enter into it and might change what you have to do would include:
* -- What type of data region are you using (list/table) to contain the dynamic items?
* -- Are there additional items in the report that are *not* dynamically positioned, for example is this an order header you are trying to position so that it fits in a window envelope with a table of order lines that is relatively static?
>L<
|||Hi Lisa,
Here all the data should change position dynamically. So Your solution shoud work. But I didnt get it. How we can change the rdl on the fly?
Thanking you,
Leks
|||You can write a whole RDL on the fly if you want to. Look for an example called something like "generate RDL dynamically" on http://gotreportviewer.com/ and there is another example there that will show you how to LoadReportDefinition for a local report from a stream. If the report is a serverreport, you could use the SOAP API to upload the adjusted report definition instead.
In your case, I don't think that it will be necessary to write the whole RDL from scratch (although you will still have to load or upload your revised version). You can have a "template" RDL that you adjust, for each run or each customer, or as needed.
There are two ways to do an RDL template revision, the way I would do it and the way most developers would prefer to do it <g>. I prefer XSLT; in this case I might have a parameter in the XSLT for each positionable item in the report, or pass the entire set of adjustments in the form of a lookup document. If you prefer to load up the RDL in the DOM and select the textboxes as nodes to adjust each of them, this is pretty easy too.
Do you need more help than this, or is this what you're looking for?
>L<
|||Hi Lisa,
Yes. This was what I was looking for. Now I know that using the XSLT we can position the textbox or any control dynamically.
Thank you so much Lisa,
Leks
|||Great -- if you get stuck, holler. I am very willing to go the extra mile for other folks who like XSLT <s>.
>L<
dynamically changing or concatenating the where statment in a
t
queries to handle different conbinations of the query
"Uri Dimant" wrote:
> Based on your narrative I can suggest something like that
> create proc myproc
> @.x int,
> @.y int,
> @.op int -- 1 for AND, 2 for OR
> as
> if op=1
> begin
> select * from table
> where x=coalesce(@.x,x) and y=coalesce(@.y,y)
> end
> if op=2
> begin
> select * from table
> where x=coalesce(@.x,x) or y=coalesce(@.y,y)
> end
>
> "Marcel" <Marcel@.discussions.microsoft.com> wrote in message
> news:61386D81-280C-425D-9C99-3E9170ECF8F0@.microsoft.com...
>
>Marcel
http://www.sommarskog.se/dyn-search.html
"Marcel" <Marcel@.discussions.microsoft.com> wrote in message
news:5812BA18-16D8-4DA2-9621-7B1E1001FDDE@.microsoft.com...
> no that wont work as I would have to write protentually hundreds of
> different
> queries to handle different conbinations of the query
> "Uri Dimant" wrote:
>|||Marcel (Marcel@.discussions.microsoft.com) writes:
> no that wont work as I would have to write protentually hundreds of
> different queries to handle different conbinations of the query
If the purpose is to provide a generic search routine, then read the
article that Uri posted a link to. Being the author, I like to think
that's a good article.
If the purpose is something else, consider writing several stored
procedures. The norm for stored procedures is that they are static,
and address a certain problem.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx
Dynamically Changing Images
I have a report that will be shared by a number of sales agents across a
number of different communities. The agents select a set of parameters and
run their report. Currently Community is one of the parameters they can
select.
I'd like to know if there is any way to dynamically change a graphic based
upon what Community is selected. We'd like to have only one report where the
logo can change rather than 12 different reports.
Thanks
BrennanWe have a property report that shows an image dynamically, our properties
have an ID number assigned to them.
ID number is one of the parameters of the report. On our webserver, we have
an image file (named the id number).
For example the user can choose building number 00818, and on the web server
is a corresponding image 00818.jpg.
We set the image type to external, and the value is an expression -
http://<yourserver>/BuildingImages/ & Parameters!ID.value & ".jpg"
This returns an image on the report based on the building the user has
chosen.
Chris
"Brennan" <Brennan@.discussions.microsoft.com> wrote in message
news:A3E076C0-EF3A-4903-B565-0DFA39A5A13A@.microsoft.com...
> Hi All:
> I have a report that will be shared by a number of sales agents across a
> number of different communities. The agents select a set of parameters
> and
> run their report. Currently Community is one of the parameters they can
> select.
> I'd like to know if there is any way to dynamically change a graphic based
> upon what Community is selected. We'd like to have only one report where
> the
> logo can change rather than 12 different reports.
> Thanks
> Brennan|||"Chris" wrote:
> We have a property report that shows an image dynamically, our properties
> have an ID number assigned to them.
> ID number is one of the parameters of the report. On our webserver, we have
> an image file (named the id number).
> For example the user can choose building number 00818, and on the web server
> is a corresponding image 00818.jpg.
> We set the image type to external, and the value is an expression -
> http://<yourserver>/BuildingImages/ & Parameters!ID.value & ".jpg"
> This returns an image on the report based on the building the user has
> chosen.
> Chris
> "Brennan" <Brennan@.discussions.microsoft.com> wrote in message
> news:A3E076C0-EF3A-4903-B565-0DFA39A5A13A@.microsoft.com...
> > Hi All:
> >
> > I have a report that will be shared by a number of sales agents across a
> > number of different communities. The agents select a set of parameters
> > and
> > run their report. Currently Community is one of the parameters they can
> > select.
> >
> > I'd like to know if there is any way to dynamically change a graphic based
> > upon what Community is selected. We'd like to have only one report where
> > the
> > logo can change rather than 12 different reports.
> >
> > Thanks
> > Brennan
>
>
Thanks Chris|||You can also use a "switch" expression in your value field for the
image:
switch(parameters!community.value = 'x', image1,
parameters!community.value = 'y', image2, ...)
Brennan wrote:
> "Chris" wrote:
> > We have a property report that shows an image dynamically, our properties
> > have an ID number assigned to them.
> > ID number is one of the parameters of the report. On our webserver, we have
> > an image file (named the id number).
> > For example the user can choose building number 00818, and on the web server
> > is a corresponding image 00818.jpg.
> > We set the image type to external, and the value is an expression -
> > http://<yourserver>/BuildingImages/ & Parameters!ID.value & ".jpg"
> >
> > This returns an image on the report based on the building the user has
> > chosen.
> >
> > Chris
> >
> > "Brennan" <Brennan@.discussions.microsoft.com> wrote in message
> > news:A3E076C0-EF3A-4903-B565-0DFA39A5A13A@.microsoft.com...
> > > Hi All:
> > >
> > > I have a report that will be shared by a number of sales agents across a
> > > number of different communities. The agents select a set of parameters
> > > and
> > > run their report. Currently Community is one of the parameters they can
> > > select.
> > >
> > > I'd like to know if there is any way to dynamically change a graphic based
> > > upon what Community is selected. We'd like to have only one report where
> > > the
> > > logo can change rather than 12 different reports.
> > >
> > > Thanks
> > > Brennan
> >
> >
> >
>
> Thanks Chris
dynamically changing default parameter?
I am creating SSRS reports on top of SSAS cubes. I want the default value of parameter to change dynamically based on the current year or it should select the last of the parameter values.
Can this be done?
here is how i'm setting my "from date" (datetime) param to be the first of the current month=DateSerial(Year(Now()), Month(Now()),1)
for today, just use
=Today()
this is for a whole date, you can just pick the year part
Dynamically changing a backup file name
I have read in many posts that DTS is not usually used for doing backups (a
scheduled job is preferred). However if I want to dynamically change the
name of the backup file depending on the date e.g. mydata_september.bak
during the month of september and then mydata_november.bak in november, how
would I go about doing that?
Dale1.Simple way is use the SQL Server Maintenance plan. It
automatically appends the Year,month,Day and time with the
database name.
Example. The backup file name for pubs database will be
pubs_db_200310132200.BAK.
2. If you want to use the datetime with your format, you
have to write a program.
Sample Script:
--
Declare
@.CurrentDateTime varchar(20),
@.dbname varchar(20),
@.dbbackupname varchar(40)
Begin
Select @.dbname=db_name()
Print @.dbname
Select @.CurrentDateTime = substring(DATENAME(month, getdate
()),1,3) +
cast(DATEPART(day, GETDATE()) as
varchar(2))+
cast(DATEPART(hh, GETDATE()) as
varchar(2)) +
cast(DATEPART(mi, GETDATE()) as
varchar(2))
Select @.dbbackupname = @.dbname+@.CurrentDateTime
select @.dbbackupname ='E:\' + @.dbbackupname + '.bak'
backup database @.dbname to disk=@.dbbackupname WITH
NOUNLOAD , RETAINDAYS = 2, DIFFERENTIAL, SKIP , STATS =10, FORMAT
Print @.CurrentDateTime
End
Warning: Test the script before you use. Use at your own
risk.
- SQLVarad(MDCBA-1999,MCSE-1999)
>--Original Message--
>Hi all
>I have read in many posts that DTS is not usually used
for doing backups (a
>scheduled job is preferred). However if I want to
dynamically change the
>name of the backup file depending on the date e.g.
mydata_september.bak
>during the month of september and then
mydata_november.bak in november, how
>would I go about doing that?
>Dale
>
>.
>|||Thanks, will give it a try
Dale
"SQLVarad" <SQLVarad@.hotmail.com> wrote in message
news:01f101c398d9$706888d0$a601280a@.phx.gbl...
> 1.Simple way is use the SQL Server Maintenance plan. It
> automatically appends the Year,month,Day and time with the
> database name.
> Example. The backup file name for pubs database will be
> pubs_db_200310132200.BAK.
> 2. If you want to use the datetime with your format, you
> have to write a program.
> Sample Script:
> --
> Declare
> @.CurrentDateTime varchar(20),
> @.dbname varchar(20),
> @.dbbackupname varchar(40)
> Begin
> Select @.dbname=db_name()
> Print @.dbname
> Select @.CurrentDateTime = substring(DATENAME(month, getdate
> ()),1,3) +
> cast(DATEPART(day, GETDATE()) as
> varchar(2))+
> cast(DATEPART(hh, GETDATE()) as
> varchar(2)) +
> cast(DATEPART(mi, GETDATE()) as
> varchar(2))
> Select @.dbbackupname = @.dbname+@.CurrentDateTime
> select @.dbbackupname ='E:\' + @.dbbackupname + '.bak'
> backup database @.dbname to disk=@.dbbackupname WITH
> NOUNLOAD , RETAINDAYS = 2, DIFFERENTIAL, SKIP , STATS => 10, FORMAT
> Print @.CurrentDateTime
> End
> Warning: Test the script before you use. Use at your own
> risk.
> - SQLVarad(MDCBA-1999,MCSE-1999)
> >--Original Message--
> >Hi all
> >
> >I have read in many posts that DTS is not usually used
> for doing backups (a
> >scheduled job is preferred). However if I want to
> dynamically change the
> >name of the backup file depending on the date e.g.
> mydata_september.bak
> >during the month of september and then
> mydata_november.bak in november, how
> >would I go about doing that?
> >
> >Dale
> >
> >
> >.
> >
Dynamically CHange Table Name
How to dynamically change the Table name which i have use at design time. if old and new table contains same fields but changing only table name.(Old- at Design Time
New - At Run TIme)
I would prefer not to have to go through the hassle of manually opening up my Crystal Report documents in Visual Studio and setting their new table name each and every time I want to make a change to the table name dynamically.
Hope So....
Thanks in Advance.
Regards
Henry Jones.I think this is difficult to do this
See if you find solution here
http://support.businessobjects.com/