Query SQL database with Crystal
I have a crystal report that is a production work order from our ERP system Macola ES. The user enters the work order in Macola then prints it. The user will input a work order number and the report will populate multiple fields from that work order. To be specific I am trying to add a field on the report that will display the most recently entered batch number for the item number that is in the work order.
item_no = Field 7 in the report
The t-sql below above achieves what I would like to display on the report when searching the database. The text after /* and before */ are my comments.
/* Search for the most recent order entered in the ppordfil_sql database
where the item number equals Field7 */
select top 1
cus_name /* Batch number field */
from dbo.ppordfil_sql
where ppordfil_sql.item_no = "Crystal Report Field 7"
order by entered_dt desc
Yes Macola is partner of ours. However, they are not going to write the Crystal Report for us. The question I am asking is how I can query an SQL database to display and create a query of the SQL data in my report. I know how to write the t-sql as shown above. The field "Crystal Report Field 7" is the field I would like to base my query off. I was hoping someone could point me in the right direction with using a combination of a command object and a parameter.
Similar Messages
-
Do you guys know how can I query SQL database select records and input them to XSL file?
Let me know this is urgent.Is there an efficient way of doing this, rather than
hardcoding all the less than,greater than lines?Sounds like you need to read this:
http://java.sun.com/webservices/docs/1.1/tutorial/doc/index.html -
How to connect sql database with Flash
Dear Friends,
Iam working on a quessinarie (assesment) for elearning software. i want to connect sql database with flash and save my records in back end like add, delete, modification of student result and details.
Kindly help me to connect the sql database. or dot net server. I know how to connect PHP and mysql. But my client dont want php. only sql database and do the add, del, modificaiton.
Thanks in advance,
Syed Abdul Rahimunfortunately no, i do not know ASP well enough to give any code advice, other than the basic concept: make a request on a server-side script (such as ASP) via URLLoader - the script receives variable values (if required), runs the DB queries you wish to invoke, and 'returns' the results - pick them up in the URLVariables class via the event handler in Flash and assign them to local properties if needed, etc.
there are quite a few threads that you could find more specific information on the ASP side, here and elsewhere around the net. -
Cannot create SQL database with free trial subscription
Hello,
I get the error message 'The operation is not supported for your subscription offer type.' when trying to create a sql database with my free trial subscription.
Regards
JulianHi Julian,
It should be allowed, please provide steps that you used and ran into this issue. alternatively try these details
step by step instructions to get started.
Hope this helps
Please mark as answered if it helped
Vishal Narayan Saxena http://twitter.com/vishalishere http://www.ogleogle.com/vishal/ -
Query distributed database with different character sets.
Hello experts, this is my situation:
I have two databases A and B, the same version 11.1.0.7, the same OS Suse Linux Enterprise 10 but with different character sets, A has WE8MSWIN1252 while B has AL32UTF8. The database B is my XML DB repository so there I have some XML type tables. I need to query this tables from the database A using a dblink and in fact I have done that but the XML content is trasformed due to the different character sets between the databases. Some time there are data loss and some time there are data missmatch.
Is there any way to query the tables stored in the database B without problems? I do not know if the following is correct: Maybe I can set the character set for the session in the database A during the time it query the database B. That is, change the character set in fly at session level.
Do you have any special suggestion?
I hope you can help me, thank you in advance.The Globalization Support Guide for 11.1.0.7 has a chapter on character set migration that should be helpful. AL32UTF8 is a superset of WE8MSWIN1252 but it is not a strict superset. That is, it doesn't meet the second prong of the test in the documentation
The new character set is a strict superset of the current character set if:
Each and every character in the current character set is available in the new character set.
Each and every character in the current character set has the same code point value in the new character set. For example, many character sets are strict supersets of US7ASCII.Exporting the data from the A, changing the character set (or creating a new database with the AL32UTF8 character set), and then importing the data may be the easiest approach in your case.
Justin
Edited by: Justin Cave on Jan 13, 2011 12:08 PM -
BSP to query Sql database?
Just curious to find out if this is an option..
We web AS 6.40, can we write in ABAP to query data from a SQL database?
Thanks in advance..
VinceYes.
if you can eloborate little more on what you are trying to do, we can be helpful.
Regards
Raja -
Query SQL datastore with XML where clause source
Hope I am in the right place. New to Bus Obj Data Services Designer....I have cerated xml schemas, added it to the page as an xml source in. Mapped a test xml file and all is well there. I have added a query that grabs the xml.
I need to then query the MS SQL datastore ans use the data form the xml query as the where clause. How is this done? Or do I put a query on the datastore for all the data in a table then do anotehr query filtering one with the other? seems like that would be rather heavy and low performance. The results will then be sent back out as xml (schema and test file already set up as an xml out)
Thanks!Thanks for the tips.
I'm trying to implement this option, using your ViewDefHelper.
I´m running into a problem though. After I create my dynamic View Object using a ViewDef, I need to create some view links.
So I get the AttributeDefs of the columns (source, and destination) from the method findAttributeDef (which is the whole purpose of performance in my post). This method is returning the correct Attribute Def, but when I create the view Link with the method createViewLinkBetweenViewObjects(java.lang.String vlName,
java.lang.String accessorName,
ViewObject master,
AttributeDef[] srcAttrs,
ViewObject detail,
AttributeDef[] destAttrs,
java.lang.String assocClause)
My destination query is generating the where clause as:
null = ?
Any Ideas what I'm doing wrong ?
Thanks again.
John. -
I can create SQL Database with Xcode ??
is can posible create a Database with SQL in Xcode ?
-RaulIf you mean, is there some tool integrated into Xcode that will create a database, then the answer is "not that I know of".
Firstly, there are a number of "SQL" databases - e.g. MySQL - and they don't all have the same "flavour" of the SQL syntax. Sure, the basics are there (depending on which 'standard' they confirm to), but usually you want to create a database that has all of the views, indexes, etc. that are as optimised as possible - and that typically means using the additional keywords of the brand of SQL you are using.
Secondly, I an guessing that you are thinking of the Visual Studio capability of creating an MS-SQL database via the 'GUI' interface they provide.
However, there is nothing to stop you from accessing any type of SQL database from your code. I've quite successfully created and then accessed a MySQL database from code that I've written within Xcode. But you have to do all of the work!!!
If I've not understood your question, then perhaps others will correct me, or you can come back with something more.
Susan -
Here is my problem. I get a database error with I try to use the phone services on our 7960 phones. I've been able to replicate this problem at my desk but now even if I delete the user profile and phone from CCM and create a new profile with a different extension number, I still have the same missed/received calls. That leads me to think that the phone itself is tied to the SQL database. If that is the case, would there be a way to go into SQL and just delete this phone?
Actually, I've resolved the problem. The issue was that our SQL database wasn't being updated. We are using a 3rd party application for Long Distance calls and for some reason the link between SQL and CCM was broken and the script wasn't running. This is why when we created new extensions in CCM, they were not implimented in the SQL database and we had a Database error under the services on the phones. But thanks for the info.
-
Load image from SQL database with ASP?
Hello,
Does anyone know a tutorial where you can load an image from
a SQL database ?
I would like to show this image in Flash, but i don't know
how to load in from a SQL database using ASP.
Regards,
MichealFlash cannot load images from an SQL database.
Flash can load JPEG, PNG, GIF, SWF, MP3, and FLV files.
An SQL database can be used to store the file names and their
location. ASP can retrieve that data from the SQL and return to
Flash to load the above file formats.
For Flash to do the communication with ASP you need to
determine if you are using URL Encoded or XML data structures.
For URL Encoded data you look at
LoadVars.sendAndLoad
For XML Encoded data you look at
XML.sendAndLoad
Then in their onLoad methods you use
MovieClip.loadMovie
to load JPEG, GIF, PNG and SWF;
Sound.loadSound
for MP3,
NetConnection.connect,
Video.attachVideo and NetStream.play for FLV.
For the ASP side the work with the database has nothing to do
with Flash other than using any search variable sent from Flash
with LoadVars.sendAndLoad or XML.sendAndLoad. In other words it
could be an HTML form sending the same variable and calling the
same ASP script. Same with returning values except with Flash only
URL Encoded or XML data structures are sent back and not
HTML. -
Accessing MS SQL database with two Windows accounts simultaneously
Hello,
I have ASP.NET web application started under PC\UserName account, and Windows Service Application that runs under Local System Account (NT\System). Both applications should access MS SQL database simultaneously. They are using same connection string:
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|\mydb.mdf;Initial Catalog=mydb;User=MyUser;Password=MyPassword;" providerName="System.Data.SqlClient"
/>
The problem occurrs every time when second app tries to fetch data from database. So, app which connects first can fetch data normally, but the other one gets "Login for
MyUser failed" exception every time.
Everything works as expected when i start windows service app under PC\UserName credentials. But the problem is that i have to do that login every time manually, and when User changes password I have to change it in service settings also.
Does anyone know how to solve this problem?
Thanks,
Mladenadd name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|\mydb.mdf;Initial Catalog=mydb;User=MyUser;Password=MyPassword;" providerName="System.Data.SqlClient"
Hello Mladen,
You are using a User Instance
of SQL Server and when the first app start this user instance with the MDF in exclusive Access; no other can use this MDF = Single User mode.
Better attach the database file as a regular database, then you can use several connections to access the database.
Olaf Helper
[ Blog] [ Xing] [ MVP] -
Integration of SQL database with XI
Dear All,
I have a req in that I have to connect to SQL Server database to XI system then from XI to ECC.
To do this what are Connection should done from DatabaseXI-ECC.
I have JDBC adapter in XI.Do I need install again in XI .
how we will connect SQL Database to XI system?
Regards
ManishHi Manish,
Your scenario like this
JDBC->XI->ECC(RFC/PROXY/IDOC).
Download the following JDBC Driver. Once you deploy this driver you would be able to connect to SQL Server .
http://www.microsoft.com/downloads/details.aspx?familyid=6d483869-816a-44cb-9787-a866235efc7c&displaylang=en
Drivers Instalation Process
http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70ffd890-0201-0010-708f-d5dad2dfcf3a
Jdbc Channel Configuaration
JDBC Diver:com.microsoft.sqlserver.jdbc.SQLServerDriver
Connection:jdbc:sqlserver://ServerName:Port;Database=XXXXXXXX;
Username:XXXXX(Ex:sa)
Pwd:XXXXXXXX
Thanks
Ravi -
Query SAP Database with Native Sql.
Hi,
I would like to query the table MARA with native sql and return all headings and data
Select * from MARA where MATNR = '00000000151515'
<i>I need this to be able to TEST my Sql statements.</i>
In SqlServer you have the Query Analyser where I can do just this, but is there some nice in SAP Tool for this as well ?
[Unfortanely I can't connect to SAP_U01 database from QA...]
//MartinHi Martin,
maybe you give ST05 a try: last button gives the possibility to enter a SQL-statement directly - and for explanation it has to be executed (somehow).
Regards,
Christian -
How to Display RTF data with images from SQL database in Crystal Report
I am using Crystal report in my WPF application, I have generate Question Paper Report, in which have Question with images. Question with images are stored in SQL Server in rtf format, I want to generate Question report with RTF Text and Images in report
Hello Sir,
I am still Facing problem in Crystal report generation with RTF Data (Text + Images),
I am storing Questions in SQL Server which are RTF Format, Questions have Text + Images..
I changed field data type then also i didn't get image in Crystal report
if i browse an image n stored that in DB then its displaying in Crystal report, but when i pasted that image in RichTextBox and saved that in DB then no data displayed in Crystal report.
My Table Structure is
Table Name: tblQuestions
field : Questions Varbinary(max)
I tried with nvarchar(max) also but its aslo not working -
How to update SQL Database with totals from Crystal Report
Hello,
I am converting a Crystal Report done using CR 11 and VB6 to VB.Net and Visual Studio 2010. The report is now working fairly well but there is 1 last thing to figure out. In the vb6 version there was a report footer event that I used to update the report totals to a record in a database table.
It appears that in the .net version we have less events to allow outside processing to occure when a report is produced. Looking thru the available events I don't see a way to do this. Would some be so kind as to suggest a way this might be accomplished?
Thanks,
VicOnly thing I can think of is the InProc RAS SDK and using the RowSet Controller to query the footer, then parsing out the info you need to submit to the database.
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]
Maybe you are looking for
-
i got a creative zen for ny birthday and was asking for a ipod but oh well. i have a lot of music on my itunes. and for the life of my i cant figure out how to get my music in itunes over to my mp3 help me please someone
-
Hi All, I am facing a problem transforming an XML document using XSLT. I have two XML documents.One is the source document. In the XSL i refer to another XML document which is in the same folder as the source document using document() function.(My XS
-
Work Flow for Material Creation in MDM
Hi MM Experts, Can any one tell me whether there is an option of having Work Flows for Creating Material in SAP MDM (Master Data Management). I think this feature is not available in Standard SAP R/3. Cheers Deepal
-
I researched the net and a lot of people are having the same problem, but did not find answers. 1. I turn on the PC and experience very slow to open firefox. 2. Then a field pops up "Non-responsive script may be what is slowing down your computer". T
-
NI-Visa installer dont work on some windows XP
I built a installer on the vi attached, the vi has a serial input function. The additonal installers I ticked are NI LabView Run-Time Engine 8.6.1, and NI-VISA runtime 4.4. I notice that in some PCs with Windows XP, the installer runs fine. On some