Using 4d variable inside a query in quick report editor - 4d-database

I'm creating a 4qr quick report file, and I am wondering how I can use a variable in a query inside the quick report editor.

Double-click the column header with the field name. Then you get an editor.
Peter

First, you should disable "Filtering command" option in Security settings page of Database Settings, because the Query is not available in the usually reduced set of commands for every user (a query inside a report could change the current selection of reported table, for example)
After, in Formula Editor you can write an expression as
QUERY([Table_1];[Table_1]field1=Variable)

Related

Microsoft Access: Set a global variable on table open, use it as criteria for queries, and clear it on table close

I want to be able to ask the user for a global variable on tableopen on specific tables, use it as a criteria for sub-queries, and clear it on tableclose.
To use it in queries, I've found the getglobal SQL function which should do it fine, however I couldn't find a way to query the variable to the user on table open and clear it on table close.
Any help welcome.
There's no way to do this, as there's no way to call a function on table open. Typically, you would either put a prompt in a query to ask the user for a value when running the query, or have a form set up where the user is prompted for a value, and then open the query/report while referencing the control with the value in it.
Why would you ever let a user open a table?? This is asking for trouble. Give them a GUI, take their input and run whatever you need to run on the back end.

How do I automatically clear output in MySQL workbench?

I'm trying to find the preference settings to have the output clear every time my statement or set of statements are executed. I would prefer this option instead of right clicking and clearing the output every time I want to. I just can't find it and I'm not sure it exists as an option.
There's no such thing like auto-clearing. If you want that implemented file a feature request in the MySQL bug system (http://bugs.mysql.com).

SSRS dataset not refreshed after changing MySQL stored procedure

SSRS dataset not refreshed after changing MySQL stored procedure.
I created an SSRS report in which the dataset gets data from MySQL stored procedure. In this scenario the output is generated correctly and so is the report.
Later I modify some content in the stored procedure. I run the stored proc in query designer. In query designer it gives the correct output.
But when going to report if I see the report in preview tab it gives old values. Changed are not coming in presenting report.
Please tell me what's wrong.
Try deleting the MySolution\MyProject\MyRDL.data file -- BIDS caches fairly aggressively.
This is a bug in Visual Studio i think it happens to me as well. Usually closing the report in Visual studio and reopening helps.
the report may be cached on BIDS for a few moments.
re-open it and it should be fine
I TESTED IN VS2012
Note :
1. Go to your Report designer
2. Remember(or copy somewhere) your (A) Data Source Name and (B) Data Sets Name
Now Step 1:
In the Project Solution Explore Delete the Data Set (same name as in Note(A) Data Source Name
) Don't Worry Nothing will bad on your report :)
Step 2:
open the Report data tool of your report
Step 3:
* Select dataSet --> Right Click ----> Select DataSet Properties
* In " data source" click on NEW button---->Next---->
* Select your table/sp/views/-----> Put the Data set Name as:(Note 2. Remember your (A) Data Source Name )
Now Finish... :) now you can get your Newly added field in SP
NOTE : ONLY REMEMBER your old data source and dataset name
Thanks, enjoy ...
Regards,
SRSahoo#gmail.com
Also be sure it's the report and not you.
I switched the sorting fields in the dataset and they weren't changing in the report preview because I didn't change the Grouping.

It's possible to save report parameter wrote by user?

I have report where I ask user to write path to dir of files. This parameter have default value on start, but I want to allow user change it. From moment where he change it parameter wrote by user will be displayed as default on next render time.
Edit:
I use Buissnes Inteligence and SQL SERVER 2008r2
I don't think this can be done in SSRS alone.
What you could do would be to write a procedure to produce your report output, which accepts the directory path as a parameter and saves it to a user lookup table, before producing the report data.
You could then use a query on the user table to produce the default value for the parameter in SSRS.

Intellisense not updating in Sql Server

Given:
A table named Table1 that has the following columns:
ID
ColumnA
ColumnB
Typing Table1. in Microsoft SQL Server Management Studio provides me with a list of columns for that table.
Scenario:
I open up Table1 in the design view and add ColumnC to it. I save Table1 and refresh it to see the new column, Column3 show up in the Object Explorer.
Going back to the Query Window, I type Table1. but Column3 is not available to be selected. Typing it out gives me a syntax error but running a query with the column in it works as expected.
Is there a menu item somewhere that I need to click to get Intellisense to pick up the DDL changes I have made?
Edit -> Intellisense - Refresh Local Cache
That should do it.
Ctrl-Shift-R is the shortcut.
In addition to refreshing the cache you also need to do the following if you haven't already:
Go to Tools >> Options >> Text Editor >> Transact-SQL >> General >> IntelliSense
Check the box Auto List Members and also the box Parameter Information save and restart.
I also highly recommend the Redgate SQL Toolbox if you regularly use SQL Server. SQL Compare and SQL Data Compare and the SQL Prompt5 have saved me lots of time in development.
I have to restart management studio when this happens. Refreshing object explorer doesn't update the intellisense.