cancel
Showing results for 
Search instead for 
Did you mean: 

Two queries with same custom script, one works the other won't validate

NPilypaitis
Explorer
0 Kudos
282

Hey guys, hope someone can help me out with this because I'm starting to tear my hair out over it.

I built a query for a report with the SAP BI Webi in a chrome bowser, and I needed to add some custom script. To do so I added the fields that I wanted to add custom filters on and set them to be prompts with descriptive names so that I would remember the custom SQL I used;

Then I opened the View Script and toggled it to Use custom and subbed in the following over the prompt;

dbo.Data.Date >= DateAdd(month, -2, DateAdd(day, -DAY(GetDate())+1, GetDate()))
AND dbo.Data.Date <= DateAdd(day, -DAY(GetDate()), GetDate())

This works and brings back the previous two months of data no matter when in the current month that I run the report.

I needed to implement this same logic in another report so I did the same steps as before, but when I click the validate script or save buttons, the application just spins and never completes the validation or save.

I've tried making the query from scratch a few times and it will not let me either.

Anyone got any ideas what I need to do to be able to write over the generated SQL with my own, I don't think anything about my permissions would have changed.

0 Kudos

Hi,

Have you tried save as .. It will create a copy of exisiting report and it can be modified if requried.

Thanks

NPilypaitis
Explorer
0 Kudos

Is this a bug perhaps, and not somthing that I'm doing wrong?

NPilypaitis
Explorer
0 Kudos

I did try that, unfortunately I need to make a few other changes to the filed that get pulled in and the filters and that causes the script to revert back to the system generated script. Then it will not re-take the custom script.

0 Kudos

1. May be it's a prompt issue, Don't take any thing in prompts or filters . If filters are required write where class condition in SQL script.

2. Make sure no of columns in script and results objects are same including datatype's

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

amitrathi239
Active Contributor
0 Kudos

Try in some other brwoser. IE or Edge.Also you can try in Applet mode.