Rank: Member
Groups: Registered
Joined: 6/5/2020(UTC) Posts: 12 Thanks: 4 times
|
Hello, as shown on the picture bellow I would like to use CommonRestriction in Pre SQL statement, but whatever I do CommonValue is always set to NULL. https://pasteboard.co/Jgg9ASp.png1) I set Pre SQL statement. Restriction name as well as column name in database is c_name 2) When report is executed I set restriction to d3) SQL profiler shows that CommonRestriction is not replaced with d but with NULL. Why ? Is this a bug or am I doing something wrong ? Regards, Tomaž
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
I made a quick test and it seems to work for me (checked with the debugger), can you check the report in attachment common value.srex (4kb) downloaded 11 time(s).Edited by user Monday, July 6, 2020 8:27:32 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Member
Groups: Registered
Joined: 6/5/2020(UTC) Posts: 12 Thanks: 4 times
|
That is true, but instead of Common Restrictions and Values in Model Definition I would like to use Drop Row Element restriction (right click on column and Prompt at run time), so that restriction can be used in Sub-Reports. Is that also possible ? My scenario is that reports shows document detail and is opened from some other report. Caption of a document name is not as it is written in a database so I have to make small modification before SQL query is executed. In Pre SQL statement: Quote: insert into #tInterface(c_name, c_value) select 'c_doc_id', dbo.fGetID({CommonValue_c_doc_name})
This way Name can be changed to ID, which is later used in join In FROM Clause I would add: Quote: FROM (Table1 INNER JOIN Table2 ON Table1.c_doc_id = Table2.c_doc_id and Table2.c_doc_id in (select c_value from #tInterface where c_name = 'c_doc_id') )...
If Name is used it takes 15 seconds for query to complete, if ID is used then 0 seconds. Edited by user Monday, July 6, 2020 10:43:11 AM(UTC)
| Reason: Not specified
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.