Sql And Report Builder
Hi To All,
I Have a Little Problem Whit a my Query created in Report Builder 6i.
this is a Query :
select c.id rv_cashreg_id,
m.code rv_cod_shop,
m.description rv_desc_shop,
c.code rv_cod_cassa,
c.description rv_desc_cassa,
nvl(sum(decode(a.type,0,
(case when a.id in (select distinct art_difference_id from tb_lunchbon_articles) then 0
when a.id in (select distinct amount_art_id from tb_conventions) then 0
when a.id in (select distinct art_revaluation_id from tb_lunchbon_articles) then 0
when a.id in (select distinct article_id from tb_cashreg_auto_articles where calculation_type = 6) then 0
else d.price end),2,d.price,3,d.price,0)),0) rv_cifra_affari_lorda,
nvl(sum(case when a.type = 1 then d.price
when a.id in (select distinct art_difference_id from tb_lunchbon_articles) then d.price
when a.id in (select distinct amount_art_id from tb_conventions) then d.price
when a.id in (select distinct art_revaluation_id from tb_lunchbon_articles) then d.price
when a.id in (select distinct article_id from tb_cashreg_auto_articles
where calculation_type = 6) then d.price else 0 end),0) rv_sconti,
nvl(sum(decode(a.type,2,d.price,3,d.price,0)),0) rv_mance,
nvl(sum(decode(a.type,4,d.price,0)),0) rv_servizio,
nvl(tavap.tavoli_aperti,0) TavoliAperti
from (Select ch.cashreg_id cid, nvl(sum(th.subtotal),0) tavoli_aperti
from tb_cashreg_halls ch, tb_tables ta, su_table_headers th
where ch.hall_id = ta.hall_id
and ta.id = th.table_id (+)
and nvl(th.transaction_closed,0) <> 1
group by ch.cashreg_id) tavap,
tb_transactions t, tb_trans_articles d, tb_articles a,
tb_shops m, tb_cashregs c, tb_operators o
where d.transaction_id = t.id
and d.article_id = a.id
and c.id = t.cashreg_id
and c.shop_id = m.id
and o.id = t.operator_id
and t.delete_operator_id is null
and d.delete_operator_id is null
and c.id = tavap.cid (+)
and (t.cashreg_id = :P_PROGRCASSA or :P_PROGRCASSA is null)
and (t.shop_id = :P_PROGRMENSA or :P_PROGRMENSA is null)
and (t.operator_id = :P_PROGROPERATORE or :P_PROGROPERATORE is null)
&P_SEL_DATA
group by m.code, m.description, c.id, c.code, c.description, nvl(tavap.tavoli_aperti,0)
order by m.code, m.description, c.id, c.code, c.description
my problem is able to achieve a result unique, and not individual.
How help me!!!!
and (t.operator_id = :P_PROGROPERATORE or :P_PROGROPERATORE is null)
P_SEL_DATA varchar2(1000);
begin
P_SEL_DATA :=
'and t.trans_date between
to_date('''||&P_DATADA||' '||&P_OREDA||''', ''dd.mm.yyyy hh24:mi'')
and
to_date('''||&P_DATAA ||' '||&P_OREA ||''', ''dd.mm.yyyy hh24:mi'')';
dbms_output.put_line(chr(0));
dbms_output.put_line(rpad('-',80,'-'));
dbms_output.put_line(p_sel_data);
end;
group by m.code, m.description, c.id, c.code, c.description, nvl(tavap.tavoli_aperti,0)
order by m.code, m.description, c.id, c.code, c.description
Ouch !!
That's like playing heavy metal in the Le Nozze di Figaro... ;)
I don't really know how this Report Builder builds reports, but try this -
SELECT c.Id rv_Cashreg_Id,
m.Code rv_Cod_Shop,
m.Description rv_desc_Shop,
c.Code rv_Cod_cAssa,
c.Description rv_desc_cAssa,
Nvl(SUM(DECODE(a.TYPE,0,(CASE
WHEN a.Id IN (SELECT DISTINCT Art_Difference_Id
FROM Tb_LunchbOn_Articles) THEN 0
WHEN a.Id IN (SELECT DISTINCT Amount_Art_Id
FROM Tb_Conventions) THEN 0
WHEN a.Id IN (SELECT DISTINCT Art_RevaluAtIon_Id
FROM Tb_LunchbOn_Articles) THEN 0
WHEN a.Id IN (SELECT DISTINCT Article_Id
FROM Tb_Cashreg_Auto_Articles
WHERE Calculation_Type = 6) THEN 0
ELSE d.Price
END),
2,d.Price,
3,d.Price,
0)),0) rv_cIfra_afFari_Lorda,
Nvl(SUM(CASE
WHEN a.TYPE = 1 THEN d.Price
WHEN a.Id IN (SELECT DISTINCT Art_Difference_Id
FROM Tb_LunchbOn_Articles) THEN d.Price
WHEN a.Id IN (SELECT DISTINCT Amount_Art_Id
FROM Tb_Conventions) THEN d.Price
WHEN a.Id IN (SELECT DISTINCT Art_RevaluAtIon_Id
FROM Tb_LunchbOn_Articles) THEN d.Price
WHEN a.Id IN (SELECT DISTINCT Article_Id
FROM Tb_Cashreg_Auto_Articles
WHERE Calculation_Type = 6) THEN d.Price
ELSE 0
END),0) rv_sConti,
Nvl(SUM(DECODE(a.TYPE,2,d.Price,
3,d.Price,
0)),0) rv_Mance,
Nvl(SUM(DECODE(a.TYPE,4,d.Price,
0)),0) rv_servizio,
Nvl(tavap.tavoli_Aperti,0) tavoliAperti
FROM (SELECT ch.Cashreg_Id cId,
Nvl(SUM(th.SubTotal),0) tavoli_Aperti
FROM Tb_Cashreg_Halls ch,
Tb_Tables ta,
su_Table_Headers th
WHERE ch.Hall_Id = ta.Hall_Id
AND ta.Id = th.Table_Id (+)
AND Nvl(th.Transaction_Closed,0) <> 1
GROUP BY ch.Cashreg_Id) tavap,
Tb_Transactions t,
Tb_tRans_Articles d,
Tb_Articles a,
Tb_Shops m,
Tb_Cashregs c,
Tb_Operators o
WHERE d.Transaction_Id = t.Id
AND d.Article_Id = a.Id
AND c.Id = t.Cashreg_Id
AND c.Shop_Id = m.Id
AND o.Id = t.Operator_Id
AND t.Delete_Operator_Id IS NULL
AND d.Delete_Operator_Id IS NULL
AND c.Id = tavap.cId (+)
AND (t.Cashreg_Id = :P_PROGRCASSA
OR :P_PROGRCASSA IS NULL )
AND (t.Shop_Id = :P_PROGRMENSA
OR :P_PROGRMENSA IS NULL )
AND (t.Operator_Id = :P_PROGROPERATORE
OR :P_PROGROPERATORE IS NULL )
AND t.trans_date BETWEEN TO_DATE(:P_DATADA||' ' ||:P_OREDA,'dd.mm.yyyy hh24:mi')
AND TO_DATE(:P_DATAA ||' ' ||:P_OREA,'dd.mm.yyyy hh24:mi')
GROUP BY m.Code,
m.Description,
c.Id,
c.Code,
c.Description,
Nvl(tavap.tavoli_Aperti,0)
ORDER BY m.Code,
m.Description,
c.Id,
c.Code,
c.Description;And, you seriously need to brush up your concepts of SQL, PL/SQL, anonymous PL/SQL blocks and the differences amongst them all.
HTH
isotope
Similar Messages
-
Having Problems with connections and access. I have spent the last 2 days reading various threads regarding SQL Reporting Services pertaining to access and connections.
First, let me explain what I have done to date.
1) I am using Windows 7 - Home Premium.
2) I downloaded and installed MS SQL Server 2008 R2 Express. This was successful.
3) I downloaded Report Server 3.0 - This was successful.
4) In IE, I tried logging onto http://servername/reports, but this failed. After logging into IE
via ' Run Administrator', I was able to access URL.
Next, I updated the security / trust sites as explained in the
threads
Next, I went to Folder Setting and added my user name and granted all roles (Browser,
Content Manager, My
Reports, Publisher and Report Builder).
5) Now, I can log into Http://servername/reports using my normal windows 7 user account.
6) Next, I opened Report Builder 3.0. However, I am having trouble connecting to report
server. I tried connecting with
http://servername/reports, but this failed.
However, If I change URL to http://servername/reportserver, it works. BUT NOW, I have
another problem. When I
execute the RUN button to create report, I get a permission
error. "PERMISSION GRANTED TO USER ARE
INSUFFICIENT FOR PERFORMING THIS OPERATION".
7) Finally, I can not save reports to http://servername/reportserver when I select "Recent
Site and Servers". ERROR
MESSAGE: UNABLE TO OPEN OR SAVE REPORT
8) In my Reporting Services Configuration Manager:
Web URL = http://servername:80/ReportServer
Report Manager URL = http://servername:80/reports.
What is strange, the Report Manager URL works for IE URL and WEB URL works for
Report Builder connect (Even though it really does not work).
THREE QUESTIONS:
1) What URL should I use to connect in Report Builder.
2) How do I update my normal Windows 7 user so I can run reports when I connect to report
builder.
3) How can I save my reports so they are displayed in IE Reporting services. Note: I was
able to save report to
documents folder and import into IE Reporting Services.
4) And finally, is it possible to add report builder 3.0 as a tab in my IE Reporting Services. I
save seen samples of Reporting Services screens where the instructor has Report Builder
tab.
Thanks
DanTo answer question 1... it should connect through /ReportServer
http://bretstateham.com/reporting-services-architecture-diagram%E2%80%A6/
Report Builder 3.0 is not a web application, it is a client side application can be used using the click-once or downloaded from Microsoft's website. If you are having issues, you might download and install it and try running it as an administrator. -
Query a dataset in MS SQL Server Report Builder and get splitted output of one of the fields
Hi experts,
I have a dataset in MS SQL Server Report Builder containing some rows like the following:
FIELD-1
FIELD-2
FIELD-3
1
efgh
xjhg[R]ztazutsuz[R]9
2
abcd
1234[R]abcd[R]5678
What I need is:
FIELD-1
FIELD-2
FIELD-3
1
efgh
xjhg
1
efgh
ztazutsuz
1
efgh
9
2
abcd
1234
2
abcd
abcd
2
abcd
5678
Can this be done?
I'll be very happy when one finds a solution.
Kind regards,
Petertry like this..
Declare @ta table ([FIELD-1] int, [FIELD-2] nvarchar(100), [FIELD-3] nvarchar(100))
insert into @ta
select 1, 'efgh', 'xjhg[R]ztazutsuz[R]9' union all
select 2, 'abcd', '1234[R]abcd[R]5678'
select t.[FIELD-1],t.[FIELD-2], a.b.value('.','nvarchar(100)') as [FIELD-3] from @ta t
Cross apply
(select cast('<R><C>' + replace(t.[FIELD-3],'[R]','</C><C>')+ '</C></R>' as xml) as XStr ) x
Cross apply x.xstr.nodes('R/C')a(b)
Thanks,
Saurabh
http://www.linkedin.com/in/sbhadauria http://www.experts-exchange.com/M_6313078.html -
Adding parameter to a MySQL query in MS SQL Server Report Builder
So I have a MySQL DB connected to MS SQL Server Report Builder via ODBC connector. Everything is fine, I can execute queries and put the fields into report.
But I can't add an parameter to the query.
Example query:
SELECT column1, column2 FROM table WHERE column3 = (@parameter1)
The result set is just empty. I think the problem is that I'm using MySQL and not MS SQL. Any suggestion?Hello Alan,
Named parameters like @param works with SQL Server / .NET data provider, but not for OleDB, here you have to use the question mark instead
SELECT column1, column2
FROM table
WHERE column3 = ? and column9 = ?
When you assign the report parameter to query parameter you have to take care about the order of used ? in query
Olaf Helper
[ Blog] [ Xing] [ MVP] -
Migrate VS SSDT Reporting Project to SQL Server Report Builder?
In the past, I have developed SSRS reports using Visual Studio (BIDS/SSDT). Unfortunately, a company server migration has made it impossible for me to deploy my reporting projects using that devlopment environment, so it appears I have to resort to Report
Builder now.
I see that the SQL Server Reporting Services web app has an "Upload File" menu item. However, it's not clear to me how these would then be translated into a Report Builder project. I've heard that the SSRS project-building
capabilities of Visual Studio go considerably beynd those of the Report Builder in SQL Server.
What I'd like to know is: Can I develop a Reporting Services project in Visual Studio and then migrate it to Report Builder via upload? If so, what are the steps to accomplish this, and what, if any, are the drawbacks?
- Mark Z.Hi Mark Zudeck,
As per my understanding, you developed SSRS reports with report designer, now you could not deploy the reports to report manager, and you want to open the projects with report builder. If that is the case, please refer to the following steps:
On the Start menu, click All Programs, and then click Microsoft SQL Server Report Builder.
To create a new report, click the SQL Server icon in the upper left-hand corner of Report Builder, and then click New.
To open an existing report stored on your local machine or a report server, click the SQL Server icon in the upper left-hand corner, and then click Open.
If you don’t see the report server in the list of existing servers, close the Open Report dialog box and then click Connect at the bottom of Report Builder to connect to the server.
For detail information about Report Builder, please refer to the following document:
https://msdn.microsoft.com/en-us/library/ms159221.aspx
If you have any more questions, please feel free to ask.
Thanks,
Wendy Fu
If you have any feedback on our support, please click
here.
Wendy Fu
TechNet Community Support -
SCCM 2012 SQL Server Report Builder Error
I am trying to create a report with SQL query on SCCM 2012. I get the below error.
TITLE: Microsoft SQL Server Report Builder
An error occurred while executing the query.
The SELECT permission was denied on the object 'v_GS_OPERATING_SYSTEM', database 'CM_C01', schema 'dbo'.
ADDITIONAL INFORMATION:
The SELECT permission was denied on the object 'v_GS_OPERATING_SYSTEM', database 'CM_C01', schema 'dbo'. (Microsoft SQL Server, Error: 229)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.3000&EvtSrc=MSSQLServer&EvtID=229&LinkId=20476
BUTTONS:
OKDoes your account have accesses within SQL? Bases on the error message I'm guessing not.
Garth Jones | My blogs: Enhansoft and
Old Blog site | Twitter:
@GarthMJ -
SQL Server Report Builder Numeric Field Formatting
I am creating Reports in SQL Server Report builder.
When I set format of any number fields, in design it is displaying sample value.
For e.g. If I set format 0.00 to one numeric field, it started to display 12345.00
I have 10-12 fields in design, it caused very much confusion.
Is there any solution to change this?
When I open report in Visual Studio, it doesn't display like that.
Check Following screenshots:
In Report Builder:
In Visual Studio:Hi Harsh10,
If I understand correctly, there are two placeholders in each textbox in the report. You want the second placeholder which contains numeric field to format as 0.00. If in this scenario, we can refer to the following steps:
Right-click the second placeholder which contains numeric field in each textbox to open the Placeholder Properties dialog box.
Click Number in the left pane.
Select Number with Decimal places ‘2’ in the Category drop-down list.
Reference:
Formatting Text and Placeholders (Report Builder and SSRS)
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Open source user friendly SQL Qyery+Report Builder
hi guys
Please help me find any link from where i can download OpenSource user friendly SQL Qyery+Report Builder
thanksOne would hope it was!
it is not possible to give everything that the OP may request. The closest match, now that is workable. -
Install Forms and Reports builder 11g without WebLogic Server
Hello Everybody,
Presently to install Forms and Reports builder 11g on a PC for developers, we need to install WebLogic Server prior to that.
For this, we need lot of resources. Hardware, to download big software bundles, memory resources, etc...
If we have a solution like *"Forms and Reports builder 11g and its tools as stand-alone distribution from Fusion Middleware technologies"* ........ no words from me.
Do you have a solution to install Forms and Reports Builder 11g without WebLogic Server?
Regards
murali krishnahi
check out the following link.
Forms/Reports 11g Builder without WebLogic
sarah -
How to Custom Report using sql server report builder for SCCM 2012 SP1
Hi ,
I am new to database, if i want to create a manual report using sql server report builder for SCCM 2012 SP1, what step should i take.
i want to create a report in which computer name, total disk space, physical disk serial no come together. i already added class (physical disk serial no.) in hardware inventory classes. refer snapshotHi,
Here is a guide on how to create custom reports in Configuration Manager 2012, it is a great place to start, change to the data you want to display instead.
http://sccmgeekdiary.wordpress.com/2012/10/29/sccm-2012-reporting-for-dummies-creating-your-own-ssrs-reports/
Regards,
Jörgen
-- My System Center blog ccmexec.com -- Twitter
@ccmexec -
ApplicationIntent and Report Builder
I have a SQL Server 2012 AlwaysOn AG setup including the read-only intent for a secondary. I setup a data source to point to the Listener with the data source type of Microsoft SQL Server entry to include ApplicationIntent=ReadOnly. The Test connection was
successful. When I created a new report and added a dataset using that datasource and asks for data source credentials, I specify use the current windows user. I get the error "Unable to connect to data source" with Details - "Keynword not supported:
'applicationintent'.
I see that there was a fix for .NET but that seems to apply to XP and 2008R2.
What wrong?
I should also mention that I am using Report Builder 3.0 that I had used for 2008 R2 reports. I see that there seems to be a 2012 Report Builder version (I can't find where the version of Report Builder is indicated?). Is that the problem? Can this version
be used for 2008 R2 reports - backward compatible?I am running the 2012 version of Report Builder 3.0. My build is 11.0.2100.60 (installed several months ago). You can find this by opening the filesystem location where MSReportBuilder.exe resides, right-click MSReportBuilder.exe, choose properties, Select
Details. The File and Product versions are there.
I don't have a similar SQL server setup to test against so I can't answer the initial question but it won't hurt to install the latest report builder anyway. Then try it again and see what happens. Good luck.
"You will find a fortune, though it will not be the one you seek." -
Blind Seer, O Brother Where Art Thou
Please Mark posts as answers or helpful so that others may find the fortune they seek. -
Report Service And Report Builder Issue
SQL SERVE 2012
In our web site project we use ReportingService2010 Methods to show and operate folder and report which stored in Report Service, in our project configuration file, we use windows authentication mode for Report Service.
In requirement
User can show and operate folder “A” and folder “B” (we can create and delete report or folder) in web site.
User can’t use “Report Builder” to save reports which created by Report Builder to folder “B”, Reports which created by Report Builder only can be saved in folder “A”.
[User click “Report Builder” button in our web page to start Report Builder, use
“Report Builder” to create report, if user want to save report, we need to hidden folder “B” in “Report Builder” or we need to remove some operate right from folder “B”.]
We have no solution for this requirement, could you help us?Thank you for your replay, but I don't understand it very clearly.
Please check the first requirement:
User can show and operate folder “A” and folder “B” (we can create and delete report or folder) in web site.
For example, I login my PC with account "lfang", in report server, we grand "Browse" permission on both folder and grand only "Publish" permissions for folder "A", report builder can't save report into folder "B",
it's correct.
But our web site has create report function, that means in our web site we want to create report for both folder "A" and "B", that is the issue, if we don't give "Publish" permissions to folder
"B", we can't create report in our web site.
Is there any method to run "report builder" use specified account? then we can only give folder "A" "Publish" permissions with specified account. -
SharePoint 2010 & SQL Server Report Builder 3.0 - HTTP 404 Error
Hi all,
Apologies if this post is not in the correct forum.
I have recently upgraded my SQL installation on my SharePoint server from Express 2008 R2 to Standard 2008 R2 so I could set up Reporting Services Integration in CA. Followed instructions I found on web and all appeared to be good.
Installed Report Builder on my PC and set up a data source to a List I have on one of my site collections - "Test Connection" works fine. If I then try to create a Dataset using Query Designer, I get the error below -
"An error occurred when accessing the specified SharePoint list. The connection string might not be valid. Verify that the connection string is correct - The request failed with HTTP status 404: Not Found. (System.Web.Services)".
I can't even get to a point where I can see any fields from my list.
I am happy to provide any further information to try and clarify my problem. Any help would be most appreciated!Just an update. I resolved my issue. The problem appeared to that when creating the Data Source, I had been adding the URL of the actual list (eg. http://servername/sitename/listname) as the connection string where in fact I should have just
added the server name and site - eg. http://servername/sitename.
Hopefully this may help somebody else :-) -
Hi, I am trying to run PL/SQL function in the Formula Column. This PL/SQL function will run a query and return the records into the report. Here is the PL/SQL function (called Test).
function TestFormula return varChar2 is
stuName varchar2(40);
cursor c1 is
select all stumst.stu_name
from stumst;
begin
open c1;
LOOP
fetch c1 into stuName;
EXIT WHEN c1%NOTFOUND;
--> dbms_output.put_line(stuName);
end loop;
return stuName;
close c1;
end;
What I trying to do in this PL/SQL function is to output all the records of the STUMST.STU_NAME. But the result I get from this PL/SQL function is the last record in the table. How do I display all the records in the STUMST.STU_NAME inside the loop.
P/S: I notice that the line (pointed with "-->") does not work. What is the correct statement to output the record within the loop?
Thank you.This is completely the wrongapproach. Report Builder allows us to build reports composed of interconnected SELECT statements: that is want it is supposed to do. There is no need for PL/SQL blocks like this.
If you are actually intending to do something more complicated than the example you've shown you should explain what it is you want to achieve and maybe we can help.
DBMS_OUTPUT is only for displaying records to the screen. If you want to return a result set you need to use a REF CURSOR. However, my experience with Reports Builder is too old to tell you whether it plays nicely with cursor variables.
Finally, you may be interested to know there is Reports.
Cheers, APC -
SQL 2012 Report Builder + UAG
Quick description of setup: I have 4 total SharePoint servers, 2WFE's, 2APP's, and a SQL Cluster. I am using SQL 2012, + I have installed the reporting services add-in for SQL 2012 and have gone through the entire setup. Everything works,
KCD, stored credentials, I am able to create reports within report builder, launch report builder and so on... When I publish the site using UAG, report builder fails to connect to the report server, in this case either of the WFE's in the farm. I thought
initially it was "body parsing" since looking at the diagnostic logs I noticed that the request coming in looked as if the /_vti_bin/ReportServer/ portion was missing and all I saw was "sitename.something.local:443/ReportService2010.asmx". I added some
entries to skip body parsing and that didnt seem to work at all.
Running FIDDLER - I noticed that when I launch report builder, there is a 302 redirect to the main trunk, or the trunk to which the site is published on. I see a bunch of 302's, and it just stops.. never connects. When I try to connect from within
report builder, I get an error saying "cannot connect to https://sitename.fqdn" make sure the url is correct and or you have permissions.
It seems to me that report builder does not work through UAG. Can anyone suggest a fix?Hello,
I have a same issue, after search, they are saying to make delegation if you are using Kerberos but it didn't work either, so is there any configuration needed.
Regards,
Maybe you are looking for
-
How do I put an "arrow" in a movie?
Pretty simple question - I should know this. I just want to draw a simple arrow in over a clip to direct the viewers attention to an object. But I forget how! And can't seem to figure it out? Just a simple arrow to point to something - using Comic Sa
-
APSDAEMON.EXE w/message that MSVCR80.DLL is missing
iTune will not open and I receive a message about APSDAEMON.EXE and the message states that MSVCR80.DLL is missing. Any ideas how to rectify?
-
How to implement a multi lingual clause?
I need to implement a multi lingual clause, how can I do that?
-
TCode to find the list of Leads "ations for whcih orders arenot created
HI SAP CRM Experts, Could you please provide me transaction code(s) in CRM when I want to download list of all leads, opportunities and quotations from which the sales orders havenu2019t been created yet? or How can i achieve this ? Thanks in advance
-
Streaming server 3.5.1 no script works except main.far (VOD)
we own multiple FMS servers, interactive and now we installed a few Streaming servers. during the install process we provide the license key for the Stream server's we got from the adobe representatives in our country, and all seems well until we try