I use Oracle Report 6 for get my report, The problem is I want to get PDF export without displaying the report.I mean right now, I click on one button and make report (call a report from my Oracle form) then go to my report menu ->Generate to File -> PDF.
I dont want do this anymore... can I use any command from my form to export my report directly? I mean for example use some command to prepare report and get export in PDF automatically...
also if I can set the export file name and it's location when I try to generate PDF also can help me so much because I need to follow some rule for put name for my export files like use prefix and some digit and number....
What is your suggestion?
You can do both request.
You have to create parameter and pass to run_product built-in
Syntax:
REPORT_DESTYPE: File, Printer, Mail, Cache -- SET File
REPORT_FILENAME: The report filename (not used with CACHE) -- Set your desirable file name format
REPORT_DESNAME: The report destination name (not used with Cache) --
REPORT_DESFORMAT: The report destination format -- <HTML|HTMLCSS|PDF|RTF|XML|DELIMITED> set PDF
Sample parameter list:
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESFORMAT,
'');
I hope this help.
If you still need full details let me know, i'll add a sample procedure.
Use these parameter fields:
ADD_PARAMETER(p1,'DESTYPE',TEXT_PARAMETER,'FILE');
ADD_PARAMETER(p1,'DESFORMAT',TEXT_PARAMETER,'PDF');
ADD_PARAMETER(p1,'DESNAME',TEXT_PARAMETER,'C:\Downloads\MRP_PROCESSRATE.PDF');
Related
I want to Replace default file name (Excel.xlsx) to the custom file name using GPV Interactive Report to MSExcel (Plugin). The answer that I could find is "When not empty, the value from Report Attributes-> Filename field will be used." but this answer doesn't apply when the Plugin is used for a button. Any suggestion will be helpful.
go to the report region affected by the plugin, under attributes theris a download tab and a filename field, put your desired name there:
I need to call an other report with parameters from my report by report builder 12. But it seems to be, there is no button for calling an other one. Is there any way to call second report from the first one?
Such a functionality is called drill down (so that you'd be able to research it yourself, if you want).
In the old Reports 6i, you could have done it by creating a button. In modern Reports version, you'll have to use a hyperlink - it can be found within the "Web" settings, and looks like this:
http://your_server:port/reports/rwservlet?userid=scott/tiger#orcl+report=your_report.rdf+
destype=cache+desformat=html+par_deptno=&deptno
Interesting part is the very end of it, which shows how to pass a parameter from this report (which contains the &deptno value) to another report (which expects deptno value to be passes into the par_deptno parameter).
First stop the report server. (OC4J instance also for 10g)
Search for CGICMD.DAT file in Developersuite home. (for 10g It’s located at folder. And for 11g D:\Oracle\Middleware\user_projects\domains\ClassicDomain\config\fmwconfig\servers\WLS_REPORTS\applications\reports_11.1.2\configuration)
Open the CGICMD.DAT file and go to bottom line and add the bellow lines and modify as your value.
; hrs: userid=test/password#orcl server=rep_server desformat=pdf destype=cache paramform=no %*
(Where first userid, report server name, report destination format, destination type and no parameter form.)
Save and close the file.
Now open the report which will have the link.
Select the data field and press F11 to go code editor and add the bellow code before
return (true);
SRW.SET_HYPERLINK('http://SERVER_NAME:8889/reports/rwservlet?hrs+report='D:\ID_CARD_ALL.rep+EMPID='||:EMP_ID);
(Change the report server url as you have, report name and parameter if you have)
Compile and save the reports.
Now Run the report server and run your report…
LOVE U SETAREH
I'm using Batch Loader to migrate a large number of files. I'm generating my hda file using a script on the source system. How can I specify the target folder? Everything I've migrated so far has no entry for Folder when I view it's info, and I can't find a way to specify it. Sample of my hda below.
# Batch load data for TEST_FILE_3 as jpg
Action=insert
dDocName=TEST_FILE_3_as_jpg
dDocType=Document
dDocTitle=TEST_FILE_3 as jpg title
dDocAuthor=usr_TEST_FILE_3
dSecurityGroup=Public
primaryFile=TEST_FILE_3.jpg
dInDate=01/29/2018
<<EOD>>
In Native UI, change User Profile Layout to top menus and do a search. When Item is returned, access its Info. When info is displayed, add: &IsJava=1 to the url and enter.
This shows all metadata field.s Ones you are looking for are one of these: fParentPath, fParentPathLocalized, ownerFilePath, ownerFilePathLocalized
Here are a few steps to assist you:
Place a file in the folder you want your document to end up in.
Find the document info page and append &IsJava to the url. Something like
http://.../cs/idcplg?IdcService=DOC_INFO&dID=110113&IsJava
Examine the output. You will find variables that indicate the path. Their names will differ depending on what components you are using, but a good guess is fParentPath
Copy name and value to your batch loader file
I have recorded a simple Coded UI test from visual Studio 2013. What it does is;
Launches a website
Fills in a form with (8 fields)
Saves the form and closes it
Now, I wish to use a data.csv file to replace those 8 values. All the searching I did, I could only find options where every input field had different method hence was easy to find and replace values. In my case, 1 method and 8 fields.
How do I do that? Where do I make the changes since my main file looks like this:
Where and what changes should I make to use CSV file instead of manual values that I recorded.
My designer file code is as below for couple of input fields:
// Type '123456789' in 'i' text box
uIIEdit.Text = this.createKundeParams.UIIEditText;
// Type '{Tab}' in 'i' text box
Keyboard.SendKeys(uIIEdit, this.createKundeParams.UIIEditSendKeys, ModifierKeys.None);
// Type 'Jeff Hardy' in 'name_i' text box
uIName_iEdit.Text = this.createKundeParams.UIName_iEditText;
// Type '{Tab}' in 'name_i' text box
Keyboard.SendKeys(uIName_iEdit, this.createKundeParams.UIName_iEditSendKeys, ModifierKeys.None);
you can put all the 8 values in 1 csv row and treat them as one input to be passed to the method that sets the fields, alternatively you can change the method to accept one value and field name and sets the field with the value
Create the CSV file.
Add the CSV file to the project.
Make sure the CSV file is deployed.
Add the CSV file as a data source for an individual test.
Read the CSV fields and use them in the test.
The detailed steps, with some variations, are explained below.
Visual Studio 2010 has a "data source wizard" that does some of these steps. Visual Studio versions 2012 and 2013 do not have the wizard and so all the steps have to be done manually.
Create the CSV file
One way is to create the file in a spreadsheet then save it as Comma Separated Values. Another way is to use a text editor and just write the file. I use a spreadsheet program for big data source files and a text editor for creating small files. Some editors add a byte order mark (BOM) at the start of a file, that will be added to the first field name of the CSV which appears to make the field unreadable. See this page for more about the BOM.
Add the CSV file to the project
Use the context menu in solution explorer, select Add -> Existing Item. Then browse to the required file. Note the file filter will probably need to be altered to be . or *.csv.
Make sure the CSV file is deployed
Open the properties panel for the CSV file from solution explorer. Set "Copy to output directory" to "Copy if newer" or to "Copy always". Some documents recommend "Copy if newer" but I prefer "Copy always" as occasionally a file was not copied as I expected. The difference between the two copy methods is a little disk space and a little time, but disks are normally big and the time to copy is normally small. Any savings are, in my opinion, far outweighed by being sure that the file will be copied correctly.
Add the CSV file as a data source for an individual test
Replace the [TestMethod] attribute with the correct data source line. This Microsoft blog shows the replacement code for several possible data source file types. For CSV use:
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV",
"|DataDirectory|\\data.csv", "data#csv",
DataAccessMethod.Sequential), DeploymentItem("data.csv"),
TestMethod]
Note that the file name occurs three times and one copy has a # rather than a .. I have not found any useful documentation about the different fields of the Datasource(...) attribute so cannot advise further on how to choose values for non-CSV data sources.
The |DataDirectory| part above is replaced by the directory where files are deployed when the tests run. The whole file name within the string quotes could be replaced by a full path name of a file, if required.
Read the CSV fields and use them in the test
The Coded UI record and generate tool creates classes with fields that hold values entered into text boxes or used in assertions. Each action method has a ...Params class and each assert method has an ...ExpectedValues class, where the ... is the method name. The default values of these fields are the values used when the test was recorded. The recorded values can be overwritten by an assignment before the action or assertion method is called. The fields of the current row of the data source are accessed from TestContext.DataRow[...].
Suppose a Coded UI test has an EnterValue method that writes text into two fields of the screen and it also has a CheckResult method that asserts one field. The test method might then be written as follows.
[DataSource...
TestMethod]
public void CodedUITestMethod1()
{
this.UIMap.EnterValueParams.UIItem0TextSendKeys = TestContext.DataRow["ValueOne"].ToString();
this.UIMap.EnterValueParams.UIItem1TextSendKeys = TestContext.DataRow["ValueTwo"].ToString();
this.UIMap.EnterValue();
this.UIMap.CheckResultExpectedValues.UIItem0TextDisplayText = TestContext.DataRow["Result"].ToString();
this.UIMap.CheckResult();
}
The ...Params and ...ExpectedValues classes allow the test to create values when the test runs. For example, if the EnterValue method also wanted to write tomorrow's date into a field we could add the following line before it is called:
Could anyone help me figure out how to enter a value into a QTP data table using VBScript? I'm trying the following line, but it doesn't seem to work:
datatable.Value(D,"sheetName")="A"
What is wrong? I am used to other languages and just cannot see any problem here.
What is the D you're using? Is it a variable holding the column name? If not and you mean to use the D column then you have to quote it so that QTP (VBScript actually) knows you mean the string "D".
datatable.Value("D","sheetName")="A"
I know zilch about QTP tool. However, your syntax looks correct based on this example. (see heading Adding Value to you a local sheet
Based on the information given, I would take a stab that you may have not referenced the QTP DLL, you have ON ERROR RESUME NEXT in your code AND you do not have OPTION EXPLICIT set at the top of your module.
Start by making sure you have the correct DLL referenced and adding this line to the top of the code:
OPTION EXPLICIT
If you've done that, then add more information that could help one deduce the problem (e.g. full code sample).
The way that you get data from datatable in QTP is, first import the Excel sheet into your datatable (Either Global or Local), then try to get data from datatable using following Syntax
Datatable(columnName,dtGlobalSheet) if imported in Global sheet
Datatable(columnName,dtLocalSheet) if imported in Local sheet
Importing Data
myFile = "C:\datasheet\excelone.xls"
datatable.Importsheet myFile,1,Global
Enter Value
DataTable("Coumn1Data", dtGlobalSheet)
This way you can get data from Excel sheet.
Thanks,
Karthik