Having fun late at night? So if your query actually does not retrieve anything at all from the data source it's hard to "fake" a row because the data set coming back is - well - empty.
What's the use case and hwo does it help you to to have a fake row of 1s?
You right Christian! this is the best moment to work without noise around me (my wife )
This issue because all project is using web services request and they use XML query.
Results looks like
when no recors result, MUST be like
It means that i have to custom result with some kind of dummy record.
let's leave aside webservices for the moment. If i can solve it here in analysis, will be solved even with WS.
Any idea Chris?
thanks for your answer, but this will not suit to the request.
Have not tested this idea, may be create a union report ?
Sherry beat me to it. A UNION would be a way to force this.
Then again you said the data source itself is a view so maybe the code in the source could already deliver you that default row. This way your front-end can be built without having to handle that exception case.
Edit: pray that your wife never reads OTN or you're dead
First of all thanks to all of you for your answers ...
What about filter? Actually view is empty and tomorrow procedure will fill it so i can't test it as i would.
In both queries should i use same prompt?
pippo pluto paperino
'0' -1 null
first query has pippo = '12345'
do i leave second query without filter?
if yes, what will appear if the first one has data filtered? maybe 2 rows?
scenario result with union:
12345 integer string
0 -1 null
Sorry I cannot try it out right now, but probably this involves a couple of set operations (MINUS, UNION) with 3 or 4 reports.
Just to be sure...
when you talk about 3 or 4 reports, you mean in the same analysis right?
is it possible to take another analysis if the first one is without datas?
would be grea!
Yes I'm talking about 3 or 4 criteria in the union (same analysis).
with union query i'll see in all cases dummy record...right?
or i'll see dummy record only when the first query is empty?
All cases. That's why said to maybe push the logic to the view itself.
a) then you dont need to build exception handling in the front-end and can just work normally
b) the heavy lifting and logic is offloaded to the source
Could it works?
create a new table on RPD and make an sql as source:
from my view
where category = @variable
where NOT EXISTS (SELECT * FROM my view where category = @variable)
what do you think?
Pretty sure some hardcore db developer could write a super nice piece of code for you there Ask your database guys or whoever has initially written the view.
But yes your code should be fine as well.