Thursday, March 22, 2012
Changing the column color depending on a dynamic date
background color of dynamically depending on a date which is computed
dynamically when the report is created.
I a using a textbox to display the dynamically calculated date
(e.g. =DateAdd(DateInterval.Day,5,Today).ToString("dd-MMM") )
But I cannot seem to reference this textbox object at runtime.
I also need to know how to get the actual dayname given the calculated
date above.
Any ideas about how I can do this'
Thanks
MarkusOn Apr 11, 7:19 pm, Markus...@.gmail.com wrote:
> Hi, I have a series of columns which I need to be able to change the
> background color of dynamically depending on a date which is computed
> dynamically when the report is created.
> I a using a textbox to display the dynamically calculated date
> (e.g. =DateAdd(DateInterval.Day,5,Today).ToString("dd-MMM") )
> But I cannot seem to reference this textbox object at runtime.
> I also need to know how to get the actual dayname given the calculated
> date above.
> Any ideas about how I can do this'
> Thanks
> Markus
You should use something like this in a new dataset that populates a
hidden report parameter:
SELECT DATENAME(DW, GETDATE())
Then reference the hidden parameter as part of the table's column
background property. Something like this should work:
=iif(Parameters!HiddenParameterName.Value = "Monday", "Red", "White")
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||On Apr 12, 1:07 pm, "EMartinez" <emartinez...@.gmail.com> wrote:
> On Apr 11, 7:19 pm, Markus...@.gmail.com wrote:
>
>
> > Hi, I have a series of columns which I need to be able to change the
> > background color of dynamically depending on a date which is computed
> > dynamically when the report is created.
> > I a using a textbox to display the dynamically calculated date
> > (e.g. =DateAdd(DateInterval.Day,5,Today).ToString("dd-MMM") )
> > But I cannot seem to reference this textbox object at runtime.
> > I also need to know how to get the actual dayname given the calculated
> > date above.
> > Any ideas about how I can do this'
> > Thanks
> > Markus
> You should use something like this in a new dataset that populates a
> hidden report parameter:
> SELECT DATENAME(DW, GETDATE())
> Then reference the hidden parameter as part of the table's column
> background property. Something like this should work:
> =iif(Parameters!HiddenParameterName.Value = "Monday", "Red", "White")
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant- Hide quoted text -
> - Show quoted text -
Thanks Enrique, I will give that a shot
Cheers
Markus|||On Apr 12, 5:00 pm, Markus...@.gmail.com wrote:
> On Apr 12, 1:07 pm, "EMartinez" <emartinez...@.gmail.com> wrote:
>
> > On Apr 11, 7:19 pm, Markus...@.gmail.com wrote:
> > > Hi, I have a series of columns which I need to be able to change the
> > > background color of dynamically depending on a date which is computed
> > > dynamically when the report is created.
> > > I a using a textbox to display the dynamically calculated date
> > > (e.g. =DateAdd(DateInterval.Day,5,Today).ToString("dd-MMM") )
> > > But I cannot seem to reference this textbox object at runtime.
> > > I also need to know how to get the actual dayname given the calculated
> > > date above.
> > > Any ideas about how I can do this'
> > > Thanks
> > > Markus
> > You should use something like this in a new dataset that populates a
> > hidden report parameter:
> > SELECT DATENAME(DW, GETDATE())
> > Then reference the hidden parameter as part of the table's column
> > background property. Something like this should work:
> > =iif(Parameters!HiddenParameterName.Value = "Monday", "Red", "White")
> > Hope this helps.
> > Regards,
> > Enrique Martinez
> > Sr. Software Consultant- Hide quoted text -
> > - Show quoted text -
> Thanks Enrique, I will give that a shot
> Cheers
> Markus
You're welcome. Let me know if you need further assistance.
Regards,
Enrique Martinez
Sr. Software Consultant
Monday, March 19, 2012
Changing source filename in DTS
Is there a way I can make the source file in my DTS dynamic so that every time I run it using ASP I can tell it which file to use?Hi!
Is there a way I can make the source file in my DTS dynamic so that every time I run it using ASP I can tell it which file to use?
Check out the Dynamic Properties Task.
Regards,
hmscott
Sunday, February 12, 2012
Changing database connect to dynamic then the report fails.
Hi all. I've got a report in RS2005 where I am trying to be able to change the database it runs against based on a parameter. I started by making the report and having this as my connect string in the dataset:
="data source=MyServer; initial catalog=DataYear2005"
I was able to connect and preview the report with no problems. I checked the forum and found out that to make it dynamic, I should be able to just add a parameter to the above definition. I set up the parameter as a string with a default value of 2005 and then changed the connect string to be:
="data source=MyServer; initial catalog=DataYear"+Trim(Parameters!sSession.Value)
When I preview this, I get the error: "Error durring processing of the ConnectString expression of datasource MyDatasource."
I'm working in the VS.Net 2005 environment that gets installed with the SQL Server 2005 tools and running against a SQL Server 2000 server. Any help would be apprieciated.
Suggestion: change the connection string back so that the report is working again. Then add a textbox in the report that uses the same expression as your planned dynamic connection string expression. Make sure the expression works in that report textbox. I think there may be type conversion problems with the expression or the name of the report parameter is not correct (case-sensitive!). You may also want to try:
="data source=MyServer; initial catalog=DataYear" & Trim(CStr(Parameters!sSession.Value))
-- Robert
|||Robert,
I tried your ideas and it is still not working. I set up the text box with the expression and I also made one with the connect string without the parameter. The data in both text boxes was identical. I then added the CStr function with no improvements. I also verified that the case was correct and it was. Any other ideas?
Thanks.
|||Do you have any parameters that are query based and rely on this connection string?
-Lukasz
This posting is provided "AS IS" with no warranties, and confers no rights.