I have report deployed on a SQL Server Reporting server. It has one multivalue parameter called 'Names' as a input for stored procedure which fetch data to display the result. In URL, I am adding all values selected for multivalue parameter are concatenating with '&' character.
I need to store this URL for further uses as a bookmark in my browser which is also working fine. Problem occurs when over a time one of the values for that parameter gets missing from the database then report comes blank.
Some points I would like to clear here:
Stored procedure is working fine even if some values are missing.
I could figure out that this might be because of that value is not present in the dropdown of 'Names' so it is unable to assign it before running the stored procedure. As a solution to this problem I tried to hide this parameter from report by clearing prompt box for 'Names', but I now get
The ''Names'' parameter is missing a value
When you upload the report (.rdl) into reporting server, make sure "Name" parameter has a default value, this way the stored procedure is able to get the default value even if the link is missing the "Name" parameter
Related
I have created a report where I created one calculated column which holds the value of dynamic URL. It has ID as parameter and I want to slice the data based upon that after publishing. When I am publishing this report to powerbi.com and I am using this URL to filter out the data, it shows me all the data. The filters through URL is not working.
I just went through a blog and when publishing through query string parameter it says that it has a limitation that it doesn't work when it will be published to web. What does it mean?
Below is the calculated column:
https://app.powerbi.com/groups/ce347380-637d-4700-838f-f7b00294256c/reports/374c3b7b-18f0-46f6-b5ec-2c97cbb01611/ReportSection?filter=Append1/Append1[SIMPrjReqID] eq '"&Append1[SIMPrjReqID]&"'
where Append1 is table and SIMPrjReqID is a column on which I want to filter out the data dynamically.
Please advise!
it has a limitation that it doesn't work when it will be published to web. What does it mean?
This means that passing URL query string parameters to filter data works only when applied on the report's URL, as you see it in the browser's address bar when you open it in powerbi.com, and not on the URL that you get when you use Publish to web option to make it public:
This filter does not work, because you didn't specified the field name correctly:
?filter=Append1/Append1[SIMPrjReqID] eq '"&Append1[SIMPrjReqID]&"'
As noted in the official documentation, the filter is passed in this format URL?filter=Table/Field eq 'value', where Field is the name of the field. So your query string parameter should look like this:
?filter=Append1/SIMPrjReqID eq '"&Append1[SIMPrjReqID]&"'
I am currently working on a DB2 native stored procedure, working on logging errors. I am logging all of the errors that get raised on another table, and one of the things I am logging is what the stored procedure receives as its parameters.
On one particular stored procedure, one of the parameters is of the data type XML (IN P_FILTERS XML).. What I want to log in the error logging table is just the plaintext of the XML Document.
For example if I pass in XML that looks like this
<xml><Hello value='what is up'></Hello></xml>
I want to put
"<xml><Hello value='what is up'></Hello></xml>" as Varchar(200)
in the error logging table.
I have thouroughly researched this question and am unable to find anything.
I tried to do something like this, but couldn't get it to work
SET V_ERR_XML_TEXT = XMLCAST(XMLQUERY('$m/*'
PASSING P_FILTERS AS "m" RETURNING SEQUENCE) AS VARCHAR(200));
In my report i use 3 stored procedures. All of them are using parameters, and 2 of them work perfect and the third one is not, which i really do not understeand.
Stored procedure takes 2 parameters
SPgetData #reportnr,#username
The parameter #username is also used by the 2 other SP's
If I call in dataset Query Text then it works, but then I have to specify the parameters by hand like :
SPgetData '001','Administrator'
If I try to set Text to
SPgetData #reportNr,#username it opens the screen to enter the values by hand..
This is really very strange as 2 other procedures work perfectly with exact the same setup (As Stored Procedure with reportParameters...
This is not a limitation problem of 3 procedures or something because I tested this on a another report.rdl file and it didn't work also...
I figured this one out.
I just need to call the procedure via Text like :
SPgetData #reportNr,#Username
then when I get the screen to fill in defaults, I fill in working default values.
On the parameter tab, I attach the report parameters to the query parameters.
When I open the report, it uses the report parameters :)
I needed to create a input mask for a jQuery datepicker in my Rails app, where the first form field uses m/d/yy format and the datepicker populates a hidden input with the proper database format.
I was using SimpleForm, and so I extended my own input so that the input is preceded by the mask.
I got everything set up and when checking out the browser, it all just worked well before I thought I would be done.
The form ends up with two inputs for the same attribute, each with the same id and name. I never thought this would work. Checking the development log I only see one date getting submitted, the second of the two which is the one that has the proper format for the database.
Is this all okay? Should I take some extra steps even though this appears to work fine, and more importantly, can someone explain what's going on under the hood that results in this behavior?
Thanks!!
Rails uses the Hash params to store fields submitted. When you declare two or more inputs using the same name, it happens the same as if you do something like
h=Hash.new
h[:name]="foo"
h[:name]="bar"
Result is bar because the foo was overwritten. So the "winner" is always the field value which the browser last appended to postdata.
But if I where you, I would not rely on the browser that the second field gets appended at last.
I am having issues trying to override the value of a form field after submission. Currently the form includes a textarea and file upload input, but only one is used. If the user uploads a file it is parsed into text. I want to use the data that is parsed from the file as the value for the textare when the page reloads, rather than what was in the text box (empty). The content can not be determined until after the bind.
What I did was just bind the data again to manually set the value of the textarea after the document was parse. It works great if I hard code a value for the value, however when I use the full contents of the file, nothing is put in the textarea. There isn't some sort of length limit or something that could interfere with the population is there? I have tried short strings and they work fine, but these files are about 4k in length and won't populate in the text area.
Works
$this->form->bind(array('text'=>'1234'), $request->getFiles('profile_generate') );
Does not work, even though the value text is actually being set.
$this->form->bind(array('text'=>$largeString), $request->getFiles('profile_generate') );
FIX:
I suppose whatever function that Symfony uses to populate the fields from the bind() values has a problem with non-standard characters. Unfortunately it does not complain about it or let on to what the issue really is. After cleaning up the data, it worked fine.
$largeString = preg_replace('/[^(\x20-\x7F)\x0A]+/',' ', $largeString);
$this->form->bind(array('text'=>$largeString), $request->getFiles('profile_generate') );