If you are unable to create a new account, please email support@bspsoftware.com

 

[Unsolved] Getting Day of Week From Date Prompt for Conditional Formatting

Started by JoeBass, 27 Jan 2006 10:06:59 AM

Previous topic - Next topic

JoeBass

I'm trying to allow the user to simply supply a date in the prompt page.Ã, 
Depending on the day of the week the date happens to evaluate to, the report needs to be conditionally formatted.

If I try to add a layout calculation, the day of week function that I need is not available.Ã, 

If I add a query to hold the calculation and base a variable on it, the calculation returns the correct value but, the variable is not populated.Ã, 

Whats more is that after a successful variable addition and report validation, the report won't validate again after a run.Ã, 

Any ideas?Ã, 

bdybldr

Joe,
When you try to insert the layout calculation using the data item in your query, it can't associate the calculation with your query.  Try adding a new list or repeater to your page header and adding only that calculation from your query to it.  It will display then.  Hope this helps.

JoeBass

Thanks for the reply. 

I am able to build the calculation in a secondary query and display the expected value.   

When I try to build a variable expression to evalute that calculated value and format the report, it doesn't work.  Even weirder, after running the report, without doing anything else, the report refuses to validate, complaining that whatever of the hundred different variable setting expressions I've tried is invalid. 

I'm probably doing something obviously wrong but, I just can't see it.  The report is too much of a bear to spend the time reproducing in Go Sales for a look over.  Probably end up massaging my view to work around it, unless...  :)

bdybldr

Quote from: JoeBass on 27 Jan 2006 01:07:56 PM

When I try to build a variable expression to evalute that calculated value and format the report, it doesn't work.

What do you mean it doesn't work?  What kind of errors are you receiving?  You just need to work on your variable expression.  How did you define the variable?

JoeBass

By not working I mean it doesn't apply either format - its a boolean variable.

The error I get is always the same - Invalid expression.  Its funky though because at first, before the report is run, it validates without a problem.   The expression I have right now is [IsItTuesday] = 'Y'

bdybldr

I assume [IsItTuesday] is a field in your query that contains a flag of Y or N depending on the _day_of_week calculation.  If not, please explain.  In fact, post your calculation for IsItTuesday if you don't mind.

Are you using a conditional block?  This shouldn't be too difficult to figure out.

JoeBass

You are right - it was a Y / N output.  The calculation consistently gave me the response I expected but I couldn't get the conditional formatting to work so, I reworked the view that it reports from.  I wasn't using a conditional block, just using conditional style on some text items to test the workings.  Never got past it.

Thanks a lot for the help though

bdybldr

Glad to help, Joe.  Just let me know if you want to take it up again.  I've used conditional formatting at least a hundred times.  I know we can get it to work.  How did you define your conditional variable?

JoeBass

Tried it both as a string and boolean.  I'm sure I was doing something dumb.  Things are crazy here now but, I would be interested in working through it at some point.